Light Bikes 2.0 -- Now featuring a (really bad) singleplayer bot!
Don't hit a light wall!
This is the first game I've made 100% on my own.
Player 1: Arrow keys and z
Player 2: sedf and TAB
Pressing z/TAB will send the bike flying forward allowing the player to pass through a light wall.
After you dash, your bike needs to recharge. Your dash meter can be found at the top of the screen.
-A singleplayer game mode
-Changed the menu logo to look a bit cleaner.
-Expanded on the menu music
-The boost meter wasn't perfectly centered. The orange side was larger than the blue side. This has been fixed.
-Added dash marks on the boost meter.
-Made it so that you can either replay the current game mode or return to the menu from the game over screen.
@dw817 I've posted my new cart with my first attempt at making a bot brain. It snakes around the arena for a bit and crashes in on itself. I know that I need to add a condition to check if the turn it's about to make will cause it to crash into a wall, but I'm at a loss for fixing the rest of the pathing issues. Do you have any ideas? My if/elseif setup does prioritize a counterclockwise set of turns, but I'm not sure how I'd go about making the movement more natural and less tight. I found expanding the range of the spaces the bot is allowed to look at causes the shape to clean up a little bit, but it still makes the snake pattern.
Thanks for the help.
The method I used was a pretty simple one. While I'm certain a more complex method can be reached, the one I wrote back in QBASIC would have each opponent scan around them in 4-directions.
It would then choose to go in the direction that has the most space, that is it would choose to move in the direction where an obstacle was the furthest distance away.
I think I can make a sample program to demonstrate this ... I'll write back when done.
Try this. Understand the opponents are passive, that is they do not actively seek out to attack the player or even each other. They merely seek the longest distance between points and follow that path.
HOPE THIS HELPS !
[Please log in to post a comment]