icexin / gocraft Goto Github PK
View Code? Open in Web Editor NEWA Minecraft like game written in go
License: MIT License
A Minecraft like game written in go
License: MIT License
Warning on github.com/go-gl/glfw/v3.2/glfw/glfw/src/linux_joystick.c:224:42
lab@ubu1:~$ go get github.com/icexin/gocraft
# github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go:22:0:
go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/src/linux_joystick.c: In function ‘_glfwInitJoysticksLinux’:
go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/src/linux_joystick.c:224:42: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 9 [-Wformat-truncation=]
snprintf(path, sizeof(path), "%s/%s", dirname, entry->d_name);
^~~~~~~
In file included from /usr/include/stdio.h:862:0,
from /usr/include/X11/Xcursor/Xcursor.h:26,
from go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/src/x11_platform.h:39,
from go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/src/internal.h:169,
from go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/glfw/src/x11_init.c:28,
from go/src/github.com/icexin/gocraft/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw_linbsd.go:17:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 12 and 267 bytes into a destination of size 20
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lab@ubu1:~$
Good morning, sir,
I don't know what it is, but when I put down blocks, I get a micro freeze...
is it due to Go or to your implementation?
What did you get from the development of this game? What do you think of Go for video games?
macOS 10.14 Mojave beta 10
Go 1.11
GO111MODULE=on
Hello, I've managed to build the package and produced the gocraft
executable, but when I run it I cannot see anything, just a black window. The terminal window behind shows that the app is responding to the A, W, S + D commands. When I built the package, all the dependencies appeared to be downloaded without any errors. Maybe it's a Mojave problem.
Any ideas? Thanks!
Steps to reproduce
$> go get github.com/icexin/gocraft
$> gocraft
This error will occur
2021/08/09 13:11:54.654137 PlatformError: Cocoa: Failed to retrieve display name
2021/08/09 13:11:54.775420 open texture.png: no such file or directory
panic: open texture.png: no such file or directory
goroutine 21 [running]:
log.Panic(0x1400015df68, 0x1, 0x1)
/usr/local/go/src/log/log.go:354 +0x98
main.run()
/Users/sudosu/golang/pkg/mod/github.com/icexin/[email protected]/main.go:332 +0x1cc
github.com/faiface/mainthread.Run.func1(0x1054bf1f0, 0x140000b0000)
/Users/sudosu/golang/pkg/mod/github.com/faiface/[email protected]/mainthread.go:37 +0x28
created by github.com/faiface/mainthread.Run
/Users/sudosu/golang/pkg/mod/github.com/faiface/[email protected]/mainthread.go:36 +0x9c
my go env background:
In my zsh config, I have $GOPATH defined only, because $GOROOT is optional(https://dave.cheney.net/2013/06/14/you-dont-need-to-set-goroot-really) - maybe this is the problem, I'm not a golang programmer, but those go env variables are pain..
Thank you very much for your development. I am a novice in go language. I have just finished learning the basic OpenGL and go-sdl2. If you want to learn how to develop this project, what are your suggestions for starting study? Thank you.
fix math.go file call method
修复 math.go 文件的调用方法old: sim = opensimplex.NewWithSeed(0) new: sim = opensimplex.New(0)
go version go1.9.3 windows/amd64
.\math.go:19:17: undefined: math.Round
是因为版本问题吗?
vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:10: fatal error: 'glfw/src/context.c' file not found
#include "glfw/src/context.c"
^~~~~~~~~~~~~~~~~~~~
1 error generated.
Compilation finished with exit code 2
---- go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hipnusleo/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hipnusleo/Workspace/packages/golang"
GORACE=""
GOROOT="/opt/local/lib/go"
GOTMPDIR=""
GOTOOLDIR="/opt/local/lib/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="/usr/bin/clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s_/db9sxfb91xd7k59f1l9cfwl00000gn/T/go-build426875879=/tmp/go-build -gno-record-gcc-switches -fno-common"
Hello i would like compile engine but i have problem with dependencies
go mod init
go build
go: extracting golang.org/x/image v0.0.0-20171214225156-12117c17ca67
go: downloading github.com/hashicorp/yamux v0.0.0-20171219165022-683f49123a33
go: extracting github.com/hashicorp/yamux v0.0.0-20171219165022-683f49123a33
# github.com/go-gl/glfw/v3.2/glfw
In file included from ../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/[email protected]/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
^~~~~~~~~~
when I want to open the game it shows this error and quit , I both installed libgl1-mesa-dev and xorg-dev
Full error : https://imgur.com/a/dIaOSfN
[duckerman@duckerman gocraft]$ go run *.go
2018/08/07 16:37:47.479949 VersionUnavailable: GLX: Failed to create context: GLXBadFBConfig
exit status 1
I know that Windows isn't supported, but could you help me with this build error, please:
λ go build
package github.com/icexin/gocraft
imports github.com/go-gl/gl/v3.3-core/gl: build constraints exclude all Go files in C:\Users\Robert\go\pkg\mod\github.com\go-gl\[email protected]\v3.3-core\gl
package github.com/icexin/gocraft
imports github.com/go-gl/glfw/v3.2/glfw: build constraints exclude all Go files in C:\Users\Robert\go\pkg\mod\github.com\go-gl\[email protected]\v3.2\glfw
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.