Retry: Since everyone else is asking, optimization advice needed! :-) ignore other message sorry

My finger slipped :slight_smile:

After spending a greuling weekend of coding on my Raider’s Saga RPG
project I’ve come to the point where I actually need to optimize
something (because for the most part it actually works :wink: ). But I’m
wondering if the strategy I’ve choosen is the best one for my app.
The app that needs the optimization is my map editor (which a
screenshot is available at,
the code will be available as soon as I finish the optimizations (and
remove some non critical bugs). Basically the inner loop is doing the
following (psuedocode) :

do {
see_if_gui_buttons_were clicked();
if(current_tile_was_changed) {

} while it’s_still_running;

redraw_tiles() {
redraws tiles in a 9x9 grid accounting for offset, and draws
current tile only redraw when neccessary because there is no animation
in regular floor tiles.4

redraw_special_tiles() {
sames as redraw_tiles, but redraws everyframe due to animation

redraw_grid() {
redraws the 8x8 grid, accounting for offsets into the 30x30 world
and redraws everyframe to account for animation

my blit function is basically a wrapper for the sdl ones, but is
horribly inefficient. My world is stored in two arrays, one for the
floor tiles, and one for the special tiles, because a special tile may
also be in the same location as a floor tile.

My optimization strategy is to use a

Phoenix Kokido