Midgarts
Multi-platform Ragnarök Online MMORPG client
Install / Use
/learn @drgomesp/MidgartsREADME
Midgarts Client
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:
<p align="center"> <img src="https://user-images.githubusercontent.com/696982/117575166-fff95980-b0b6-11eb-8afa-acd7dcdd6b34.gif" width="25%" /> <img src="https://user-images.githubusercontent.com/696982/197043590-041d711b-a5d6-4d58-bf3c-8ea98c1afdc6.gif" width="50%" /> </p> <p align="center"> <img src="https://user-images.githubusercontent.com/696982/116827693-c2557780-ab70-11eb-90cd-b093004361db.gif" width="34%" /> <img src="https://user-images.githubusercontent.com/696982/115995910-96a42180-a5b3-11eb-8200-1cfae06bf5bc.gif" width="34%" /> </p>Table of Contents
Project Overview
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.
Features
-
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,Dkeys. - Adjust camera position using
Z,X,C,Vkeys. - Mouse-click-based direction control.
- Move characters using
-
Game Assets from GRF Files:
- Reads sprite data and configuration files from
.grffile 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.
Requirements
To build and run the Midgarts Client, the following dependencies must be installed:
- Go SDK 1.21 or later
- Libraries:
Setup
Step 1: Clone the Repository
git clone <repository-url>
cd midgarts-client
Step 2: Install Dependencies
Use Go to download all the required modules:
go mod tidy
Step 3: Set Environment Variables
The application requires the .env file or environmental variable GRF_FILE_PATH to locate required assets:
GRF_FILE_PATH=/path/to/your/grf/file
Step 4: Run the Application
After setting up everything, simply run:
go run main.go
Usage
Controls
Character Movement
| Action | Input |
|-----------------------------|---------------------------------------------|
| Move Up | W |
| Move Down | S |
| Move Left | A |
| Move Right | D |
| Diagonal Movement | W+D, W+A, S+D, S+A |
Character Direction via Mouse
| Action | Input | |--------------------------------------|--------------------------------| | Set Direction (Mouse Click) | Top-left, Bottom-left, etc. in respective viewport |
Camera Controls
| Action | Input |
|--------------------------|----------|
| Move Camera Backward | Z |
| Move Camera Forward | X |
| Move Camera Left | C |
| Move Camera Right | V |
Folder Structure
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.
License
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.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
