I'm, like, 30% I should rethink some of my features
So, second day is over and unfortunately I won't be having much time to work on the third day.My idea for lazying around on the art is using some screen update strategy meant to (very grossly) simulate eyes in straining conditions where shifting focus from bright to dark places leaves after-images, as well as give a sort of surreal feel to the game. My initial implementation involves a lot of random number shuffling, and could desperately use some improvements.
The rendering strategy is as follows (surfaces are 200x200):
- Render the "real world" in a surface
- Render the "light casting" in another surface
- Blit the "dark areas" of the light casting on top of the "real world"
- Shuffle the random numbers matrix
- Update only those pixels to the screen
My 200x200 game, scaled up to 600x600 is running at ~25 FPS, and while the big bottleneck is the screen update strategy (skipping the last step bumps the FPS to 60 with CPU to spare), I'm sure there's a few workarounds I could do to speed up the process, probably pre-calculating some update patterns is one way to go (with the potential of leaving specific pixels "relatively neglected"), another is to play a bit with surfarray and pixelarray.
This VERY CLEARLY is one of the features that could easily turn into one of those time sinks that prevents a game from being completed and won't right now provide good return on investment. So I'll pause further development of this for now and get the rest of the game done before wasting whatever remains of my development hours on making whatever post-processing effects for the game cool and running crisp.
Tomorrow: simple world generation