this is just a simple project for me to learn c++, don't expect too much :)
compile with: g++ -Wall Scene.cpp Renderer.cpp SceneManager.cpp Transform.cpp main.cpp Sprites/SpinningLine.cpp -o main
obviously you need gcc for this
yes there is no makefile, i'll do it later
- Scene(s) are created
- SceneManager is created
- Scenes are added to the SceneManager
- The first active scene is selected
- The main loop starts
a few things happen each frame:
- a ProgramStateInfo object is created and passed to the active scene's OnFrame method
- in the scene's OnFrame method, scene logic happens
- UpdateSprites is called on the active scene, which calls all the sprites in the scene's OnFrame methods
- RasterizeSprites is called on the active scene, which calls all the sprites in the scene's Rasterize method
- Each sprite's pixels are ordered by its z-index
- post-processing will happen here (todo)
- final list of pixels is added to the pixel buffer on the renderer
- the pixel buffer of color objects is converted to one string to print on the renderer
- that string is printed to the screen
- the singleton debug box's contents are printed, if enabled