midgarts

module
v0.0.0-...-3eebe10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: GPL-3.0

README

Midgarts

Midgarts Client is an attempt to write a modern client implementation of the old classic Ragnarök Online game.

Current Screenshots:

Table of Contents

Introduction

TODO

Please have a look at the open milestones:

Milestone Description
Character Graphics Everything related to rendering character sprites, including character attachments, sprite animations and such.
World Graphics Everything related to world graphics, including 3D objects, terrain, water and lights.

Dependencies

  1. CentOS/Fedora-like Linux Distros: SDL2{,_image,_mixer,_ttf,_gfx}-devel alsa-lib-devel libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel libXi-devel libXxf86vm-devel

  2. Arch Linux: pacman -S sdl2{,_image,_mixer,_ttf,_gfx}

  3. MacOS:

brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config

Building and Running

  1. Generate and env file by copying the distributed (.env.dist) file:
cp .env.dist .env 
  1. Make sure to alter the GRF_FILE_PATH variable on the .env file:
GRF_FILE_PATH=/path/to/data.grf
  1. Build the main binary by running:
go build -o midgarts ./cmd/sdlclient/main.go 
  1. Run the binary:
./midgarts

Tools

GRF Explorer

Latest screenshots:

image image

Examples

Loading a GRF file
grfFilef, err := grf.Load("data.grf")
Getting an entry
grfEntry, err := f.GetEntry("data\sprite\ork_warrior.spr")
Loading SPR files
sprFile, err := spr.Load(e.Data)
Generating a PNG from a sprite
outputFile, err := os.Create("out/test.png")
if err != nil {
log.Fatal(err)
}

defer outputFile.Close()

if err = png.Encode(outputFile, img); err != nil {
log.Fatal(err)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL