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.

2D All the way! / Collision System for a platform game?

Author
Message
Blue Shadow
21
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 1st Apr 2004 22:57
Hey! I just wondered how you would do a collision system for a platform game and how you would draw the images. Would you just draw the whole level as a picture and then draw invisible lines on the top or would you create a tile system. I also wondered how you would go about coding the collison bits.I tried using the sprite collision command but he just jumps through the bottom of the platform.

Any help at all would be greatly apreciated,

Michael

PS. Does anybody know any good tutorials on tile systems. Cheers!

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 2nd Apr 2004 00:54
Although platform games usually use tiles, and array collision, you could also use sprites for platforms if you wanted to.

Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 2nd Apr 2004 01:55
I'm doing a remake of the Datasoft classic "Bruce Lee" which of course will use platforms - I'll be using arrays for the boundaries and floors so if I get anything working soon I'll post the code here - in the meantime good luck - and if you work something out post it here so I can benefit

glint
21
Years of Service
User Offline
Joined: 9th Feb 2004
Location: the Synth
Posted: 2nd Apr 2004 03:37
If you want to have levels that will scroll, I advise that you do not use the level as a single image. In my experience, large bitmaps slow things down dramatically. Instead, create a tilesheet and an algorithm to paste certain pieces of it to the screen. A level array with numbers corresponding to locations on the tilesheet could accomplish this.

A separate array could hold positions for walls, or whatever would cause collisions. These would not be sprites, just virtual points. It is easy to check to see if two points (ie, your character sprite and your wall object) are in collision proximity by checking the distance between them on the x axis and on the y axis.

I hope this makes sense. I'm not good at explaining things
Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 2nd Apr 2004 03:56
Makes perfect sense to me - which means you must be good at explaining things

Blue Shadow
21
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 2nd Apr 2004 11:08
Thanks for you help. I'll try that.

Visit the Code Monkey's website at http://www.freewebs.com/codemonkeystudios

Login to post a reply

Server time is: 2025-08-09 02:12:50
Your offset time is: 2025-08-09 02:12:50