This package is an implementation of some of Martin Jonasson & Petri Purho's "Juice It Or Lose It" features in Love2d.
This was built in a week or so. The goals were:
- To be an exercise in learning about game development and more about lua and love2d. The approach was to look at a number of the interesting features in the Juicy game, and try to figure out how to implement them in Lua / Love2d without directly porting code.
- To provide some readable, reasonably organized concrete examples of doing these sorts of Juicy features. I'm not Flash-literate, and after watching the Juice It video and started looking at the code, I had a hard time seeing what was what and what was happening where -- this was built with the goal of making the logic of what is happening more straightforward.
All code comes without guarantees and is probably at its core ripped off from somewhere else.
Overview of Code
The basic framework of the game is a basic Entity-Component framework inspired by Artemis and posts by Adam Martin. Just about everything in the game is an Entity; every data attribute is packaged in a Component; and everything that happens to update or react to those Components happens in a System. For a basic overview of the theory behind this, check out this post.
All of the (relatively) generic / reusable code is in src/shared. (What is there is a subset of some of the shared libraries I have in my main love repository.) All of the game-specific code is in src/games/juicy. The build script copies all of this into a build directory and zips it up into a .love file.
Directories are organized to make it easier to have multiple game projects, even though there is just one here. To build after any chanages, run:
This script will build and automatically run the .love package.
External Things Used
- Middleclass by Kikito
- Indonesian Chiptunes from the Free Music Archive
- Press Start 2P font.
- Lua implementation of Robert Penner's Easing Functions
- SLAM and port of HUMP Vector class by Matthias Richter
- UUID implementation by Thijs Schreijer