Jump to content
  • Advertisement
Sign in to follow this  
massive-war

How can I post a game?

This topic is 4665 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

Advertisement
Guest Anonymous Poster
google.com

Share this post


Link to post
Share on other sites
here's the link. It's a 1.3 mb rar file

Clicky!

Anyways, I did some graphical work to try and determine what I want my character to look like (while animated)

Controls are as follows:

-standard 'wasd' keyset
-Left Ctrl attacks
-can use combinations of wasd to move diagonally (there's 8 directions total)
-tapping 'r' will make the character run, and tapping 'r' again will make him walk--you can do this repeatedly

so I have a couple questions:

1)if you mess with it enough you'll notice some flickering between animation frames. I'm not sure what's causing this, but I thought I'd ask

2) Say I wanted to add collision detection for only the sword. How would I go about doing that? Do I have to learn all that vector crap and see if the vector is in contact with an enemy?

3) isometric tiles.... I've done 2D before, but doing animations for isometric is something new. CAn you recommend anythign to help me make my tileset isometric (books, articles, anything)?

Thanks,

Massive-war

Share this post


Link to post
Share on other sites
Your character didn't show up until I pressed one of directional keys. At first I had thought it weren't working.

Quote:
Original post by massive-war
1)if you mess with it enough you'll notice some flickering between animation frames. I'm not sure what's causing this, but I thought I'd ask


OpenGL itself doesn't support VSync-ing, but one of it's extensions does. You may follow this link for an introduction of wglSwapIntervalEXT extension. For OpenGL extension manager, you may try GLee.

Quote:

2) Say I wanted to add collision detection for only the sword. How would I go about doing that? Do I have to learn all that vector crap and see if the vector is in contact with an enemy?


I guess it is the way to go, you may predefine sets of convex polygon with each sprite. They don't need to be extremely precise. For tutorials on 2D polygon collision detection, I find Oliii's tutorials suits your need.

Quote:

3) isometric tiles.... I've done 2D before, but doing animations for isometric is something new. CAn you recommend anythign to help me make my tileset isometric (books, articles, anything)?


You may find a lot on [google] with "OpenGL" "Isometric" "Tutorial" (sort of) keywords. JTippetts made a tutorial on this topic.

Share this post


Link to post
Share on other sites
Wow, that was all the information I need. Thank you skeleton.

As for the OpenGL part: I'm currently using only SDL. I guess I just wanted a basic animation system going so I had something to show in the minimal space.

I just dont' knwo what system to use. I mean, DirectX has so much stuff, yet it's so confusing to use in an actual game (in my opinion, but then again I haven't really worked with it). Is OpenGL like SDL where you basically use the API within the game, rather than use the game within the API?

Although, my guess is that DirectX is like beginning programming. YOu don't get good at actual game programming until you've actually programmed games, rather than reading books again and again.

Is DirectX really like that? Is it easier than it looks?

Massive-war

Share this post


Link to post
Share on other sites
Flicker can occur if you're drawing your SDL_Surface to the screen more than once per game cycle (note that I haven't checked out your executable, so I can't say with authority that that's what's occurring). Your main loop should look something like this (working from memory here since I don't have my code handy):
while (true)
updateAllObjects();
screen->drawBox(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0x000000); //Draw black box to screen
drawAllObjectsToSurface(screen);
SDL_Flip(screen);

Er, that's almost certainly wrong somewhere in there. But anyway, assuming you're using SDL_DOUBLEBUF, you should only be calling SDL_Flip once per main loop. If you call it twice (e.g. once after wiping the screen surface to black and once after drawing all the game objects) then you'll get flicker.

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!