Sign in to follow this  

Animation in 2D Tile Based Game

This topic is 3935 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 have a map of tiles, that is about 12x12 tiles (32x32 pixel tiles) Right now I have a sprite of a player, and in my draw routine I just draw the player according to his X and Y (in Tile Coordinates [0,0] to [11,11]) That's all fine in dandy, but obviously the motion is very choppy, as the player is just jumping from tile to tile. What I would like to do is have an animation, where it switches frames (switches between 2 sprites to look like walking) and as well, appear that the sprite is sliding across the tiles...but one of the problems I run into is, the player cannot stop inbetween tiles, he has to travel the full 32 pixels to the next tile. I have tried to this a couple times now, and they all end up having about 50 global variables and 50 if statements. I'm wondering if there is an easy or good way to do this? If you don't understand what i'm asking, please post back and I'll explain it better or post pictures or something. [edit] BTW, i'm using C# and XNA [/edit] Thanks ArchG

Share this post


Link to post
Share on other sites

I would recommend checking out these resources:
http://www.gamedev.net/reference/list.asp?categoryid=44

Those resources will cover just about everything you need to know about the basics (and beyond) of tile-based games. Likely none of it will be in C#, but you really need the theory at this point. It can be tough going at the beginning, but if you stick with it you'll make it.

Share this post


Link to post
Share on other sites

This topic is 3935 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.

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

Sign in to follow this