Skip to content

drgomesp/midgarts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}