Coder Social home page Coder Social logo

gokoban's People

Contributors

danaugrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gokoban's Issues

can you write an error log?

I run the game "window x64 prebuild" version on my win7 x64 pc unsuccessfuly
nothing showed, and the process flashed in the TaskList

mac build not finding c dependencies that were installed via brew.

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.

I messed around and made a really big level

#              #              #              #              #              #              #              #
.                  .                  ..............]    .                  ..............]    .                  .                  #
.                  ..............]    ..............]    ..............]    ..............]    ..............]    .                  #
..............]    ..............]    ..............]    ..............]x   ..............]    ..............]    ..............]    #
.                  ..............]    ..............]x   ]...].e------.]x   ..............]x   ..............]    .                  #
..............]    ..............]    ..............]    ]...].].......]x   ..............]    ..............]    ..............]    #
.                  ..............]    ..............]    ].].].].......]    ..............]    ..............]    .                  #
.                  .                  ..............]    ]o].].e---..o]o    ..............]    .                  .                  #
.                  ......]            ......]...e----    ..]...]x           .                  .                  .                  #
.                  ......]            ......]            ..]o..]s           ......e-           .......]           .                  #
.                  .                  ......]...]        ......e----        ..........]        .                  .                  #
.                  ..........]        ..........]        ..........]        ..........]        ..........]        .                  #
..........]        ..........]        ..........]        ..........]x       ..........]        ..........]        ..........]        #
.                  ..........]        ..........]x       ..........]x       ..........]x       ..........]        .                  #
..........]        ..........]        ..........]        ..........]x       ..........]        ..........]        ..........]        #
.                  ..........]        ..........]        ..........]        ..........]        ..........]        .                  #
.                  .                  ..........]        .                  ..........]        .                  .                  #
#              #              #              #              #              #              #              #

Have fun ;-)

Will not run unless cd to source directory

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.

No Function `GetMaterial`

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?

Level locks up if you move before the elevator animation ends

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!

Window is not closing properly

The window is not closing properly when the game is closed via quit button. g.win.Destroy() must be called after the render loop.

gokoban/main.go

Lines 1370 to 1378 in 8354b75

now = newNow
g.Update(timeDelta.Seconds())
g.RenderFrame()
}
}
// RenderFrame renders a frame of the scene with the GUI overlaid
func (g *GokobanGame) RenderFrame() {

Missing .h files, even though dependencies are installed (MacOSX)

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"

Compile failure with recent g3n

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:

    g3n/engine@443c590

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. 😄

Gopher is locked after falling off the map

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
		}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.