Smiley is a 2D arcade-style, tile-based survival game built in Java. It started as a school project (world generation + rendering), and was extended afterward with rounds, enemies, combat, health, potions, and save/load.
- You spawn in a procedurally generated world (seeded RNG).
- Enemies (“entities”) hunt you by moving toward your position.
- Survive as many rounds as you can; difficulty increases as more enemies appear.
- Collect health potions to restore HP.
Main menu
N— New gameL— Load gameQ— Quit
New game seed entry
- Type digits
0-9— Build a seed value S— Start the game with that seed
In-game
W/A/S/D— MoveSpace— Attack nearby enemies (adjacent tiles)Q— Quit + save
- Java (JDK) installed (Java 11+ recommended)
- The required
.jardependencies live inLibrary/(includingalgs4.jarforStdDraw).
- Open this folder as a project.
- Add all
.jarfiles inLibrary/to the project’s classpath (Project Structure → Libraries). - Run the main class:
src/core/Main.java(core.Main).
Windows (PowerShell)
$cp = "Library/*"
$src = (Get-ChildItem -Recurse -Filter *.java src | ForEach-Object FullName)
javac -cp $cp -d out $src
java -cp "out;$cp" core.MainmacOS/Linux (bash/zsh)
CP="Library/*"
find src -name "*.java" > sources.txt
javac -cp "$CP" -d out @sources.txt
java -cp "out:$CP" core.Main- The game writes your save to
savegame.txtin the repo root. - To reset progress, delete
savegame.txt.
src/core/— Game loop, world logic, entities, audio, save/loadsrc/tileengine/— Tile + renderer utilities (provided starter code)src/utils/— Utility helpersresources/— Extra assets (e.g.background_music.wav)SmileyPDFDesignDoc.pdf/SmileyDesignDoc.docx— Design docs
- Music playback currently uses a hard-coded local path in
src/core/AudioPlayer.java. If audio doesn’t play on your machine, update it to a repo-relative path (e.g.src/music/gg.wavorresources/background_music.wav).