Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Darksyde
21
Years of Service
User Offline
Joined: 13th Sep 2003
Location: Staffordshire, UK
Posted: 29th Oct 2003 18:16
ok say i have a 2d side scrolling type game, how would i go about creating the level? i mean the platforms etc for the player/enemies to walk on. this bit really confuses me, obviously iv got to draw them in etc, but im unsure of how to make it so the player actually interacts with it. ie. doesnt fall through the floor etc. any help would be appreciated, thanx



Athlon 2200 XP, 512MB RAM, Geforce 4 128MB
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 19:36
well if its 2d you need to make all your sprites, then test for their collisions. when the player is colliding with the floor then you would maintain his Y value to not let him travel downward, or thru the floor.

-RUST-
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Oct 2003 19:41
Use either sprites or planes to draw the different tiles of your game. Then you'll need to right some sort of collision for your character. Check to see if your character's position is within the boundaries of one of the map tiles.


ex.

cx = character's X position
cy = character's Y position

if cx > 0 and cx < 50 and cy > 0 and cy < 50 then HIT

If the above statement returns true, then the character is within the boundary of 0,0,50,50.

You could also look up info on parrallax scrolling, for drawing your map.
Darksyde
21
Years of Service
User Offline
Joined: 13th Sep 2003
Location: Staffordshire, UK
Posted: 29th Oct 2003 22:28
thanx for the response. do u reckon it might be a good idea to draw my map out on squared paper or something, and work out all the areas i dont want the player to be able to move through first?



Athlon 2200 XP, 512MB RAM, Geforce 4 128MB
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 30th Oct 2003 10:27
planning is always good!


Go on, click on my signature image, you know you want to
Favourite smiley>>>

Login to post a reply

Server time is: 2024-11-25 14:41:55
Your offset time is: 2024-11-25 14:41:55