A game made for Lisp Game Jam 2017 (Easy Mode).
In the game you play as a “dog” whose task is to protect and herd a flock of sheep. The sheep will roam around the gameplay area, looking for food, and trying to avoid wolves and your character. After sheep are fed, you need to secure them by escorting them to the top part of the gameplay area. You need to save at least half of the flock to win a level.
The game employs a flocking algorithm for both sheep and wolves.
Clone this repository, and Parendeck2D. Ensure both are visible in your Quicklisp’s local projects (e.g. by symlinking those repositories in ~/quicklisp/local-projects).
Start your Lisp from the root directory of this game, and execute
After that, run
I’ll add binaries for Windows users when I figure out how to reliably deploy them.
- Left, Right - turn the player character
- Up - accelerate
- Down - slow down
- F5 - toggle showing debugging information for flocking algorithm
- F6 - toggle showing sight ranges of wolves and sheep
- F7 - while holding it, you can use left mouse button to place a sheep, right mouse button to place a wolf, and middle mouse button to place a food pellet
Sheep want to eat food pellets. Eating two will turn the sheep white and enlarge it; this indicates that it is ready to be evacuated.
Wolves want to eat sheep. You lose the game if wolves eat more than half of your sheep.
Eating, in both cases, takes time, during which the wolf/sheep won’t be moving much.
Both sheep and wolves are driven using a flocking algorithm. They’ll group together within their respective species, chase food when hungry, run away from danger, and - most importantly - run away from player character. This last thing is what gives you the ability to direct sheep and chase away wolves.
All entities have limited sight range, so they’ll only notice friends, food and danger in close proximity.
To view the realtime computation performed by entities, use F5 key. To see the sight ranges, use F6 key.
Game doesn’t work - crashes, throws exceptions, etc.
E-mail me. If you can find
engine.log file somewhere around the game directory,
please send it to me too.
Game seems not able to find assets
Verify your Lisp’s working directory is set to root of this repository. In Emacs / SLIME, you can use “,cd” in REPL to change the working directory.
Game runs slow
The code is pretty crappy (happens when writing in a hurry to meet the contest deadline), so it’s nowhere near possible peak performance. I might optimize it in the future if there’s interest.
To help me do that, please find and e-mail me the file
perf-report.html. Also if you’re using
SBCL, try and run the game with
(ljgame:run-with-profiling), and send me the file
This game’s background was composed with assets from Tiny16 pack by Sharm.