Quote Originally Posted by Christopho View Post
Finally, to answer particular previous remarks:
Hi Christopho. I hope you didn't take offense to anything I said. I was simply trying to make the point that you can't take a decision to start a major project so willy-nilly; in this case deciding to use an existing code base that no one bothered to look at first, or even knew in depth how it worked or what it did. Nothing against the good things that you have accomplished.

I haven't played it yet, but Solarus looks like a very cool project. I watched the video of it a few years ago. I really hope you can complete it. :)

Quote Originally Posted by Christopho View Post
Finally, to answer particular previous remarks:
- Don't forget about rule #1 of optimization. Which is "Don't optimize.". Premature optimization is the root of evil. About the code that finds an enum value from a name, you really want yet another map to have a faster reverse mapping? No, I will not optimize a linear traversal of constant container of 10 elements :) Unless there is a use case where profiling shows that this is a bottleneck.
- On the contrary, useful optimizations were done. Like hardware 2D acceleration (with SDL2), pre-rendering of maps (no, we don't redraw all fixed tiles at each frame!), lazy loading of tiles, clever management of obstacles… And we also use LuaJIT for great performance of scripts. .
I guess I am on the other end of the spectrum here with "Premature optimization is the root of evil". To me that is one of the dumbest things I have ever heard, right up there with "The war on drugs" and "Stop underage drinking before it starts." ..I wish people would stop saying that. At the very least, I guarantee you that quote originated from someone who absolutely was not a game programmer trying to run an entire simulation in 16.7 milliseconds.

The pre-rendering of maps is an interesting idea that I have never tried. This almost sounds like something in the old pre-GPU card days where bitmaps were marked with dirty flags. I believe this concept was called "dirty rectangles." Interesting. Would this also work with palette effects or color changes to individual tile layers, like a day-night system?