My first LibGDX game! Normally I make in-house business apps. I also think we should see more source code in this forum so this is intended as an example.
https://play.google.com/store/apps/details?id=com.bluejaysystools.mobilecrush
This is a reimplementation of Andy McAdam's Orchard Crush so I could learn how to implement a LibGDX game including creating my own graphics, fonts, sounds and music without being distracted by game play design issues.
Many thanks to Andy McAdam for providing the source code for Orchard Crush. To study his code I started to refactor it into subroutines but I ended up rewriting virtually all of it and the end result is a completely new app with the same game logic (except for the auto double tap that I added).
In the spirit of the Andy's release you can get my source code from here:
https://www.dropbox.com/s/ri3v63dvxr58hy4/Mobile Crush - Public Src.zip?dl=0
I did some basic optimizations and tidied up the source code a fair bit to hopefully make it easier to understand as an example program for others. A simple game such as this does not get a lot of benefit from complex optimizations so these were left out so the code remained easy to read.
Many thanks to Informatix for his 'Introduction to the libGDX library' and the LibGDX port. This was especially useful not only for LibGDX but also for references to other tools that are needed to create the game assets.
This example does not use a lot of LibGDX functions and it compiles with LibGDX_lite just fine. I am currently using it as a test bed to explore more advanced libGDX functions like texture atlas, polygonspritebatch, scene2D and TiledMaps.
Known Limitations:
Some Things I Learned:
Bluejay
https://play.google.com/store/apps/details?id=com.bluejaysystools.mobilecrush
This is a reimplementation of Andy McAdam's Orchard Crush so I could learn how to implement a LibGDX game including creating my own graphics, fonts, sounds and music without being distracted by game play design issues.
Many thanks to Andy McAdam for providing the source code for Orchard Crush. To study his code I started to refactor it into subroutines but I ended up rewriting virtually all of it and the end result is a completely new app with the same game logic (except for the auto double tap that I added).
In the spirit of the Andy's release you can get my source code from here:
https://www.dropbox.com/s/ri3v63dvxr58hy4/Mobile Crush - Public Src.zip?dl=0
I did some basic optimizations and tidied up the source code a fair bit to hopefully make it easier to understand as an example program for others. A simple game such as this does not get a lot of benefit from complex optimizations so these were left out so the code remained easy to read.
Many thanks to Informatix for his 'Introduction to the libGDX library' and the LibGDX port. This was especially useful not only for LibGDX but also for references to other tools that are needed to create the game assets.
This example does not use a lot of LibGDX functions and it compiles with LibGDX_lite just fine. I am currently using it as a test bed to explore more advanced libGDX functions like texture atlas, polygonspritebatch, scene2D and TiledMaps.
Known Limitations:
- it assumes constant fps so the game will slow down if the phone is doing something on the background.
- aspect ratio is not quite right.
Some Things I Learned:
- debugging and finetuning screen positions is a pain. The debugger does not work because LibGDX runs in its own thread and there is no screen designer.
- mixing games logic in with drawing is different to my normal practice of keeping GUI and program logic separate
- you have to be careful to make game objects that are easy to distinguish from each other and the background
- a lot of the free stuff on the web is only free for non-commercial use
- making music loops is tricky - it needs to be bland enough to loop but interesting enough to not be annoying. I used my old Magix Musicmaker 15 to mix some loops with limited success.
- LibGDX makes a lot of things easy. The games scales well across devices from Galaxy S to Galaxy Tab II and Note 4. It even works on a Google emulator (using x86 accelerator).
Bluejay