Floppy Gopher - game written in raylib-go

xuanbao · · 772 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>This is example of a game built with <a href="https://github.com/gen2brain/raylib-go">Go bindings</a> for <a href="http://www.raylib.com/">http://www.raylib.com/</a>, a simple and easy-to-use library to learn videogames programming. Library is much easier to use then SDL if you are beginner, and when you learn some basics it is easy to switch to SDL later (or some other lib/framework).</p> <p>Game is here <a href="https://github.com/gen2brain/raylib-go/tree/master/examples/games/floppy">https://github.com/gen2brain/raylib-go/tree/master/examples/games/floppy</a> .</p> <p>Android apk is available on <a href="https://gist.github.com/gen2brain/ae96bc92d2c2e307af35f5583f30ea25/raw/cd771b86ef6c4b03a2c5957fa2a097ee8a3bcbb4/floppy-gopher.apk">gist</a>.</p> <hr/>**评论:**<br/><br/>Nazariglez: <pre><p>I love see games on golang, I think go has a bright future in this field</p></pre>alexfiori: <pre><p>Absolutely, it&#39;s a sweet spot for Go.</p></pre>j0holo: <pre><p>I don&#39;t think it really is. Go is really good in I/O constrained applications, games are everything but that. OFC you can make games in Golang, but it will never be used by a professional game development company that creates triple A games.</p> <p>Indies and hobby game development is another story. Still, calling game development a sweet spot for Go is still weird, because Go is made for I/O constrained programs.</p></pre>alexfiori: <pre><p>Was thinking in terms of what Go offers for highly concurrent programs + decent synchronisation + multi-core, multi-platform etc. </p> <p>We probably have very different views of Go but I see it as a general purpose language, not specifically &#34;made for I/O constrained programs&#34; only.</p> <p>Your statement that &#34;Go will never be used by a professional game development company that creates triple A&#34; brought me <a href="http://dscomplete.com/course/00_Start/presentation/img/640kb.jpg">this memory</a>. But yeah, who knows.</p> <p>FWIW I&#39;m not a game developer so not saying you&#39;re wrong.</p></pre>Yojihito: <pre><blockquote> <p>see it as a general purpose language</p> </blockquote> <p>Game design without generics? &#39;Interface{}&#39; everywhere?</p> <p>Performance issues when using C-libs?</p> <p>Hell no .....</p></pre>j0holo: <pre><p>I see your point, but what I think that makes Golang not suited for high budget triple A title is its garbage collector. It just stops everything for a split moment, which is not something you want while programming a game engine.</p></pre>meowtasticly: <pre><p>Those stop the world pauses are now down to 100 microseconds, pretty positive no player will be able to detect that.</p></pre>j0holo: <pre><p>100ms is pretty darn long, imagine what a 3.5 GHz processor nowadays can do within 100ms. Maybe it will happen, we&#39;ll see.</p></pre>meowtasticly: <pre><p>μs not ms. Sure there&#39;s other things it could be doing during that time but there&#39;s still the other 99.99% of each second available for those other things.</p> <p>At 60 fps with one pause per frame, GC time will only take up 0.6% of each frame. Most engines lose far more CPU time than that to poor algorithm choice, bugs, memory management, whatever. </p> <p>Also you can work on just not producing garbage and then the GC never even needs to run. 0ns pause times are even better eh? That 0.6% frame rate increase will really get people talking.</p></pre>j0holo: <pre><p>Ah microseconds read that wrong. That makes much more sence. You&#39;re about that algorithm choice is much more crucial than 0.6% less time to calculate a frame.</p></pre>daveddev: <pre><p>100ms == 100000µs</p> <p>100µs == 0.1ms</p> <p>6ms is where one might start to notice latency.</p></pre>drwiggly: <pre><p>Plenty of games are made with mono/java. Which has a vm and stops.</p></pre>j0holo: <pre><p>Yeah, true but those are not common at all, the only ones I can remember are Minecraft (Java) and Gears of War (C#).</p></pre>jinks: <pre><p>Add to that everything made with Unity (C#). So, Kerbal Space Program, Subnautica, Superhot, well, <a href="https://en.wikipedia.org/wiki/List_of_Unity_games" rel="nofollow">everything on this list</a>.</p></pre>Juggernog: <pre><p>The actual Unity engine is written in C++, mind you</p></pre>jinks: <pre><p>Yes, but the games are written entirely in C# (or UnityScript, a JS variant, if you&#39;re feeling masochistic).</p> <p>And from what I remember the Unity engine itself is not much more than a small &#34;shim&#34; acting as an arbiter above OpenGL/DirectX, PhysX and so on. You would call into those C libraries from Go as well.</p> <p>One issue might be that Go&#39;s C FFI is significantly slower than the CLR&#39;s or JVM&#39;s.</p></pre>Juggernog: <pre><p>I&#39;m pretty sure Gears of War isn&#39;t written in C#. It&#39;s an Unreal Engine game which is majority C++.</p></pre>j0holo: <pre><p>I dont know how I got that into my head. Sry.</p></pre>allowthere: <pre><p>You can pause the GC, and manually turn it on when you can afford it.</p></pre>cdoxsey: <pre><p>Most games these days have a network component - even single player games. It wouldn&#39;t surprise me at all if matchmaking or MMO servers were written using Go in the future. </p> <p>Eve online famously used python... and this kind of development probably has a lot more in common with making web apps than physics engines.</p></pre>

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

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