Hi everyone, as I posted in several threads before, I've been coding a game editor and it's been going quite well but I just hit a snag. Basically, the more objects I have on screen (which isn't a lot) the more I notice a delay in drawing them.
I don't want to post a bunch of code for anyone to sift through but let me try and sum it up. I select an image, in this case a simple colored square and place it on the canvas, it's 64x64 size. When I place an object I call redraw canvas to redraw everything using the DrawImageRect function. When I have let's say 15 of these blocks on the screen, selecting one, moving one, even placing another one there is a decent delay.
When I redraw the canvas I am loading the image from disk using the LoadImage function for each image. Should I be using a bank instead and not loading them from disk every time there is a redraw?
Any other general suggestions and how to speed things up?
|