Git Product home page Git Product logo

korok's Introduction

Korok

Korok is a free lightweight, cross-platform, component-based 2D game engine written in Golang and released under the zlib license. Greatly inspired by bitsquid blog.

Homepage: korok.io Twitter: ntop

The latest release is beta-version which is not stable and will have breaking changes in the future. About the state and progress of the project, see Devlogs

Getting Started

go get korok.io/korok

Games

FlappyBird
flappy bird
GitHub

Shoot Stack

AppStore GooglePlay

Unstable Tower

GooglePlay

Some ScreenShot

Input Control - Show how to use InputSystem

Sprite Animation - Show how to use sprite animation system

Tween Animation - Show how to use tween animation system

ParticleSystem - Show how to use ParticleComp

Gui - Show how to use korok's imgui-api

License

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Note: To avoid fragmentation, it's not allowed to create and distribute korok-like libs.

korok's People

Contributors

ntop001 avatar vanishs 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  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

korok's Issues

关于实现

你好这个gui实现原理是啥,比如借助opengl的接口还是什么的

gfx.Blank not defined

# korok.io/korok/gui
korok/gui/style.go:102:10: undefined: gfx.Blank
korok/gui/style.go:107:30: undefined: gfx.Blank

occured when go get.

golang 1.12 build时gl报错重复定义

大佬,使用golang 1.12版本,go mod模式build报错
image

实在找不到办法,只有删掉hid/gl/gl_gl2.go才能正确编译

请问大佬有什么优雅的解决办法吗?

windos 上编译 直接报错

windows上,有没有测试过?看报错内容,是声音部分的代码

还有引擎什么时候完善,可以让大家玩起来?

dbg.Move不存在

你好,很高兴看到go的游戏引擎

第一时间尝试运行,
当然也遇到一些问题,
在demo中,dbg.Move 提示不存在,查看dbg文件中没有Move方法,
这个问题是我clone文件的版本问题吗?

另外,dbg.DrawStr("Hello World") 查看dbg文件中
func DrawStr(x,y float32, str string, args ...interface{})
并没有这个方法。

我是一个go 的新手,有不对的地方请多多包涵

install error on arch linux

I'm on parabola (arch linux):
$ uname -a
Linux parabola 5.5.1-gnu-1 #1 SMP PREEMPT Mon, 03 Feb 2020 22:37:39 +0000 x86_64 GNU/Linux

OpenAl is installed:
$ LANG=en_US.UTF-8 pacman -Si openal
Repository : extra
Name : openal
Version : 1.20.1-2

$ go get korok.io/korok

korok.io/korok/audio/sine

