Knaj's Game Engine
- 3 Devlogs
- 1 Total hours
Well er... It's a game engine!
Well er... It's a game engine!
Being fair, it was quite simple once I actually understood the math, which was the hard part.
All it took was scaling unit circle coordinates (which are sin theta, cos theta) by the radius and translating them by the center. Another difficult thing was figuring out how to correctly scale the objects, but I achieved that by scrapping pixel-normallized conversions and changing the entire coordinate system into a pixel-based one (for the scene at least).
A small tweak of how the objects are structured, I added the ke::nodes::UserObject to encapsulate shared behaviour between Node2D and Node3D, without passing said behaviour onto SystemObjects. Such behaviour is, for example: Drawing to the screen.
First devlog here, gonna recap what I’ve done after flavortown ended.
Mainly, I created an object hierarchy and a tree-based object structure. This allows for easy displaying and manipulating said objects in the future, and the inheritance covers common behaviours of the classes. This is the first game engine-specific feature I’ve added and will allow the user to interact with the scene more independently rather than me having to add specific ways for them to do so. This project is building upon what I built during Flavortown, and I’m glad I can share what I’m working on again.