# Racing

• 05-25-2006, 05:53 AM
TPTaylor
Racing
Ok, I haven't really done much lately, because exams and things, but once they're over i plan to make a simple racing game.
At the moment, i'm still thinking about how i will do it.
I have devised a way of doing the track, but i'm still not quite sure if it will work. So basically, I'm asking you guys if you know if it will work.
What i am doing is using maths to come up with equations, these equations will all fit together along with inequalities etc to decide where the player can drive. For example i would put y = 2 for the start line. And if they cross it, then they win or whatever. Or the boundary is (x^2)+(y^2)=50 . I remember a graph program a while ago, and just wondered if i would need to work with that, or if lua can do it itself?
• 05-25-2006, 06:07 AM
Grimfate126
Quote:

Originally Posted by TPTaylor
Ok, I haven't really done much lately, because exams and things, but once they're over i plan to make a simple racing game.
At the moment, i'm still thinking about how i will do it.
I have devised a way of doing the track, but i'm still not quite sure if it will work. So basically, I'm asking you guys if you know if it will work.
What i am doing is using maths to come up with equations, these equations will all fit together along with inequalities etc to decide where the player can drive. For example i would put y = 2 for the start line. And if they cross it, then they win or whatever. Or the boundary is (x^2)+(y^2)=50 . I remember a graph program a while ago, and just wondered if i would need to work with that, or if lua can do it itself?

are you planning to make it a top-down view, or a 3d view??
• 05-25-2006, 06:51 AM
TPTaylor
Top down. Would be a bit much to ask of lua for that. Although, it could be a bit inbetween, if the drawings were drawn 3d.
• 05-25-2006, 07:34 AM
youresam
Quote:

Originally Posted by TPTaylor
Top down. Would be a bit much to ask of lua for that. Although, it could be a bit inbetween, if the drawings were drawn 3d.

Heres a suggestion:
Make the car 2D and the view is from behind (like modern racing games), then draw a 3D track and move the track around instead of the car.

Drawing the tracks should be simple, the hardest part would be to come up with a formula for the turns. And I guess this idea completly ruins having other players...gah....nevermin d.
• 05-25-2006, 07:36 AM
TPTaylor
Quote:

Originally Posted by youresam
Heres a suggestion:
Make the car 2D and the view is from behind (like modern racing games), then draw a 3D track and move the track around instead of the car.

Drawing the tracks should be simple, the hardest part would be to come up with a formula for the turns. And I guess this idea completly ruins having other players...gah....nevermin d.

Agreed, it would be pretty hard to come up with the turning. I suppose i could make an arcade game where you have to get to a certain point before the time is up. The only slight problem with that, is that either there would have to be millions or backgrounds, or one background, which has maybe 5 different objects getting closer and closer. It would still be quite hard to get the turns etc.
• 05-25-2006, 10:51 AM
youresam
Quote:

Originally Posted by TPTaylor
Agreed, it would be pretty hard to come up with the turning. I suppose i could make an arcade game where you have to get to a certain point before the time is up. The only slight problem with that, is that either there would have to be millions or backgrounds, or one background, which has maybe 5 different objects getting closer and closer. It would still be quite hard to get the turns etc.

Well, maybe you should make it like the old gameboy racing games.
Birds-eye-view, and hold X to go, O to brake. Then, make it like that golf game, have 2 images of the track: The actual image, and a never-seen image that contains the location of the track based on black and white pixels. Then, compare the car to it to see if its on the track. You could easily incorperate a scrolling camera. Hmm.... sounds like fun. If you dont want to, I will :mrgreen:
• 05-25-2006, 02:02 PM
TPTaylor
Perhaps a team effort? I still feel like a challenge. And you seem to have more wisdom than me.
• 05-25-2006, 05:06 PM
agashka
well i can help you, check my post about GTA2 lua, i got that thing working , you rotate the car with arrows , then perform Sinus/Cosinus opperation to get dirrection from angle
• 05-26-2006, 01:26 AM
TPTaylor
Quote:

Originally Posted by agashka
well i can help you, check my post about GTA2 lua, i got that thing working , you rotate the car with arrows , then perform Sinus/Cosinus opperation to get dirrection from angle

It's more the race track I'm thinking of at the moment, so it knows when the player has hit the edge.
• 05-26-2006, 07:45 AM
agashka
well, i've got collision working so far, if thats what you mean.
• 05-26-2006, 03:54 PM
slicer4ever
yoursam what does the egg represent?