Endless Driving (2D Sidescrolling Car)

Actually, what is wrong with collision? I was saying, maybe a raycast at each wheel, facing down, if one hits, then it means it is on the ground.

1 Like

Ah ok, raycasts could work in that case, however collision would only work to detect when the car hits the ground, not when it leaves it. But I like your raycast idea, I think I’ll try that next

1 Like


Goodbye Jake!!!

(I did this on normal mode. Five Flips, average speed of 22.)

1 Like

Woah, nice job! That’s pretty crazy

1 Like

It took me 20-30 minutes straight, lol!

1 Like

How was the performance by the end? (framerate, etc.)

1 Like

I don’t know the specific fps, but it was getting a bit slow after about 200K. Maybe make the road objects get deleted after they’re a certain distance from the player.

1 Like

Hmm alright that’s interesting.
The ground already does have all its physics disabled when not on screen, but I think if there’s another significant performance increase to be had, you’re right, it would have to involve deleting objects after they are a certain distance away.
I guess now that fuel is a thing, I could try and calculate how far back you could go before running out, then delete anything before that.

1 Like

Maybe use the inview behavior? Once it is,and gen it is back out, it deletes itself?

1 Like

A good thought, but then if you go backwards, you would fall off the map…

2 Likes

Oh my gosh. Flipping on hard mode is so easy! But there are a few downsides to using hard mode:
1: The SUV in the game goes from a Honda CRV, to a Volvo, to a SUBARU! (The MPG goes down!)
2: You do more wheelies in hard mode.
image

2 Likes

Haha true, that’s a fun little analogy for it.

In case you're wondering, here are all the differences between difficulties

On Easy:
-your score is multiplied by 0.5 (obviously).
-the car burns fuel at at half the rate (-1 fuel per frame W/S is held)
-the car does not tilt back/wheelie at all while holding W/S
-the hills are much shallower (+/- 30 degrees)
-flips give you only 5000 extra points each
-an airtime of more than 20 frames gives you only 0.5x the score (which is determined by the amount of airtime frames x100)

On Medium:
-your score is multiplied by 1 (it is the same as before I added difficulties, so this is the mode the game was in if you played it before then)
-the car burns fuel at a normal rate (-2 fuel per frame that you hold W/S)
-the car tilts back/wheelies a little while holding W/S
-the hills can slant at +/- 44 degrees
-flips give you 10000 extra points each
-an airtime of more than 20 frames gives you 1x the score (which is determined by the amount of airtime frames x100)

On Hard:
-your score is multiplied by 1.5
-the car burns fuel at 1.5x the normal rate (-3 fuel per frame that you hold W/S)
-the car tilts back/wheelies a lot while holding W/S
-the hills can slant at +/- 60 degrees
-flips give you 15000 extra points each
-an airtime of more than 20 frames gives you 1.5x the score (which is determined by the amount of airtime frames x100)

2 Likes

Yeah, my high score on flips is 15 in one game.

1 Like

Which is pretty impressive! I wish there could be multiple leaderboards per game…

1 Like

Ok Kasamir, I have added extra points for airtime. What do you think?

Also, I cut the starting fuel amount (so you start with 600 fuel). You can still collect up to 1000 fuel, you just start with 600. I feel this is necessary because it’s so much easier to get points now.

4 Likes

image

3 Likes

Hehehe…
image

3 Likes

Haha nice job, always awesome seeing people beat me at my own game (it means it may actually be a little bit fun…?)

4 Likes

Yeah!

1 Like

It’s the most fun example I have ever played.

1 Like