Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    223
  • comments
    165
  • views
    79561

Efficiency woes

Sign in to follow this  

99 views

I'm almost finished the editor. The prisoner editing code is almost all in place and the guard editing code is going to be fairly similar. So a few more days and I'll be done. I know this is taking much longer than it should have through sheer lazyness and the fact that I've been playing games a lot more lately.

The one thing that I'm currently annoyed about is that since I've added the prisoner layer to the level editor I've noticed a bit of a slowdown in render times. To see what was happening I checked how fast it took to render each layer each time I redraw the map and I was unpleasantly surprised. I kind of suspected that something like this might happen when I started the program but I decided to bank on GDI+ being not being too slow, I was wrong. The problem is that I am rendering large amounts of transparent data onto the map. Each layer is stored in an image as large as the map and a subsection is blitted onto the currently visible map image. Most of these layers have a definate majority of transparent area. So blitting these layers, means that I'm wasting a lot of time rendering nothing. I would have been far better off just running through the arrays of layer data and rendering only what was required. I'm not going to go back and change now. Its noticable but not debilitating and since is just going to be the two of use using the damn thing I don't really mind. But its a lesson well learned. From now on don't be lazy for the sake of a few lines of code - it'll come back to haunt you.

I downloaded the Darwinia demo thismorning and finished it. It was quite easy to complete the three mission objectives, but what was really fun was clearing the entire map of enemies and capturing all of the mines. If you haven't tried it yet I'd recommend checking it out.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!