Since everyone else is asking, optimization advice needed! :-)

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 members.xoom.com/kokido/screenshots.html),
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 {
get_keys_and_update_mouse_position_and_buttons();
do_stuff_with_key_presses();
see_if_gui_buttons_were clicked();
if(current_tile_was_changed) {
redraw_tiles();
}
redraw_special_tiles();
redraw_grid();
} while it’s_still_running;

redraw_tiles() {

}

redraw_special_tiles() {
}

redraw_grid() {
}

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

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 members.xoom.com/kokido/screenshots.html),
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 {
get_keys_and_update_mouse_position_and_buttons();
do_stuff_with_key_presses();
see_if_gui_buttons_were clicked();
if(current_tile_was_changed) {
redraw_tiles();
}
redraw_special_tiles();
redraw_grid();
} while it’s_still_running;

Sounds reasonable. What’s the problem?

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec