Home

Awesome

gotilengine

Go binding for Tilengine a 2D graphics engine with raster effects for retro/classic style game development.

TODOs

Example

package main

// #include <stdlib.h>
import "C"
import (
	"unsafe"
	"github.com/thechampagne/gotilengine"
)

func main() {
	var foreground gotilengine.TLN_Tilemap

	tmx := (gotilengine.CString) (C.CString("assets/sonic/Sonic_md_fg1.tmx"))
	defer C.free(unsafe.Pointer(tmx))

	gotilengine.TLN_Init(400, 240, 1, 0, 0)
	foreground = gotilengine.TLN_LoadTilemap(tmx, (gotilengine.CString) (C.NULL))
	gotilengine.TLN_SetLayerTilemap(0, foreground)

	gotilengine.TLN_CreateWindow((gotilengine.CString) (C.NULL), 0)
	for gotilengine.TLN_ProcessWindow() != 0 {
		gotilengine.TLN_DrawFrame(0)
	}

	gotilengine.TLN_DeleteTilemap(foreground)
	gotilengine.TLN_Deinit()
}

References

License

This repo is released under the MPL-2.0.