Jump to content
IGNORED

Need Help. Check Position before collision with playfield.


Recommended Posts

I will make a little car racing game. would like to check position before the car collides with the playfield. Whats the best way to do this? 
I don't calculate the coordinates for pfread. My car is 8x8 pixel and playfield had 32 lines.

 

How can help me?

 

 

CarCollision.bas

Edited by Erik Zimmermann

* Use pfread

 

or

 

* Put a missile or ball just ahead of the player at the tip that's moving forward.  Check the collision of that instead of the player sprite.  Note that the missiles and ball are always going to be smaller than the player sprite so it's not complete collision detection that way.

i will use pfread.  In the future, i will make a enemy AI.

the car moves independently on the map.
It doesn't touch walls. It finds free space to move. Maybe it haunts me too.

CarCollision.bas

Edited by Erik Zimmermann

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...