tibia

package module
Version: v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: GPL-2.0 Imports: 0 Imported by: 0

README

go-tibia: Tibia tools in Go

Just a toy project to see how far Go's built in crypto primitives can take me, with some experimentation on how decent the Go interface abstractions, and how useful Go's WASM support is.

Copyright © 2017-2022 Ivan Vucica. See the LICENSE for licensing information.

gotserv: OTServ in Go

Main binary: badc0de.net/pkg/go-tibia/cmd/gotserv

So far implemented: stub login protocol, stub gameworld protocol which presents a map, some moving code. Other players can be seen, but updates from them won't propagate yet.

A debug webserver can be enabled, which reuses some of the gotweb code to paint a live representation of a portion of the map upon request.

Godoc documentation

gotweb

Main binary: badc0de.net/pkg/go-tibia/cmd/gotweb

Displays an index of items and creatures. Serves pic file's and spr file's individual components. Serves the requested sub-portion of the loaded map, composited with lighting.

Serves gotwebfe via a service worker, ensuring service worker is served with up-to-date cache keys so new files get fetched as needed.

Godoc documentation

gotwebfe

Main binary: badc0de.net/pkg/go-tibia/cmd/gotwebfe

Code intended to be compiled into WASM and run in-browser. Loads spr, pic, dat, items.xml and otbm files, and can render the map using the compositor.

Godoc documentation

itemprint

Main binary: badc0de.net/pkg/go-tibia/cmd/itemprint

Draws pic, spr and even items as composited using spr+dat files into terminal. It can use various methods: kitty's image drawing, iTerm2's png image drawing, true-color colored characters, 256-color colored characters, dumb 'intensity' ascii 'art'. The images get shrunk as needed.

Godoc documentation

Libraries

There's:

Some helpers:

  • path handler dealing with finding the files in the filesystem and setting up flags as needed
  • image printer used in itemprint binary and in some tests

Documentation

Overview

Package tibia contains no code.

Refer to its subpackages for useful documentation and code.

Source Files

Directories

Path Synopsis
cmd
gotserv
gotserv is a binary setting up and serving a login and a gameworld server on ports 7171 and 7172.
gotserv is a binary setting up and serving a login and a gameworld server on ports 7171 and 7172.
Package compositor paints a part of the map into an image.Image using the provided map data source and a things pack.
Package compositor paints a part of the map into an image.Image using the provided map data source and a things pack.
Package dat implements a parser for Tibia dataset files (Tibia.dat), describing items, creatures, etc.
Package dat implements a parser for Tibia dataset files (Tibia.dat), describing items, creatures, etc.
Package gameworld provides a gameworld protocol server.
Package gameworld provides a gameworld protocol server.
Package imageprint prints images on terminal.
Package imageprint prints images on terminal.
Package login provides a login protocol server.
Package login provides a login protocol server.
Package net implements network communication primitives for the login and gameworld protocol.
Package net implements network communication primitives for the login and gameworld protocol.
otb
Package otb reads in the 'OpenTibia Binary' format.
Package otb reads in the 'OpenTibia Binary' format.
items
Package itemsotb reads in an items.otb file.
Package itemsotb reads in an items.otb file.
map
Package otbm implements an OTBM map file format reader and a gameworld map data source.
Package otbm implements an OTBM map file format reader and a gameworld map data source.
Package secrets provides RSA secrets for the game, currently just OpenTibia server secret.
Package secrets provides RSA secrets for the game, currently just OpenTibia server secret.
Package spr implements a reader for individual sprites in a Tibia.spr files.
Package spr implements a reader for individual sprites in a Tibia.spr files.
Package things implements a registry for items, creatures etc.
Package things implements a registry for items, creatures etc.
full
Package full is unstable; it serves as a helper to populate things.Things hackily.
Package full is unstable; it serves as a helper to populate things.Things hackily.
Package xmls is unstable.
Package xmls is unstable.

Jump to

Keyboard shortcuts

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