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! / Platform collision : help needed:)

Author
Message
Oraculaca
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: Scotland
Posted: 13th Mar 2003 20:33
lo folks,
Ive been working on my first reasonable scale project and it is a basic platform game. I have sussed out a good collision system for landing on and hitting the underside of platforms but detecting if the player hits the sides of them is more of a problem. The following code determines if the player is about to hit the left hand side of a platform and assigns it a hit_left value however it only seems to work for about 80% of the platforms in my test map. The remainder i can just pass right through. These platforms are consistent in their insolidity(is there such a word)on every run and are not related to the speed i try to run through them . Sorry for the length of the post but could someone help? im losing my sanity


REM detect contact with left side platform
for platform=1 to plat
cls

if player_height#>platform_y_coord#(platform)-10.0 and player_height#platform_x_coord#(platform)-13.0 and charposx#
Not-Mr-Thumpy wrinkled his nose, it was suddenly hard to concentrate
Oraculaca
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: Scotland
Posted: 13th Mar 2003 20:34
argggh code never worked

Not-Mr-Thumpy wrinkled his nose, it was suddenly hard to concentrate
Oraculaca
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: Scotland
Posted: 13th Mar 2003 20:36


Not-Mr-Thumpy wrinkled his nose, it was suddenly hard to concentrate
Oraculaca
21
Years of Service
User Offline
Joined: 6th Jan 2003
Location: Scotland
Posted: 14th Mar 2003 00:12
hmm ok .You can all stop replying in your thousands .Ive got it working but im still not sure how but as long as it works im not arguing , think im going mad though cause im talking to myself here

Not-Mr-Thumpy wrinkled his nose, it was suddenly hard to concentrate

Login to post a reply

Server time is: 2024-04-18 23:44:19
Your offset time is: 2024-04-18 23:44:19