4 Replies - 10859 Views - Last Post: 06 May 2008 - 10:47 AM Rate Topic: -----

#1 skater_00  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 12
  • View blog
  • Posts: 256
  • Joined: 30-April 08

Make character sprites walk on level map (background)

Posted 30 April 2008 - 10:49 AM

For our C++ project at school, we have to create the first level of an existing arcade game that has a MAME rom available. I picked Sonic The Hedgehog 2, but that is actually unnecessary information in this case.

Right at this moment, I am encountering a first serious problem: you have character sprites (Sonic) and you have the level map as "background". How can you make your character walk, run, jump, walk against walls, fall in holes, etc. ON that level map as if he is actually really walking ON it.

I have Googled all over the place but I have no idea how to start or how to do this in general. I would not even know the name of the principle of making your character sprites walk on the "background" (level map).

Giving me a head start would be greatly appreciated.

Thanks in advance!

Note: Making the character sprite walk, run, jump, etc. is NOT my problem. Read my post again if you have misunderstood anything.

This post has been edited by skater_00: 30 April 2008 - 11:06 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Make character sprites walk on level map (background)

#2 .Maleficus.  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 129
  • Joined: 07-March 08

Re: Make character sprites walk on level map (background)

Posted 30 April 2008 - 06:35 PM

This ought to give you a start, or at least an idea of the approach you need to take.

http://www.gamedev.n.../article735.asp
Was This Post Helpful? 0
  • +
  • -

#3 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3101
  • View blog
  • Posts: 19,141
  • Joined: 14-September 07

Re: Make character sprites walk on level map (background)

Posted 01 May 2008 - 12:04 AM

Sprites also have a Z-Order, in the case of sonic, the ramps, spikes, and circle things you roll around in are most likely sprites instead of the bitmap background so you can have collision detection and "pass" in front or behind "objects".
Was This Post Helpful? 0
  • +
  • -

#4 skater_00  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 12
  • View blog
  • Posts: 256
  • Joined: 30-April 08

Re: Make character sprites walk on level map (background)

Posted 06 May 2008 - 09:09 AM

View Post.Maleficus., on 1 May, 2008 - 03:35 AM, said:

This ought to give you a start, or at least an idea of the approach you need to take.

http://www.gamedev.n.../article735.asp


After trying to figure this out for a few more days, it is still not very clear to me. So actually it is all about collision detection? Does that mean I would have to create hitregions for every possible piece of ground on the map that the sprite can run on?
Was This Post Helpful? 0
  • +
  • -

#5 bobjob  Icon User is offline

  • D.I.C Head

Reputation: 23
  • View blog
  • Posts: 163
  • Joined: 29-March 08

Re: Make character sprites walk on level map (background)

Posted 06 May 2008 - 10:47 AM

You will defently need some sort of collision information. for a 2D platformer, i personally think, Point to line equation is best.
so you can have a character walking up diagnal walls. also really neet with gravity physics, slipping down diagnals and such.

if your in a rush to get a game finished, just go with basic point to box collisions. character will prob need to jump /drop to go up/down a level though.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1