I’ve been doing a sort of bird’s eye view of the code I’ve written for my 2D engine project using SDL2. So far, a lot of ‘test’ material is still in place, so I’ve been sort of scraping at the edges and preparing to flesh out the major portions that will eventually blossom into a more solid backbone for the engine.
Currently, rendering and buffer swapping works, but it’s directly referencing the entirety of my spatial map code to get ALL entities rather than referencing the camera object to see what entities it should portray within the displayed area of the world. I did just create the camera object, but I’m having some difficulty conceptualizing where it should live – the graphics portion of the engine? The scene portion within the graphics portion? Hmm. Tough to say.
I haven’t even begun implementing entity AI or anything of that sort yet; I’d like to get the camera and the world working before that point. I’d also like to build in restrictions for camera motion as soon as things move beyond a certain limit outside of empty buckets in the spatial map; i.e., stop the camera motion towards areas that are just infinitely empty.
I was tempted to attempt a list of features I’d like to include, but that’s way, way premature. Instead, I’ll focus on chipping away at the project one obstacle at a time.