Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    386127

Well...I guess I'll do the map editor...this time

Sign in to follow this  
Stompy9999

44 views

Things are progressing quite smoothly with the game. The map code is rewritten, which takes a big load off my shoulders in the long run. After some thought, I decided I'm going to create the map editor now, instead of waiting.

I'm going to create the editor in such a way that I can use it for all my tile based projects. Hence I'll call it something uncreative like "StompyEdit". I plan to write the editor in C#(haven't we heard this one before). Just because I can't write the game in C# doesn't mean I can't use it for the tools. I have to learn more about GUI programming with C# before going on.

I figure I can use this time to also write a complete design document for the game. This is not the type of game I want to dive into without having a clear plan for what I'm going to be doing. It's not the type of game that I can just "wing it".

There has been one thing that's been bothering me, and I'm hoping you all could help me fix it. Does anyone know why an SDL app would run well in windowed mode, but run really slowly in fullscreen?
Sign in to follow this  


3 Comments


Recommended Comments

You need to make sure you're converting all of your surfaces to the display format. I don't think I saw you doing this in the code for Stompy. If your surface isn't in the correct format, a conversion will have to take place on every single blit. That might have nothing to do with your slowdown, but it seems worth a shot.


tempSurface = LoadImage("myfile.png");
mySurface = SDL_DisplayFormat(tempSurface);
SDL_FreeSurface(tempSurface);

Share this comment


Link to comment
afaik if the SDL_Surface* thats being used for output uses a resolution/bpp combination which your display can't run, or which could be run with your display but strangely not with SDL (had this at 320*200 for example), the Surface will be scaled which appareantly takes very long.
I don't know if it's the case here, but you could use your monitors menu to check if the resolution in fullscreen is the same that you defined in your code.

Share this comment


Link to comment
Ah, the display format did it. Now the game runs incredibly fast in windowed, and at normal speed in fullscreen. I did a change to scale the framerate according to what graphics mode it was in, and the game now runs fine in both mode. Thanks!

However, I will still look into what you suggested, philipptr. The resolution I define in my code is 640x480, while my actual moniter resolution is much greater.

Share this comment


Link to comment

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