🌍 Read this in other languages:
A Game Engine developed in pure Java, created as a portfolio project to demonstrate knowledge in game development, object-oriented programming, and software architecture.
This project implements a basic Game Engine in Java, following good development practices and software architecture patterns. The engine provides the fundamental components required for 2D game development, including:
- Game Loop: Game loop system with FPS control
- Entity System: Class hierarchy for players, NPCs, and objects
- Graphics Engine: Components for rendering, camera, and textures
- Input System: Keyboard and mouse management
- Audio System: Sound and music management
- Utilities: Mathematical tools and performance measurement
- Java 11+: Main project language
- Maven: Dependency management and build tool
- JUnit 4: Unit testing framework
src/
├── main/
│ ├── java/
│ │ └── com/
│ │ └── meujogo/
│ │ ├── Main.java # Main class
│ │ ├── core/ # Engine core
│ │ │ ├── Game.java # Game manager
│ │ │ └── GameLoop.java # Main loop
│ │ ├── entities/ # Game entities
│ │ │ ├── Entity.java # Base class
│ │ │ ├── Player.java # Player
│ │ │ └── NPC.java # NPCs
│ │ ├── graphics/ # Graphics system
│ │ │ ├── Renderer.java # Renderer
│ │ │ ├── Camera.java # Camera
│ │ │ └── Texture.java # Textures
│ │ ├── input/ # Input system
│ │ │ ├── KeyboardInput.java # Keyboard
│ │ │ └── MouseInput.java # Mouse
│ │ ├── audio/ # Audio system
│ │ │ └── AudioManager.java # Manager
│ │ └── utils/ # Utilities
│ │ ├── MathUtils.java # Math
│ │ └── Timer.java # Timer
│ └── resources/ # Game resources
└── test/ # Unit tests
└── java/
- Java JDK 11 or higher
- Maven 3.6 or higher
git clone https://github.com/Notjef/teste-game-java.git
cd teste-game-javamvn clean compilemvn exec:java -Dexec.mainClass="com.meujogo.Main"mvn clean package
java -jar target/teste-game-java-1.0-SNAPSHOT.jarmvn test- Game: Manages the game lifecycle
- GameLoop: Implements the main loop with FPS control (60 FPS)
- Entity: Abstract base class for all entities
- Player: Represents the player with health and movement systems
- NPC: Non-playable characters with basic AI and dialogues
- Renderer: Responsible for drawing elements on the screen
- Camera: Controls the game world view
- Texture: Manages textures and images
- KeyboardInput: Captures and processes keyboard input
- MouseInput: Captures and processes mouse input
- AudioManager: Manages music and sound effects
- MathUtils: Useful mathematical functions (interpolation, distance, etc.)
- Timer: Time measurement and FPS calculation
- ✅ Game Loop with FPS control
- ✅ Entity system (Player, NPC)
- ✅ Rendering structure
- ✅ Camera system
- ✅ Input management (keyboard and mouse)
- ✅ Basic audio system
- ✅ Mathematical utilities
- ✅ Extensible and modular architecture
- Implement real rendering with graphics libraries (LWJGL, JavaFX)
- Add physics system
- Implement collision system
- Create tile/map system
- Add animations
- Implement particle system
- Create example games using the engine
Contributions are welcome! Feel free to:
- Fork the project
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the Apache License 2.0 License. See the LICENSE file for more details.
Jeferson Rodrigo - GitHub
⭐ If this project helped you, consider giving it a star!