danaugrs / gokoban Goto Github PK
View Code? Open in Web Editor NEW3D Puzzle Game written in Go
License: BSD 2-Clause "Simplified" License
3D Puzzle Game written in Go
License: BSD 2-Clause "Simplified" License
I run the game "window x64 prebuild" version on my win7 x64 pc unsuccessfuly
nothing showed, and the process flashed in the TaskList
brew install libvorbis openal-soft
go build .
gokoban git:(master) go build .
go: downloading github.com/g3n/engine v0.2.1-0.20220402201105-253be6caa10f
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220320163800-277f93cfa958
go: downloading golang.org/x/image v0.0.0-20220321031419-a8550c1d254a
# github.com/g3n/engine/audio/vorbis
../../../../pkg/mod/github.com/g3n/[email protected]/audio/vorbis/vorbis.go:19:11: fatal error: 'codec.h' file not found
#include "codec.h"
^~~~~~~~~
1 error generated.
# github.com/g3n/engine/audio/al
../../../../pkg/mod/github.com/g3n/[email protected]/audio/al/al.go:20:11: fatal error: 'al.h' file not found
#include "al.h"
^~~~~~
1 error generated.
# github.com/g3n/engine/audio/ov
../../../../pkg/mod/github.com/g3n/[email protected]/audio/ov/vorbisfile.go:20:11: fatal error: 'vorbisfile.h' file not found
#include "vorbisfile.h"
^~~~~~~~~~~~~~
1 error generated.
# # # # # # # #
. . ..............] . ..............] . . #
. ..............] ..............] ..............] ..............] ..............] . #
..............] ..............] ..............] ..............]x ..............] ..............] ..............] #
. ..............] ..............]x ]...].e------.]x ..............]x ..............] . #
..............] ..............] ..............] ]...].].......]x ..............] ..............] ..............] #
. ..............] ..............] ].].].].......] ..............] ..............] . #
. . ..............] ]o].].e---..o]o ..............] . . #
. ......] ......]...e---- ..]...]x . . . #
. ......] ......] ..]o..]s ......e- .......] . #
. . ......]...] ......e---- ..........] . . #
. ..........] ..........] ..........] ..........] ..........] . #
..........] ..........] ..........] ..........]x ..........] ..........] ..........] #
. ..........] ..........]x ..........]x ..........]x ..........] . #
..........] ..........] ..........] ..........]x ..........] ..........] ..........] #
. ..........] ..........] ..........] ..........] ..........] . #
. . ..........] . ..........] . . #
# # # # # # # #
Have fun ;-)
When building from source (go get -u github.com/danaugrs/gokoban
) the game installs in $GOPATH/bin, but it will not run unless you first change directory to $GOPATH/src/github.com/danaugrs/gokoban
.
It gives the following error:
Gokoban:Error loading texture: open img/floor.png: no such file or directory
You might need to use go-bindata to package the image inside the executable.
When I tried installing from source, I got the error:
# github.com/danaugrs/gokoban
go/pkg/mod/github.com/danaugrs/[email protected]/main.go:548:33: skybox.Graphic.Materials()[i].GetMaterial undefined (type graphic.GraphicMaterial has no field or method GetMaterial)
How can I fix this?
我的macos启动游戏会特别卡顿
This level seems to have an easy solution if you could move while the elevator is moving. I don't think you are supposed to be able to, but if you try then the level locks up until you reset.
........]
e--------
........]x
........]s
........]o
P.S. Omg, I love gokuban!!! And so does my whole family!
The window is not closing properly when the game is closed via quit button. g.win.Destroy()
must be called after the render loop.
Lines 1370 to 1378 in 8354b75
I used go get for g3n, g3nd, and its dependencies. I can run the g3n demos with no issue.
I've done brew install libvorbis openal-soft
. They install properly.
Here is the error I get when I attempt, go get -u github.com/danaugrs/gokoban
JoeMBP:gokoban joealai$ go get -u github.com/danaugrs/gokoban
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/vorbis
../../github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/vorbis/vorbis.go:15:11: fatal error: 'codec.h' file not found
#include "codec.h"
^~~~~~~~~
1 error generated.
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/ov
../../github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/ov/vorbisfile.go:16:11: fatal error: 'vorbisfile.h' file not found
#include "vorbisfile.h"
^~~~~~~~~~~~~~
1 error generated.
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/al
../../github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/al/al.go:19:10: fatal error: 'al.h' file not found
#include "al.h"
^~~~~~
1 error generated.
When I attempt to run this game, it gives me these errors.
JoeMBP:gokoban joealai$ go run *.go
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/vorbis
vendor/github.com/g3n/engine/audio/vorbis/vorbis.go:15:11: fatal error: 'codec.h' file not found
#include "codec.h"
^~~~~~~~~
1 error generated.
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/ov
vendor/github.com/g3n/engine/audio/ov/vorbisfile.go:16:11: fatal error: 'vorbisfile.h' file not found
#include "vorbisfile.h"
^~~~~~~~~~~~~~
1 error generated.
# github.com/danaugrs/gokoban/vendor/github.com/g3n/engine/audio/al
vendor/github.com/g3n/engine/audio/al/al.go:19:10: fatal error: 'al.h' file not found
#include "al.h"
Just tried compiling this on CentOS 7 x64, with Go 1.9.2.
$ go get -u github.com/danaugrs/gokoban
# github.com/danaugrs/gokoban
go/src/github.com/danaugrs/gokoban/levelstyle.go:37:37: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:38:38: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:51:53: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:54:51: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:57:54: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:60:56: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/levelstyle.go:63:56: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/main.go:447:10: listener.SetDirectionv undefined (type *audio.Listener has no field or method SetDirectionv)
go/src/github.com/danaugrs/gokoban/main.go:623:55: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/main.go:653:56: too many arguments in call to math32.NewColor
have (number, number, number)
want (string)
go/src/github.com/danaugrs/gokoban/main.go:653:56: too many errors
Not sure what's up with the math32.NewColor
error, but the listener.SetDirectionv
just needed the method renamed to SetDirectionVec
like in this:
It seems like g3n api changes are stopping things from working. If you're still interested in keeping this working, maybe vendoring the g3n repo here from before the api changes would work. Guessing so, but not 100% sure. 😄
When the gopher falls off the map I noticed that wasd keys don't work unless I pause and resume the game with Esc -> Play.
Resetting the lock after calling RestartLevel fixes the issue.
// level.go
// If it's the gopher falling - lock it
if _, ok := obj.(*Gopher); ok {
l.game.gopherLocked = true
l.game.arrowNode.SetVisible(false)
}
del = true
pfall.y = -20
l.game.audio.levelFail.Play()
cb = func(obj interface{}) {
log.Debug("Done falling out of game")
l.game.RestartLevel(true)
l.game.gopherLocked = false // <-- reset lock to gain back conrol
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.