Wednesday, 17 February 2016

Updating to SDL2

This is a good time to update from 1.2 to 2.0. It's not a dramatic change, but the GUI is refactored in a way that there is a new class Graphics_Engine which has low level graphics routines which then are used by high level gui class. It's not required to have it this way, but I think it's much cleaner. Only "atomic" graphic display routines are in Graphics_Engine, such as displaying fonts, pieces of static graphics, tiles and other simple elements. Then the higher level gui is taking care of displaying windows, tombstones, stats and stuff like that.

I guess it could have been possible to continue with SDL 1.2, but I think SDL2 is better. It has better support for alpha channel, full screen and graphics rescaling (which may or may not look cool..).

No comments:

Post a Comment