func init() { runtime.LockOSThread() sys = system.Make(gos.GetSystemInterface()) datadir = filepath.Join(os.Args[0], "..", "..") base.SetDatadir(datadir) base.Log().Printf("Setting datadir: %s", datadir) wdx = 1000 wdy = 800 var key_binds base.KeyBinds base.LoadJson(filepath.Join(datadir, "key_binds.json"), &key_binds) fmt.Printf("Prething: %v\n", key_binds) key_map = key_binds.MakeKeyMap() base.SetDefaultKeyMap(key_map) }
func main() { base.SetDatadir("../data") g := game.MakeGame() engine, err := cgf.NewHostEngine(g, 17, "", 20007, nil, nil) if err != nil { fmt.Printf("Unable to create engine: %v\n", err) return } err = cgf.Host(20007, "thunderball") if err != nil { fmt.Printf("Unable to host: %v\n", err) return } fmt.Printf("%v\n", engine) select {} }