The Daily Click ::. Forums ::. Klik Coding Help ::. Car game
 

Post Reply  Post Oekaki 
 

Posted By Message

eski



Registered
  20/09/2009
Points
  39
9th December, 2009 at 16:00:47 -

I'm wondering what is the best way to make a top view car game, the simplest 2d car game you can think of.
I have some textures that i can put together on the grid but i dont want the car to be able to drive off the road.
Is there any way to draw lines on the edge of the road so the car will bounce if it hits it ?



 
n/a

bigredron



Registered
  07/04/2007
Points
  299
9th December, 2009 at 23:43:33 -

Probably the easiest way to do this would be to draw invisible (or visible) borders around your tracks and test for collisions between them to prevent your car going off the road.


 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
9th December, 2009 at 23:50:47 -

Check this example file. It's the sample game "Racing Line" from knp.

I've converted it to mmf2 for your convenience.

http://www.jsoftgames.com/rac_disk.zip

 
n/a

eski



Registered
  20/09/2009
Points
  39
10th December, 2009 at 01:19:42 -

ahh.. thanks for that.. solved my problem.. for now at least ..

 
n/a

eski



Registered
  20/09/2009
Points
  39
10th December, 2009 at 03:37:09 -

arrrgghh...
going crazy here..

i have 10 markers around the map where there are randomly spawned power ups.
i'm using this code, the problem is that the power up dont always get destroyed. So they dont work..
Dont understand what it could be. I start the frame with Spreading value 0 on all the markers
and i have debugged this and all the numbers match..

Create power up:

+ Every 10"-00
+ Number of "Power up" <= 2
+ "Spawn place" Internal flag 0 is OFF
+ Pick one of "Spawn Place"
- Create "power up" at (0,0) from "Spawn Place"
- Set "Power up" Alt a = "Spawn Place" Alt A
- Set "Spawn Place" Internal flag 0 ON


Get power up:

+ "Spawn place" Internal flag 0 is ON
+ Collision between "Car" and "Power up"
+ "Power up" Alt A = "Spawn place" Alt A
- Add Gas on Car
- Destroy "Power up"
- Set "Spawn place" Internal flag 0 OFF



 
n/a
   

Post Reply



 



Advertisement

Worth A Click