Are there any 2d game engines for Go?

blov · · 817 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I was thinking about learning a bit of go in my spare time because the concept of a compiled language as simple as go is supposed to be is quite interesting to me.</p> <p>When I was learning python I found it very useful to practice with small games using pygame, is there anything like that for go?</p> <hr/>**评论:**<br/><br/>cryptrol: <pre><p><a href="https://github.com/paked/engi">https://github.com/paked/engi</a></p> <p>Just found it today on awesome-go list and looks good.</p></pre>hcwool: <pre><p>Greetings everyone <a href="https://github.com/paked">paked</a> here (maintainer of engi).</p> <p>While I encourage people to build real games with our engine (and if you are, please shoot me an email if you ever need any help [it is on my GitHub]), it is important to note that we are going through a state of flux. I am trying to keep a relatively stable API, however we are removing things which no longer make sense.</p> <p>If you have any objections, or would like to suggest a <em>new</em> feature <a href="https://github.com/paked/engi/issues/new">please open up an issue on GitHub</a></p> <p>edit: or Pull Request if you are so inclined :)</p></pre>newbrict: <pre><p>Paked and I worked on that, it has good support for the maps generated from &#34;tiled&#34;</p></pre>lapingvino: <pre><p>Feel free to join <a href="/r/gogamedev">r/gogamedev</a> !</p></pre>rpk788: <pre><p>I don&#39;t do much game programming but I remembered seeing this link in the Go weekly newsletter. </p> <p><a href="https://gitlab.com/xojoc/engine">https://gitlab.com/xojoc/engine</a></p></pre>ston1th: <pre><p>There was also a post here on <a href="/r/golang" rel="nofollow">/r/golang</a> <a href="https://www.reddit.com/r/golang/comments/3ud35o/games2d_collection_of_2d_games_written_in_golang/" rel="nofollow">https://www.reddit.com/r/golang/comments/3ud35o/games2d_collection_of_2d_games_written_in_golang/</a></p></pre>bluhue: <pre><p>I&#39;ve been using the SDL bindings here <a href="https://github.com/veandco/go-sdl2">https://github.com/veandco/go-sdl2</a></p></pre>thepciet: <pre><p>I&#39;ve been writing games with Go as the logic server and an internet browser for the user interface. Websockets give you bidirectional asynchronous communication instead of just the request-response of HTTP. This keeps the graphics engine out of Go. </p> <p>Web technology is the best proven use of Go today (Google spends to develop, deploy, and keep Go open source). So it depends on what you are trying to learn about or do with the language.</p> <p>I&#39;m just saying I think you&#39;d learn more about Go by writing networking stuff, as a spare timer.</p></pre>riscie: <pre><p>Would you mind talking a bit about your stack? Are you using gorilla websocket? What do you use for the frontend? Html5 canvas? Very interested in this!</p></pre>thepciet: <pre><p>I&#39;ve had good luck with gorilla/websocket (<a href="https://github.com/gorilla/websocket">https://github.com/gorilla/websocket</a>) so far. Just set a route to a websocket upgrade request, then do your custom logic that wires the socket to your server. Here&#39;s some working Go code from my game: <a href="http://pastebin.com/9Nxgvtja">http://pastebin.com/9Nxgvtja</a></p> <p>For the frontend I use Javascript and HTML/CSS, with jQuery (for ideally easier platform independence). Here&#39;s the main client file for the game: <a href="http://pastebin.com/RBrbAPXu">http://pastebin.com/RBrbAPXu</a></p> <p>I use HTML elements for the interface as this is a turn based game without much dynamic visual content for this version. Tables, Divs, and Spans are about it. Javascript/jQuery can handle keyboard input, I wrote an arrow keys handler.</p> <p>The <a href="https://github.com/pciet/talk">https://github.com/pciet/talk</a> package is what I use to wire specific websocket connections to a match against another person. The basic goal was for the server to send and receive asynchronous messages to and from multiple clients. Here&#39;s the main application glue code for the server that does the wiring when a match is made: <a href="http://pastebin.com/WrP844HA">http://pastebin.com/WrP844HA</a></p> <p>The game is playable at <a href="http://mclnds.com:8080/login">http://mclnds.com:8080/login</a> - username/password are created when you type them and sent without encryption, with the password hashed/salted into a database in memory only. If the server app crashes (it probably will from assertions I&#39;ve left in) a bash script restarts it automatically, but since there&#39;s no drive database it loses all of the username/crypt pairs. I don&#39;t own the game design (characters and character stats, and how the game actually works by hand) so I cannot share this code in its entirety. You gotta have two players to start a match.</p></pre>peterhellberg: <pre><p>I‘ve been playing with Ebiten, and it is pretty nice if you only want 2d rendering and input handling.</p> <p><a href="https://hajimehoshi.github.io/ebiten/" rel="nofollow">https://hajimehoshi.github.io/ebiten/</a></p></pre>Fwippy: <pre><p>There&#39;s more than a few announcements of game engines over at <a href="/r/gogamedev" rel="nofollow">r/gogamedev</a></p></pre>ggggopher: <pre><p>You use the opengl for the 2d graphics</p></pre>lapingvino: <pre><p>You could add the context that this is the approach the sprite library for mobile is taking ;).</p></pre>boomshroom: <pre><p>There is still the portable implementation which just takes an *RGBA image like what shiny buffers provide. I have a POC platformer engine built with the sprite engine that runs on desktop with shiny and mobile with gl.</p></pre>dhdfdh: <pre><p>Let&#39;s hope not or this place will be like every other reddit board where every fifth post is about someone&#39;s shooter game they just made.</p></pre>b4ux1t3: <pre><p>Are you jealous because you can&#39;t make a shooter game?</p></pre>dhdfdh: <pre><p>Not interested but, I worked for Pixar, then Silicon Graphics, and helped make Jurassic Park. I can do more than shooter games.</p></pre>riscie: <pre><p>If thats true, i wonder why the most talented people are the biggest jerks all the time...</p></pre>dhdfdh: <pre><p>Cause they won&#39;t associate with the likes of you.</p></pre>Malangelus: <pre><blockquote> <p>Not interested but, I worked for Pixar, then Silicon Graphics, and helped make Jurassic Park. I can do more than shooter games.</p> </blockquote> <p>As if anybody gives a shit</p></pre>dhdfdh: <pre><p>Apparently you and at least one other person does. In fact, you took time just to respond to me, so I must mean something to your life which, I presume, is busy. After all, you could be talking to anybody else right now but you chose me over all others. I <strong>am</strong> the most important person in your life at the very moment you responded.</p> <p>So YOU give a shit.</p></pre>BilboDankins: <pre><p>Sorry dude I just wanted some guidance(Trust me I won&#39;t sharing any games of the quality I make)</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

817 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传