Log In  

Cart #togasufiki-4 | 2019-08-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

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.

Controls:
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.

2.0 Changes:

-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.

P#66769 2019-08-19 00:00 ( Edited 2019-08-21 08:37)

Years ago I wrote a kind of 1-player turn-based light-cycle game where the player chooses the direction to drive per turn, and so do the opponents - adding an opponent each level.

The map and tiles were 40x25.

Think you can make an option for a 1-player game ?

P#66772 2019-08-19 03:24

@dw817 That's a great idea! I'll work on an AI right now.

P#66774 2019-08-19 04:07

Superb ! Let me know if you need help on the brain part of the opponent.

P#66783 2019-08-19 16:58

hype asf for this ai :3

P#66819 2019-08-21 02:10

That's one too many acronyms, Sol90, in English ?

P#66820 2019-08-21 02:36

@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.

P#66833 2019-08-21 08:44

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.

P#66840 2019-08-21 16:37

Cart #jisapaware-0 | 2019-08-21 | Code ▽ | Embed ▽ | No License

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 !

P#66841 2019-08-21 17:57

Noticed something else in trying your latest incarnation.

You'll see this is counted as collision for the player even though I hit the down key only and turned in time. This error can be reproduced.

P#66899 2019-08-24 01:06 ( Edited 2019-08-24 01:10)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-07 02:04:24 | 0.018s | Q:31