Car racing game with gear shifts
-
Perhaps you could have something like this:
c = controls(0) oldc = c currentRPM = 0 currentGear = 1 loop clear() c = controls(0) if c.a then currentRPM += 1 endif if !c.a then currentRPM -= 1 endif if c.up and !oldc.up then currentGear += 1 if currentGear == 2 then stopChannel(0) playAudio(0, carSFX, 1, 0.5, 1, -1) else if currentGear == 3 then stopChannel(0) playAudio(0, carSFX2, 1, 0.5, 1, -1) endif endif endif oldc = c update() repeat
Where the A button is the gas, and the Up button is shift up a gear. You could use different sounds for the car, or change the play speed of the same sound. Then just do this for all of the gears, and do the opposite for shifting down. I hope this helps.
-
I was thinking of having ZR be the gas button and A and B for the gears, but I'm also trying to make other things for my games, like a race track map. I'll try out some of your suggestions though, to see how they work 😉
-
@zeldagamer22 Sorry I think I accidentally rejected one of your posts. Until you have a reputation of 10 (likes) your posts have to be moderated and I clicked the wrong button
-
I have to get a map and car working for my racing games but I'm a bit stuck :(
-
How could I test the gear shifting with an already made game, so I could see how it works and fine tune the shift system? Making a game from scratch is quite difficult for me
-
What are you having trouble with? Also, you can check out the Fuze Arena tutorial videos on Youtube, they are quite helpful.
-
I'm having trouble getting the game started and getting the car and map to show up.
-
Maybe this will be useful:
https://fuzearena.com/forum/topic/1634/car-driving-engine -
I can't download that to look at the code...
-
@zeldagamer22 It seems to have been unshared. I will see if I can get them to share it again