Is there some way to change your field of wiew

I am making a mario game, and I would really like to know if there’s some way to change your field of view without making smaller tiles. The reason for this is that the original super Mario bros game had a lot bigger view and i wouldn’t like to apply this to my game.
Here’s an example
This is what I’m seeing

And this is what i want to see

1 Like

@Lucas_M Knows!

you can maybe use the zoom extension @Kiwiphoenix364 made? idk if it helps though.

1 Like

This is possible, but it is not certain that everything will work right with this active, as some things with the MakeCode engine (probably) have been hardcoded for a 160x120 resolution. Also, this will not work properly on hardware. But here’s the code that you’ll need to use (it’s in js/ts).

namespace userconfig {
    export const ARCADE_SCREEN_WIDTH = 320
    export const ARCADE_SCREEN_HEIGHT = 240
}

Copy this code and change the numbers to change the resolution, the first one controls the width, while the second controls the height (pretty self-explanatory.) Once you’re done with this, you can switch back to blocks if you want (however, if you try to switch between js/ts and blocks in already-made projects, there is a possibility of them breaking/changing variable names, so always be cautious and save before switching to js/ts from blocks.)

To change resolution while playing the game"

As far as I know, you can’t change the resolution at runtime, unless you set the max resolution you want to use then use my zoom extension (kiwiphoenix364/pxt-zoom), which may run slower on higher resolutions, but I did do a patch to account for screen width/height when I figured out how to change Arcade’s resolution.

To easily double the resolution"

If you want to easily double the resolution without going into typescript, you can add my double-res extension (kiwiphoenix364/pxt-double-res), which uses the same code shown earlier. This instantly doubles the resolution from the original 160x120 to 320x240. The original NES’s resolution was 256x240 (for most games), so these are comparable, with the double-res extension being 64 pixels wider. However, be cautious when using this extension, because to revert it back to normal you must go into typescript to take it off, and there are no blocks to control it, because even “on start” blocks run things during runtime, and you can’t set these settings during runtime or in functions.

Thank you @Kiwiphoenix364! This exactly what i needed! It looks so much better. I used your double resolution extension. Thanks for the help
Here’s how it turned out

2 Likes

Btw @Kiwiphoenix364 ypo should make this into an extension if possible