../src/korok.io/korok/audio/sine/bk_al.go:398:21: could not determine kind of name for C.AL_INVALID_ENUM
../src/korok.io/korok/audio/sine/bk_al.go:397:21: could not determine kind of name for C.AL_INVALID_NAME
../src/korok.io/korok/audio/sine/bk_al.go:400:21: could not determine kind of name for C.AL_INVALID_OPERATION
../src/korok.io/korok/audio/sine/bk_al.go:399:21: could not determine kind of name for C.AL_INVALID_VALUE
../src/korok.io/korok/audio/sine/bk_al.go:396:21: could not determine kind of name for C.AL_NO_ERROR
../src/korok.io/korok/audio/sine/bk_al.go:401:21: could not determine kind of name for C.AL_OUT_OF_MEMORY
../src/korok.io/korok/audio/sine/bk_al.go:188:29: could not determine kind of name for C.ALenum
../src/korok.io/korok/audio/sine/bk_al.go:264:42: could not determine kind of name for C.ALfloat
../src/korok.io/korok/audio/sine/bk_al.go:188:70: could not determine kind of name for C.ALsizei
../src/korok.io/korok/audio/sine/bk_al.go:178:11: could not determine kind of name for C.ALuint
../src/korok.io/korok/audio/sine/bk_al.go:235:12: could not determine kind of name for C.SineBufferPlayer_play
../src/korok.io/korok/audio/sine/bk_al.go:264:2: could not determine kind of name for C.SineBufferPlayer_setVolume
../src/korok.io/korok/audio/sine/bk_al.go:367:3: could not determine kind of name for C.SineStreamPlayer_feed
../src/korok.io/korok/audio/sine/bk_al.go:288:12: could not determine kind of name for C.SineStreamPlayer_init
../src/korok.io/korok/audio/sine/bk_al.go:338:2: could not determine kind of name for C.SineStreamPlayer_setVolume
../src/korok.io/korok/audio/sine/bk_al.go:188:2: could not determine kind of name for C.alBufferData
../src/korok.io/korok/audio/sine/bk_al.go:187:2: could not determine kind of name for C.alGenBuffers
cgo:
gcc errors for preamble:
../src/korok.io/korok/audio/sine/bk_al.go:20:2: error: unknown type name 'ALCdevice'
20 | ALCdevice *device;
| ^~~~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:21:2: error: unknown type name 'ALCcontext'
21 | ALCcontext *context;
| ^~~~~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:24:1: error: unknown type name 'ALenum'; did you mean 'enum'?
24 | ALenum Sine_init(SineEngine *eng) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:42:2: error: unknown type name 'ALuint'
42 | ALuint idSource;
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:45:1: error: unknown type name 'ALenum'; did you mean 'enum'?
45 | ALenum SineBufferPlayer_init(SineBufferPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineBufferPlayer_init':
../src/korok.io/korok/audio/sine/bk_al.go:46:2: error: unknown type name 'ALuint'
46 | ALuint id;
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:52:1: error: unknown type name 'ALenum'; did you mean 'enum'?
52 | ALenum SineBufferPlayer_play(SineBufferPlayer *p, ALuint idBuffer) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:52:51: error: unknown type name 'ALuint'
52 | ALenum SineBufferPlayer_play(SineBufferPlayer *p, ALuint idBuffer) {
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:60:1: error: unknown type name 'ALenum'; did you mean 'enum'?
60 | ALenum SineBufferPlayer_pause(SineBufferPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:65:1: error: unknown type name 'ALenum'; did you mean 'enum'?
65 | ALenum SineBufferPlayer_stop(SineBufferPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:71:1: error: unknown type name 'ALenum'; did you mean 'enum'?
71 | ALenum SineBufferPlayer_state(SineBufferPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineBufferPlayer_state':
../src/korok.io/korok/audio/sine/bk_al.go:72:3: error: unknown type name 'ALenum'; did you mean 'enum'?
72 | ALenum state;
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:73:29: error: 'AL_SOURCE_STATE' undeclared (first use in this function)
73 | alGetSourcei(p->idSource, AL_SOURCE_STATE, &state);
| ^~~~~~~~~~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:73:29: note: each undeclared identifier is reported only once for each function it appears in
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:77:1: error: unknown type name 'ALfloat'; did you mean 'float'?
77 | ALfloat SineBufferPlayer_getVolume(SineBufferPlayer *p) {
| ^~~~~~~
| float
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineBufferPlayer_getVolume':
../src/korok.io/korok/audio/sine/bk_al.go:78:2: error: unknown type name 'ALfloat'; did you mean 'float'?
78 | ALfloat v;
| ^~~~~~~
| float
../src/korok.io/korok/audio/sine/bk_al.go:79:28: error: 'AL_GAIN' undeclared (first use in this function)
79 | alGetSourcef(p->idSource, AL_GAIN, &v);
| ^~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:83:54: error: unknown type name 'ALfloat'; did you mean 'float'?
83 | void SineBufferPlayer_setVolume(SineBufferPlayer *p, ALfloat v) {
| ^~~~~~~
| float
../src/korok.io/korok/audio/sine/bk_al.go:88:2: error: unknown type name 'ALuint'
88 | ALuint idSource;
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:89:2: error: unknown type name 'ALuint'
89 | ALuint buffers[8]; //max buffer size
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:90:2: error: unknown type name 'ALuint'
90 | ALuint numBuffers; //buffer in use
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:91:2: error: unknown type name 'ALuint'
91 | ALuint freed; //buffer active
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:94:1: error: unknown type name 'ALenum'; did you mean 'enum'?
94 | ALenum SineStreamPlayer_init(SineStreamPlayer *p, ALuint numBuffers) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:94:51: error: unknown type name 'ALuint'
94 | ALenum SineStreamPlayer_init(SineStreamPlayer *p, ALuint numBuffers) {
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:107:1: error: unknown type name 'ALenum'; did you mean 'enum'?
107 | ALenum SineStreamPlayer_play(SineStreamPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:113:1: error: unknown type name 'ALenum'; did you mean 'enum'?
113 | ALenum SineStreamPlayer_stop(SineStreamPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:119:1: error: unknown type name 'ALenum'; did you mean 'enum'?
119 | ALenum SineStreamPlayer_pause(SineStreamPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:124:1: error: unknown type name 'ALuint'
124 | ALuint SineStreamPlayer_freeBuffer(SineStreamPlayer *p) {
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineStreamPlayer_freeBuffer':
../src/korok.io/korok/audio/sine/bk_al.go:125:2: error: unknown type name 'ALuint'
125 | ALuint source = p->idSource;
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:126:2: error: unknown type name 'ALuint'
126 | ALuint freed = p->freed;
| ^~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:128:2: error: unknown type name 'ALint'; did you mean 'int'?
128 | ALint bp;
| ^~~~~
| int
../src/korok.io/korok/audio/sine/bk_al.go:129:28: error: 'AL_BUFFERS_PROCESSED' undeclared (first use in this function)
129 | alGetSourcei(p->idSource, AL_BUFFERS_PROCESSED, &bp);
| ^~~~~~~~~~~~~~~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:140:61: error: unknown type name 'ALsizei'
140 | void SineStreamPlayer_feed(SineStreamPlayer *p, void *data, ALsizei size, ALenum format, ALsizei freq) {
| ^~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:140:75: error: unknown type name 'ALenum'; did you mean 'enum'?
140 | void SineStreamPlayer_feed(SineStreamPlayer *p, void *data, ALsizei size, ALenum format, ALsizei freq) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:140:90: error: unknown type name 'ALsizei'
140 | void SineStreamPlayer_feed(SineStreamPlayer *p, void *data, ALsizei size, ALenum format, ALsizei freq) {
| ^~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go:150:1: error: unknown type name 'ALenum'; did you mean 'enum'?
150 | ALenum SineStreamPlayer_state(SineStreamPlayer *p) {
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineStreamPlayer_state':
../src/korok.io/korok/audio/sine/bk_al.go:151:3: error: unknown type name 'ALenum'; did you mean 'enum'?
151 | ALenum state;
| ^~~~~~
| enum
../src/korok.io/korok/audio/sine/bk_al.go:152:29: error: 'AL_SOURCE_STATE' undeclared (first use in this function)
152 | alGetSourcei(p->idSource, AL_SOURCE_STATE, &state);
| ^~~~~~~~~~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:157:1: error: unknown type name 'ALfloat'; did you mean 'float'?
157 | ALfloat SineStreamPlayer_getVolume(SineStreamPlayer *p) {
| ^~~~~~~
| float
../src/korok.io/korok/audio/sine/bk_al.go: In function 'SineStreamPlayer_getVolume':
../src/korok.io/korok/audio/sine/bk_al.go:158:2: error: unknown type name 'ALfloat'; did you mean 'float'?
158 | ALfloat v;
| ^~~~~~~
| float
../src/korok.io/korok/audio/sine/bk_al.go:159:28: error: 'AL_GAIN' undeclared (first use in this function)
159 | alGetSourcef(p->idSource, AL_GAIN, &v);
| ^~~~~~~
../src/korok.io/korok/audio/sine/bk_al.go: At top level:
../src/korok.io/korok/audio/sine/bk_al.go:163:54: error: unknown type name 'ALfloat'; did you mean 'float'?
163 | void SineStreamPlayer_setVolume(SineStreamPlayer *p, ALfloat v) {
| ^~~~~~~
| float

install korok error

I user command go get korok.io/korok install korok ,but installation error like this:cc1.exe: sorry, unimplemented: 64-bit mode not compiled . I install gcc 64-bit, re-install korok, it still error.
image

go get报错,多数包404

很多在korok.io的包都404了,不晓得大佬你用的那个依赖包是什么版本,我用github上的镜像包,但是都是不行,可不可以打包一下老哥你的依赖包呢,之前在win上跑成功了,做了超级玛丽交了大作业,但是现在在mac上不行了,不晓得是什么情况,蛮喜欢的这个框架的,有点像以前玩的easyx,希望能早点出个稳定版

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.