Skip to content

foamdino/libtcod-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it 
----------
libtcod-go is a set of Go bindings for the libtcod library


libtcod (http://doryen.eptalys.net/libtcod/) is an open-source, cross-platform C
library for writing roguelike games 
It provides many utilities frequently used in roguelike games, like  
- truecolor console (SDL and OpenGL backends)
- keyboard/mouse input
- misc algorithms (line drawing, pathfinding, field of view, dungeon generation)
- terrain and noise generators
- widget toolkit 
- config parser
- name generator
  etc.
 

Go (http://golang.org/) is a programming language released in 2009 by Google. 
It is a static language with dynamic feel, compiles to native code, has clean syntax (somewhat
between C and Python) with garbage collection and language support for unicode
and concurrency. 


Most of libtcod API (version 1.5.0) is wrapped in Go, with some parts fully ported to enable easier
callbacks. In addition, the demo and terrain-generation tool were also fully ported to
serve as examples on how to use the library. 



Installation
------------
To build the bindings, you will need the libtcod library and Go language installed. 
Please refer to http://golang.org/doc/install.html for Go installation
and to http://doryen.eptalys.net/libtcod/download/ for libtcod installation.


To build libtcod-go bindings, type 
make
in the main directory.
This should automatically build and install the bindings and build demos.

To run the samples program type 
cd cmd/sample; ./sample
in the main directory.

To run the hmtool program type 
cd cmd/hmtool; ./hmtool
in the main directory.




Documentation
--------------
Although there is no documentation for the bindings themselves, the bindings API
does not differ much from the original library, so the original documentation should
be very helpful (http://doryen.eptalys.net/data/libtcod/doc/1.5.0/index.html).

The samples and hmtool program also use many parts of the API so they also could be
helpful to get started.




Bugs
-----
Original API parts missing from Go bindings:
- custom containers (TCOD_list_t) - alternatives exist in Go
- thread/mutexes functions - alternatives exist in Go 
- SDL callback renderer - callbacks from C are currently cumbersome in Go
   
The bindings have been tested on 32bit and 64bit Linux with 8g and 6g compilers. 
There may still be some issues on other platforms.

Please report any problems and other bugs to afolmert (at) gmail (dot) com



Credits
--------
Thanks to:
Go Authors for the Go language 
Jice, Mingos and others for the libtcod library 
Chris Hamons for API design ideas in the libtcod-net bindings
Felipe Bichued for comments and ideas

About

Go (golang) bindings for libtcod roguelike toolkit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published