Welcome to the Midgarts Client, a graphical client primarily built using SDL2, OpenGL, and various custom and third-party libraries. The project is designed to create an interactive and visually appealing environment for manipulating and rendering game characters and actions. The application showcases entities, systems, and OpenGL integration for real-time character movement and rendering.
Current Screenshots:
The Midgarts Client uses the Entity-Component-System (ECS) architecture to manage game objects and their interactions. It focuses on simulating a modeled game environment, rendering scene objects (like characters), and controlling game entities.
The main goals include:
- Configuring characters with properties like job sprites, direction, position, and states.
- Using OpenGL for rendering.
- SDL2 for window and event management.
- Integration with GRF file format for asset loading.
-
Character Creation and Rendering:
- Multiple characters with configurable sprites, positions, and states.
- Supports movement and states like "Standing" and "Walking".
-
OpenGL Integration:
- Real-time rendering of characters using a perspective camera.
- Efficient use of OpenGL viewport settings and caching.
-
Keyboard and Mouse Controls:
- Move characters using
W
,A
,S
,D
keys. - Adjust camera position using
Z
,X
,C
,V
keys. - Mouse-click-based direction control.
- Move characters using
-
Game Assets from GRF Files:
- Reads sprite data and configuration files from
.grf
file systems.
- Reads sprite data and configuration files from
-
Modular Architecture with ECS:
- Encapsulation of rendering and action logic into systems.
- Seamless addition/removal of entities or other systems.
-
Logging and Debugging:
- Uses zerolog for structured logging.
- Debug output including input states and errors.
To build and run the Midgarts Client, the following dependencies must be installed:
- Go SDK 1.21 or later
- Libraries:
git clone <repository-url>
cd midgarts-client
Use Go to download all the required modules:
go mod tidy
The application requires the .env
file or environmental variable GRF_FILE_PATH
to locate required assets:
GRF_FILE_PATH=/path/to/your/grf/file
After setting up everything, simply run:
go run main.go
Action | Input |
---|---|
Move Up | W |
Move Down | S |
Move Left | A |
Move Right | D |
Diagonal Movement | W D , W A , S D , S A |
Action | Input |
---|---|
Set Direction (Mouse Click) | Top-left, Bottom-left, etc. in respective viewport |
Action | Input |
---|---|
Move Camera Backward | Z |
Move Camera Forward | X |
Move Camera Left | C |
Move Camera Right | V |
The following are some key directories in the project:
internal/camera
: Perspective camera logic.internal/character
: Character properties (direction, state, jobs, etc.).internal/entity
: Definitions for character entities.internal/system
: Systems for action handling and rendering logic.internal/window
: SDL2-based window utilities.pkg/version
: Application version management.
This project is licensed under the MIT License. For more details, refer to the LICENSE
file.
Enjoy building with the Midgarts Client! For contributions or bug reporting, please reach out via the project's issue tracker.