๐ Camera Configuration (Game Window)
What is it?
In the editor, you can define the width and height of the camera
(cameraWidth and cameraHeight).
These values determine the size of the game window, meaning the visible area on screen.
Think of the camera as a frame that cuts out which part of the world is visible at any moment.
Anything outside this frame wonโt be visible, even if it exists in the scene.
๐ Parameters
- cameraWidth: width of the game window (in pixels).
- cameraHeight: height of the game window (in pixels).
โ
Scene Example
{
"cameraWidth": 640,
"cameraHeight": 480,
"cameraFollow": true,
"backgroundColor": "#000000"
}
๐ This sets a 640ร480 game window, a classic 4:3 arcade-style format.
๐ Platform-Specific Configuration
๐ฎ PC
- Typical resolutions:
800x600, 1280x720, 1920x1080.
- Itโs recommended to keep a standard aspect ratio (16:9 or 4:3) for better monitor compatibility.
๐ฑ Mobile
- Typical resolutions:
720x1280 (vertical), 1080x1920 (vertical) or their horizontal equivalents.
- Depends on whether the game is vertical (endless runners, puzzles) or horizontal (arcades, platformers).
๐ป Web / Tablets
- Ideal formats include
1024x768 (4:3) or 1280x800 (16:10).
- You can use letterboxing or scaling to maintain the aspect ratio.
๐ง Best Practices
- Decide early which aspect ratio you want to use (4:3, 16:9, 9:16 vertical).
- Set
cameraWidth and cameraHeight in the editor to match that ratio.
- The canvas automatically adjusts to these values.
-
In Play mode, the window automatically fits the browser size
while maintaining its proportions when enabling fullscreen using the GameCrom icon.
๐ Notes
โ cameraWidth and cameraHeight do NOT change the actual world size, only what is visible on-screen.
โ A game with cameraWidth=640 and cameraHeight=480 can still have a huge map;
the camera moves to follow the player.
โ This allows for very large worlds while limiting what the player sees at any moment.
โ Changing the game window size directly affects gameplay (for example, seeing more or less terrain).