I finally readjusted my sidescrolling car driving example to make use of the new Physics Joint behavior. The result has a bit less bouncy suspension than I would want, but it’s a tradeoff between that and having the wheels of the car able to fly all over the place upon colliding with the ground.
The ground is randomly generated by spawning a combination of square and round blocks.
Anyways, you can drive until your device is unable to run the game anymore due to there being too many ground objects spawned in (yes, they are disabled when offscreen and it still lags out eventually).
… The player is always trying to flip backwards.
Other than that, I LOVE IT ALREADY!
Yeah, it’s supposed to make the car do a bit of a wheelie when you hold forward, but I may need to tone that down even more. Thanks for the feedback
Try increasing the front wheel’s density, that might help.
Also, unless the car is rear-engine or a motorcycle, there isn’t much of a chance of doing a wheelie.
True, I only created that mechanic in the first place because without it, the game was way too easy.
Oh, I guess. It’s still very fun though!
Thanks, and nice job getting the second place score!
Thanks, but I don’t think 1st will last long.
213,000.
I got 8th place GG
Wow, I couldn’t even get that far back before I added the tilting mechanic, nice job!
I had to go on an average of 20 Speed. I tried “Flooring it”, and I only got to 30,000.
Then what do you know, Jake beat me.
I thought I was going to get the to win, but then I realized that all the other players had a digt on top of mine.
Lol, welcome to my world.
So now flipping gives you bonus points (though the system has some bugs and will occasionally think you flipped when you didn’t…but at least it works)
The amount of points you get for a flip scales with the difficulty you chose (easy=fewer points, hard=more points).
Also, I implemented a collectible fuel mechanic, so you lose if you run out of fuel. This is so that there is more incentive to actually keep driving forwards over the terrain (and to prevent someone from just repeatedly flipping when they find a convenient area)
You burn more fuel on hard difficulty and less fuel on easy difficulty.
Anyways, besides fixing the flip bug, I don’t have any plans to add more stuff to this game, since after all, it’s just supposed to be an example of what’s possible in Flowlab now. So feel free to copy anything here and make your own game out of it.
what about adding airtime?
That’s a good idea; detecting if a wheel is touching the ground seems to be finnicky depending on how the car lands, but I’ll give it a shot…
You could use a proximity or two raycasts, one for each wheel?
I’ve been using a Proximity, but if I make the check distance too short, it doesn’t always trigger when it should, and if it’s too long, then it starts becoming an inaccurate measurement of when the car is actually in the air.
In other words, I’m trying to find the right balance.
What did you have in mind with Raycast?