A Game of Drones by TD5
Program a Defence Drone to protect yourself from the evil attackers. There's no direct control, only the forward-thinking and logic you feed into your program - this is your real weapon.
You write your code on the left side of the screen, click the red button and then see the battle play out on the radar display on the right.
The red and orange blips are enemies, and the green blips are friendly. The lighter green blip is the Defence Drone that your program controls, as you can tell by its label, which also shows its remaining health.
Each line is an action which your drone will do if the check after the 'when' check passes. The first line to pass its check has its action executed. Each time your drone wants to do something, it will consult your program, and do nothing if none of your rules apply.
The source code is made up of multiple lines, each line of the form:
when
If you try to run an invalid program, the game will complain at you once the drone queries its program, telling you the offending line. The drone is very picky, so having two spaces between parts of your commands or an extra space at the end of the command will make it break, so pay close attention to the error message.
The current checks are:
'always' which always applies
'isWithin' which takes a type of object (edge/enemy/friendly), distance (integer) and an optional direction (north/south/east/west) and checks to see if an object of a given type is within the given distance (and maybe also in the given direction)
The actions are:
'fire' which takes a direction
'move' which takes a direction
'wait' which takes no parameters
Example program:
fire north when enemy isWithin 25 north
fire south when enemy isWithin 25 south
fire east when enemy isWithin 25 east
fire west when enemy isWithin 25
move south when edge isWithin 2 north
move north when edge isWithin 2 south
move east when edge isWithin 2 east
move west when edge isWithin 2 west
move south when always
This is an HTML5 game written in Elm. I didn't get as much done as I would have liked, so the game is missing a good introduction/tutorial and the parser isn't very forgiving, especially in terms of whitespace.
You write your code on the left side of the screen, click the red button and then see the battle play out on the radar display on the right.
The red and orange blips are enemies, and the green blips are friendly. The lighter green blip is the Defence Drone that your program controls, as you can tell by its label, which also shows its remaining health.
Each line is an action which your drone will do if the check after the 'when' check passes. The first line to pass its check has its action executed. Each time your drone wants to do something, it will consult your program, and do nothing if none of your rules apply.
The source code is made up of multiple lines, each line of the form:
If you try to run an invalid program, the game will complain at you once the drone queries its program, telling you the offending line. The drone is very picky, so having two spaces between parts of your commands or an extra space at the end of the command will make it break, so pay close attention to the error message.
The current checks are:
'always' which always applies
'isWithin' which takes a type of object (edge/enemy/friendly), distance (integer) and an optional direction (north/south/east/west) and checks to see if an object of a given type is within the given distance (and maybe also in the given direction)
The actions are:
'fire' which takes a direction
'move' which takes a direction
'wait' which takes no parameters
Example program:
fire north when enemy isWithin 25 north
fire south when enemy isWithin 25 south
fire east when enemy isWithin 25 east
fire west when enemy isWithin 25
move south when edge isWithin 2 north
move north when edge isWithin 2 south
move east when edge isWithin 2 east
move west when edge isWithin 2 west
move south when always
This is an HTML5 game written in Elm. I didn't get as much done as I would have liked, so the game is missing a good introduction/tutorial and the parser isn't very forgiving, especially in terms of whitespace.
| Web | http://td5.github.io/LD32/ |
| Source | https://github.com/TD5/LD32 |
| Original URL | https://ludumdare.com/compo/ludum-dare-32/?action=preview&uid=39783 |
Ratings
| Coolness | 68% | 3 |
| Overall | 2.51 | 1047 |
| Fun | 2.08 | 1082 |
| Graphics | 1.66 | 1079 |
| Innovation | 3.91 | 85 |
| Mood | 1.90 | 1020 |
| Theme | 2.78 | 920 |
For now i always generate errors, but i'm gonna retry :-)
Nice job!
So maybe trim your input and it is bit easier to get into.
Extra points for the theme approriate gfx :)