Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Greetings, am working on an endless car game in CC 6 so how to create a traffic system where my player will have to avoid hiting other cars going to and fro on my endless highway. |
||||
|
The most basic method is set the car model to 'fly in a line' and start again when it reaches the end. A slightly more advanced method is to follow a path,. You could also code the ai to move depending on proximity to player/other traffic. |
||||
|
Are you talking about something like this? |
||||
|
Yes |
||||
|
new object wrote: Are you talking about something like this? Can I play this? Looks fun! |
||||
|
Here are all the project files. I've written a really basic concept of this mechanic, so it's better not to use it for a real game. However, if you need to understand the basic principles of a drag racing game like this one, the files in this archive will help you. https://drive.google.com/file/d/... And remember that I wrote this example really quickly without considering complex problems and without using comments in the code. So, if you're creating a game like this one, I can create a real project with complex code, including comments and an example project, to make it really easy for anyone to create a racing game like this one. |
||||
|
Am interested please create the project for me. How did you create the endless highway i relly like it. |
||||
|
Please how do i restart the game when car crashes. I have tried putting when clicked on do something behaviour on a 2d overlay item, but when i click on it it do not restart the game/scene instead it restart it at the same point with nothing moving. Just the way it was when the car crashed only that the cars gets reposition. |
||||
|
Hi future_k, look my games in itchio, I made something like this! https://andgameplay.itch.io/road... I used follow a path to the road stay in looping and about the traffic I used the action "shoot", so in the front of the road the cars is shooted like "bullets"! :) |
|