[WIP] Traditional tilebased roguelike


#22

Yeah there should be quite a lot of opportunities. I’m going for the big savings first and then I’ll try to squeeze more with smaller optimisations. I’m planning on sharing the code a bit later, I want to get further along with it and do some cleanup. Coming from the Java world I structured this way too OOP I think.


(Pharap) #23

If you’re using virtual functions then that’s going to be one of your biggest memory hogs.
(That’s because virtual functions are usually implemented using a thing called a ‘virtual method table’, and part of that involves adding an extra pointer of overhead to every instance.)

I think inheritance can also lead to code duplication, but I haven’t done any conclusive tests.