Game Dev Engine #10. Dynamic Pixel Zoom.

Subscribers:
810
Published on ● Video Link: https://www.youtube.com/watch?v=PNJzjyV9DK4



Duration: 1:42
726 views
12


2023-09-02. Xona System 8 is a game development engine written using the MonoGame framework. This showcases the engine's response to Windows WM_SIZING events to dynamically change the backbuffer, and update the pixel scaling factor (in 3 different scaling methods), to showcase our low resolution screen, which continues to update, to the final canvas. This includes maximizing and minimizing the window.

The screen resolution is 1920 x 1080.
The game resolution is 312 x 160.

You may notice at the beginning that the resizing of the corner also impacts the other corner. But after this event finishes, subsequent events do not have this feature. It is actually a bug in the MonoGame framework, but could very well be a desire -- it reminds me of the MacOS file-box interface. After all, why would you only want to change one half of a window that you wish to zoom in on? I have debugged the MonoGame framework and submitted feedback here:

- forum: https://community.monogame.net/t/real-time-window-resizing-wm-sizing-onresize-short-circuits-too-early/19329
- bug report: https://github.com/MonoGame/MonoGame/issues/8062

The 3 rendering methods are as follows:
1. integer (pixel-perfect) pixel zoom
2. aspect-ratio correct pixel zoom (isotropic = X and Y are the same)
3. stretch-to-fit pixel zoom (anisotropic = X and Y need not be the same)

This also showcases a little asteroid shooting game, which is actually the first proto-game that I've ever made with this engine. It is showcasing that the mouse control and aiming are correct regardless of the game resolution, pixel zoom / stretch factor, and window positioning. Also, the mouse doesn't impact the game while in middle of resizing.

Video was recorded with the free & open source: OBS Studio 29.1.3.

Playlists:
--------------
- Xona System 8: https://youtube.com/watch?v=PqFQv60p-0E&list=PLjnbT4UISq0YwheLThIhm3LDxIkwpmKeb
- Voxel: https://youtube.com/watch?v=uadGU-stF-w&list=PLjnbT4UISq0bQF1g85tE9jTrKfEtdRYlY
- Ray Cast: https://youtube.com/watch?v=SkaPYZOKPQg&list=PLjnbT4UISq0YcFtRFjFQqK0g6ONNCtrvY
- Graph-All: https://youtube.com/watch?v=kLSc7bZW2Bs&list=PLjnbT4UISq0YLgynFSpLzml4BMC6TDZL2
- Scroll Shmup: https://youtube.com/watch?v=l9bIYkZepPo&list=PLjnbT4UISq0Y_7IAN_zUzxgZnfhXxo_0Q
- Road: https://youtube.com/watch?v=rA4g4VX7ys8&list=PLjnbT4UISq0bnfd1RC3M4PgTgkmhlkikV
- Arena Shmup: https://youtube.com/watch?v=VKjiuq437t0&list=PLjnbT4UISq0adw__Y9B2eXA0LL35TyORU
- Wave Function: https://youtube.com/watch?v=ngctVd9VK8I&list=PLjnbT4UISq0Y8vYnrSauHkBKgOBHXFFdf
- 3D Polygon: https://youtube.com/watch?v=0Qq_euAMP48&list=PLjnbT4UISq0YyjqBGG8Q34Kng5gqDmYrT
- GW-BASIC: https://youtube.com/watch?v=QMQJ7o8e-GI&list=PLjnbT4UISq0bMjb81xFBIWOLhBKFCVkuB

Websites:
---------------
- GitHub: https://github.com/JDoucette
- Blog: http://thefirstpixel.com
- Studio: http://xona.com







Tags:
gamedev
monogame
indie
development
graphics
engine
xona
firstpixel
pixel
pixelart
retro
coding
wolf3d
raycast
raycasting
software
custom
shader