How could a semi-experienced programmer get started writing Android games in Kotlin?

kotlin · · 72 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>If I can program, and have a burning desire to write 2D Android games, but know little or nothing about Android or mobile development in general, modern IDEs like Android Studio, or Java/Kotlin, where should I start? I know stuff like C, Python, a bit of Javascript, Vim and command line compilation.</p> <p>The only thing I&#39;m certain of is going with Kotlin from the start which obviously reduces the no. of tutorials etc. I haven&#39;t found all the new things I need to learn combined into one &#34;How to write your first game in Kotlin using Android Studio 3&#34; tutorial yet. I&#39;m not sure if I should learn one thing first, or everything at once.</p> <hr/>**评论:**<br/><br/>JustMy42Cents: <pre><p>Look for Java tutorials on LibGDX, gradually refactor to Kotlin. You might find <a href="" rel="nofollow">LibKTX</a> useful: it&#39;s a set of non-invasive Kotlin DSLs and utilities on top of LibGDX. Basically unofficial Kotlin support for the framework.</p></pre>cvcat: <pre><p>For general 2D games, how big a difference in time/effort is there between using something like LibGDX versus doing your own graphics/sprites, input, sound, etc. via Android API calls? Intuitively I want to do as much as possible myself, but if the difference is big I&#39;ll use a library. Really I&#39;m trying to get a feel for what a typical Android game developer uses, as well as how to approach learning the API, Android Studio, Kotlin itself, etc. simultaneously.</p></pre>WindWalkerWhoosh: <pre><p>A fuckload. Like 90% difference in effort.</p></pre>ArmoredPancake: <pre><p>If your goal is to develop games, then use framework like libGDX, or engine like Unity. If your goal is to learn Android development, then Android SDK is your choice.</p></pre>JustMy42Cents: <pre><p>Pretty much what <a href="/u/WindWalkerWhoosh" rel="nofollow">u/WindWalkerWhoosh</a> said. You&#39;ll end up constantly reinventing the wheel and writing generic enginey stuff that has nothing to do with your particular game. That said, if your goal is to learn Android SDK, frameworks like LibGDX might abstract too much of the platform&#39;s original API to prepare you to write actual mobile apps.</p> <p>Still, if your goal is to <em>finish and publish a game</em>, go with LibGDX/LibKTX - the ability to quickly test the game through the desktop version is worth it alone. If you want a 3D game, Unity is probably the best bet, as 3D LibGDX API is pretty low level.</p></pre>cvcat: <pre><p>Thanks a lot - all these comments make sense and LibGDX looks like the way to go for me.</p></pre>ryeguy146: <pre><p>Kotlin offers a tool to convert from Java to Kotlin, so all of those tutorials are perfectly valid. That said, I might try <a href="" rel="nofollow">this one</a>, that has Kotlin code included in the tutorial.</p></pre>WindWalkerWhoosh: <pre><p>LibGDX or Unity makes it pretty easy. Kotlin is fully interop with Java so it shouldn&#39;t matter much, although with Unity you could just write in C#.</p></pre>
72 次点击  
加入收藏 微博
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet