Game Dev Engine #3. Window Input System.
Vložit
- čas přidán 6. 09. 2024
- 2023-06-11. I have many sub-systems completed, but I unfortunately have no nice way of presenting them. This finally lead to the creation of this windowing system, to avoid the hardcoding of many presentation modules for things such as my game-centric input system (which will show how keyboard, mouse, and gamepad can be captured and abstracted away, for ease of development).
This window system is rather basic. It has the following features:
- recursive ownership, no limits
- each window has its own render target / canvas
- can tie into initialize/update/draw functions of each window
- simple graphic demos run with only knowledge of its container window
- sorting "bring to top" when selecting a window
- mouse coordinates are quantized to low-res game screen
- underlying input system provides mouse click, drag, release context
Current limitations are:
- you can drag a window into the nothingness; preferred for this demo! :)
Future ideas:
- can be used for game HUD and UI
- can be used for menu system
- can be used for screen management (game state) system
- dynamic positioning to remove burden from developer
Playlists:
--------------
- Xona System 8: • Game Dev Engine #1. A ...
- Voxel: • Voxel Engine #8 - Corr...
- Ray Cast: • 3D Ray Casting Engine:...
- Graph-All: • #1 Graph-All Equation ...
- Scroll Shmup: • The First Pixel: Dev V...
- Road: • Pseudo 3D Road #8 - in...
- Arena Shmup: • Arena Shmup Demo #3 - ...
- Wave Function: • A.I. Texture Generatio...
- 3D Polygon: • 3D Polygon Engine #9 -...
- GW-BASIC: • GW-BASIC - Escape From...
Websites:
---------------
- GitHub: github.com/JDo...
- Blog: thefirstpixel.com
- Studio: xona.com
I like the window names too. Duality and Decimation :D love pixels!
Thanks! I would like to plug the existing games, those individual engines, into this one... migrating the specifics from the unique engines into the generic engine, to allow their re-use. I bet Duality would be cool in low-resolution! And yes... there's just something about pixels. :)
Hey! Nice to see you here!
This is really cool.
Yeah, it was very nice to get this working. I implemented the title bar and what I called the "inside" window as windows themselves, and made the system automatically handle them, to keep the messy details away from the user.
0:18 Colorized arcs 😍
Great to see that you are working on a new engine! I miss those minimalistic lightweight user interfaces so much. Once I started doing a somewhat similar GUI system with windows for my framework. Maybe I set a too ambitious goal to do a complete desktop environment from scratch with it! Your work is awe-inspiring. Everything is in motion! Have you considered drawing subtle cast shadows from those windows?
It's so refreshing to hear your enthusiasm! You should return to your project. I would love to see the outcome. I always focus on MVP (minimal viable product), and in fact, these windows came about through my desire to showcase engine components, and I really didn't want to hardcode positions of things -- so I ended up making "RenderBoxes" for alignment purposes, which turned into windows. Click and drag is a trivial addition (along with Z sorting) once you already have the rendering handled. Even recursive nature is fairly trivial. It does add to the complexity, but all of this gives me the freedom to work on top of this nice foundation forever onward. I'll now only add to this as the demands require.
Regarding the shadows -- thanks for the suggestion. I had thought about it, and thanks to you, I now have added it. You'll see them in the next video! :)
> "too ambitious goal to do a complete desktop environment"
This one hits home, since you feel it is not complete until you have the whole thing done. You don't need a complete environment. Consider the Win16/Win32 Windows implementation -- everything is a window. Including buttons and menus. In my case, I have a single Window class, and from there, the title bar windows are actually 3: 1. the container window, which holds: 2. title bar, 3. inside window. This grew incrementally out of the simple foundation. If I ever get around to having buttons, sliders, checkboxes, menus, etc... they will all be windows (simple inherited sub-classes of the main class). So start small and simple! I'd love to see what you already have.