Compact Java Game Engine - One Abstract Class, All Native Imports.
This is a game engine meant to be writen as one single abstract class in Java using only Java's native libraries. This is for a matter of simplicity in the hopes that it will help people jump into game developement more easily. By not having to worry about messing with importing libraries and such, your life will be stress-free. Instead, simply download the class and add it to your project source. Extend the class just like you would a JFrame, and let your IDE add the unimplemented methods.
To use this game engine, follow these steps:
- Clone the repository:
git clone https://github.com/JustBobinAround/CJGE.git
- Open the project in your preferred Java IDE.
- Extend the class just like you would a JFrame, and let your IDE add the unimplemented methods.
- Build and run the project.
- Window creation and management using
JFrame
andCanvas
. - Rendering capabilities, including a buffer strategy and pixel manipulation.
- Handling of keyboard and mouse input events, including key press/release, mouse button press/release, mouse movement, and mouse wheel events.
- Game loop implementation for continuous game updates and rendering.
- Utility methods for drawing images on the screen.
To create your game using this engine, follow these guidelines:
- Extend the
GameEngine
class and implement the abstract methods (preGameOperations()
,preRenderUpdate()
,renderUpdate()
, andstop()
). - Add your game-specific logic in the implemented methods.
- Customize the rendering and input handling as needed.
- Run the game and test your implementation.
Contributions to this game engine are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.