Looby: That's a bug. The actual driving I game I made took care of that problem and simplified the movement of the waypoints (this version uses trig functions, which is overkill).
Note that I used trig functions to make the waypoints go back and forth smoothly, but that takes a lot of processor time, so I think it is much easier to use the glide block and just go back and forth.
I edited it really quick.. It may be a little buggy.
(link to project)
sorry... I was going fast and didn't know how to make the sprite turn correctly while driving... so I used the old marble racer sprite
Good work. I am juging the things in my new gallery THE SCRATCH GALLERY and the best will get there work on my website WWW.EGEmedia.co.uk with a mention about you and your work but I will need your 1st name and your work will have a reamake by me, a love it from me, It will be added to the EGEmedia public gallery plus It will go on my favorets.
Note that the movement of the waypoint circles is very simple, and just uses one trig function to make it go back and forth smoothly. The same movement would be very useful in tgames you are making.
Very nice....now I'm starting to get a little motion sick from watching the waypoints go back. and forth. and back...Seriously though, a very simple and elegant solution. I was starting down Jens' path when you came up with this beauty.
Brilliant! I didn't even think of (simple) waypoints to accomplish AI when reading the forum question, since I was so preoccupied about letting sprite-robots 'sense' their way around checking for overlapping colors and adjusting their direction accordingly that the more elegant solution didn't even occur to me. Cool! Now, could you make some more levels, please !
Awesome, and a very quick response to the forum question. I imagined waypoints that changed each level, or each lap, but the waypoints in motion idea is even better...
Another thing that could be improved, right now it only heads toward the next waypoint when it hits the previous waypoint. It would be smoother if it switches waypoints when Distance to [waypoint] is less than some number.
A test project in response to freddie-few's question in the forum about computer AI for race cars. This is a simple example where the car just follows a chain of waypoints that move back and forth. If you use more waypoints (at corners), it will look more realistic. The greater the waypoint movement, the more spastic the AI driver is.
Comments
You need to be logged in to post comments
Add a Comment
Looby: That's a bug. The actual driving I game I made took care of that problem and simplified the movement of the waypoints (this version uses trig functions, which is overkill).
(view all replies)Comment Reply
Have you noticed that the waypoints always move closer towards the center after a while? The car began driving on grass...
(view all replies)Comment Reply
kool
(view all replies)Comment Reply
Great ideas in this project. I may remix some of it for my own racing game.
(view all replies)Comment Reply
make the waypoints draggable
(view all replies)Comment Reply
Spazy
(view all replies)Comment Reply
Spasy driver!!
(view all replies)Comment Reply
alright
(view all replies)Comment Reply
Note that I used trig functions to make the waypoints go back and forth smoothly, but that takes a lot of processor time, so I think it is much easier to use the glide block and just go back and forth.
(view all replies)Comment Reply
bla: that's another good way to do it.
(view all replies)Comment Reply
i used bumper control
(view all replies)Comment Reply
i did not use waypoint on my racing game
(view all replies)Comment Reply
I edited it really quick.. It may be a little buggy. (link to project) sorry... I was going fast and didn't know how to make the sprite turn correctly while driving... so I used the old marble racer sprite
(view all replies)Comment Reply
I'll try and mod it. I won't try and add more levels yet, until I understand how this actually works. :)
(view all replies)Comment Reply
Good work. I am juging the things in my new gallery THE SCRATCH GALLERY and the best will get there work on my website WWW.EGEmedia.co.uk with a mention about you and your work but I will need your 1st name and your work will have a reamake by me, a love it from me, It will be added to the EGEmedia public gallery plus It will go on my favorets.
(view all replies)Comment Reply
Note that the movement of the waypoint circles is very simple, and just uses one trig function to make it go back and forth smoothly. The same movement would be very useful in tgames you are making.
(view all replies)Comment Reply
you can zizins
(view all replies)Comment Reply
SWEET
(view all replies)Comment Reply
you can stop them
(view all replies)Comment Reply
Very nice....now I'm starting to get a little motion sick from watching the waypoints go back. and forth. and back...Seriously though, a very simple and elegant solution. I was starting down Jens' path when you came up with this beauty.
(view all replies)Comment Reply
Brilliant! I didn't even think of (simple) waypoints to accomplish AI when reading the forum question, since I was so preoccupied about letting sprite-robots 'sense' their way around checking for overlapping colors and adjusting their direction accordingly that the more elegant solution didn't even occur to me. Cool! Now, could you make some more levels, please !
(view all replies)Comment Reply
Awesome, and a very quick response to the forum question. I imagined waypoints that changed each level, or each lap, but the waypoints in motion idea is even better...
(view all replies)Comment Reply
Another thing that could be improved, right now it only heads toward the next waypoint when it hits the previous waypoint. It would be smoother if it switches waypoints when Distance to [waypoint] is less than some number.
(view all replies)Comment Reply
Before Paddle2See asks me for more levels, perhaps someone can mod the project to add a player race car...
(view all replies)Comment Reply