Jump to content
  • Advertisement
Sign in to follow this  
KaiserJohan

Some SDL questions

This topic is 2743 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

I've got some questions if you don't mind :)
I am using SDL 1.2 in C++ doing 2D strategy game.


1. I want to do some graphics like Age of Empires 1 (http://www.microsoft...creenshot_2.jpg).

Another example is Pharaoh: http://withfriendshi...h-wallpaper.png

Here's what I have right now;
testod.png

Uploaded with ImageShack.us

Is it just me or is the camera more 'tilted' in AoE 1? How do I achieve this effect?


2. What is the best way to paint a HUD / minimap?


3. I want to enter/exit fullscreen mode on Esc. Here's what I have right now:

void cApp::onKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode) {
switch(sym) {
case SDLK_UP:
cCamera::cameraControl.onMove( 0, 5);
break;
case SDLK_DOWN:
cCamera::cameraControl.onMove( 0, -5);
break;
case SDLK_LEFT:
cCamera::cameraControl.onMove( 5, 0);
break;
case SDLK_RIGHT:
cCamera::cameraControl.onMove(-5, 0);
break;
case SDLK_ESCAPE:
surf_Display = SDL_SetVideoMode(W_WIDTH,W_HEIGHT,32, SDL_HWSURFACE | SDL_DOUBLEBUF);
break;

default: {
}
}

}


.... is this safe though? I mean I am reassigning the surface which is currently displayed, surely I must do something else, like FreeSurface it first?


4) What is the best place to find seamless, 2D tilesets and graphics?


5) How do you create a 'zoom' effect, something like Supreme commander?


Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I think what you want when you refer to Pharaoh and Age of Empires is an Isometric view.
I've never done it myself but there is a forum on this site so they might help if you have specific questions.

The HUD/ MiniMap is normally over-layed on top of the other draw items. I have done it in openGL by switching to 2D orthographic projection and drawing my HUD images and text.
Basically I think you just want to draw images and text on top of your other graphics.

For 2D tilesets and graphics I would suggest google for non-specific (such as 'grass tileset' google images) or make it yourself / be-friend an artist for specific graphics.

Not too sure if any of that is any help but there you go. :-)

Cheers

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!