A fast-paced arcade dodge game built in Java where survival is everything. Dodge falling enemies, collect power-ups, and compete for the highest score!
Built during 11th grade as a passion project to learn game development and Java programming.
Square is an arcade-style survival game where you control a customizable square character avoiding endless waves of falling enemies. The longer you survive, the harder it gets! Collect coins to unlock new skins, grab power-ups for temporary advantages, and climb the leaderboards.
- ๐ฏ Intense Gameplay - Fast-paced dodging action with increasing difficulty
- ๐ค Account System - Create accounts to save progress and track high scores
- ๐จ 30+ Unique Skins - Unlock characters ranging from superheroes to Minecraft creepers
- ๐ฐ In-Game Economy - Earn coins by surviving and spend them in the shop
- โก Power-Ups
- Boost - Blast through enemies while the screen goes psychedelic
- Invisibility - Phase through enemies temporarily
- Auto Gun - Fire bullets automatically to clear your path
- ๐ต Dynamic Soundtrack - Multiple music tracks that change each game
- ๐ฎ Dual Control Schemes - Play with keyboard (WASD/Arrows) or mouse
- ๐พ Persistent Saves - Your progress, coins, and unlocks are saved locally
- Java Runtime Environment (JRE) 8 or higher
- Windows, macOS, or Linux
-
Clone the repository
git clone https://github.com/TaherJoudeh/Square.git cd Square -
Compile the game
javac -d bin src/game/*.java src/gameInputs/*.java
-
Run the game
java -cp bin game.Gameplay
- Download
Square.jarfrom Releases - Double-click the JAR file or run:
java -jar Square.jar
Keyboard Mode:
W/โ- Move UpA/โ- Move LeftS/โ- Move DownD/โ- Move RightP- PauseC- Show coins (during game)ESC- Exit
Mouse Mode:
- Move your mouse to control your character
ESC- Exit
- Start Small - Focus on dodging rather than collecting coins at first
- Use Power-Ups Wisely - They spawn randomly, so grab them when safe
- Watch the Patterns - Some enemies move horizontally, others fall straight down
- Earn Coins - You get coins based on your survival time
- Unlock Skins - Save up for rare skins that cost more!
- Language: Java
- GUI Framework: Swing
- Audio: Java Sound API
- Graphics: Java 2D Graphics
Square/
โโโ src/
โ โโโ game/
โ โ โโโ Gameplay.java # Main game loop and rendering
โ โ โโโ Accounts.java # User account management
โ โ โโโ GameObject.java # Base class for game entities
โ โ โโโ Handler.java # Entity manager
โ โ โโโ Power.java # Power-up system
โ โ โโโ AudioPlayer.java # Sound management
โ โ โโโ Customize.java # Skin system
โ โ โโโ ...
โ โโโ gameInputs/
โ โโโ KeyInput.java # Keyboard controls
โ โโโ MouseInput.java # Mouse controls
โ โโโ Buttons.java # UI button system
โโโ Data/
โ โโโ Accounts/ # Saved user accounts
โ โโโ Audio/ # Sound effects & music
โ โโโ Customize/ # Character skins
โ โโโ Powers/ # Power-up graphics
โโโ README.md
- Game Loop: Custom tick-render cycle running at 60 FPS
- Collision Detection: Rectangle-based bounding box system
- State Machine: Multiple game states (Menu, Game, Customize, etc.)
- Persistence: Text-based file storage for accounts and progress
The game includes 30 unique skins with varying prices:
| Price | Examples |
|---|---|
| Free | Blue Square, Red Square |
| 300-500 | Camo, Rainbow, Happy Blue |
| 1000-2000 | Microsoft, Ninja, Thief Mask |
| 2500-4000 | Emo Boy, Mustache, Diamond |
| 5000-6000 | Batman, Creeper, Dark |
| 7000+ | Developer (Premium), ASQ (Ultimate) |
- File paths use Windows-style backslashes (affects macOS/Linux compatibility)
- No multiplayer functionality
- Screen resolution fixed at 1366x770
This game was created during my 11th grade year as a way to learn:
- Object-oriented programming in Java
- Game development fundamentals
- File I/O and data persistence
- Audio and graphics programming
- State management and game loops
- The skins/cosmetics for the player are made by me and my classmates
It represents countless hours of learning, debugging, and iteration. While the code may not be perfect, I'm proud of what I built and what I learned in the process!
This project is licensed under the MIT License - see the LICENSE file for details.
Taher Joudeh
- GitHub: @TaherJoudeh
- Made with โ and determination
If you enjoyed this game or found the code helpful for learning, please consider giving it a star! It means a lot for a high school project.
Found a bug? Open an issue!
Want to contribute? Pull requests are welcome!
Made in 11th Grade | 2019