Game engineer at day and game developer at night. I Worked in many game engines and programming languages and got the hang o what engine suit your needs better

Report RSS Multiplatform Releases and Refactoring

Posted by on

Compared to Unity. jMonkeyEngine is not as straightforward when it comes to porting your game to other platforms. There are different issues to consider: The type of input, the size of the screens, the graphic capabilities, etc. This offers new challenges and invites to reconsider the approach to provide a solution that is easy to maintain but at the same time flexible to make the ports as optimal as possible.

My first approach was to simply copy and paste the packages that were generic for each game and then make the changes for each platform. This worked well when I ported Multi Dominoes from desktop to Android, but with iOS in plans and other platforms that support Java. I was getting overwhelmed when new core features were being done like the Mexican Train, porting some changes were not straightforward so it had to stop.

Since the release of jMonkeyEngine 3.1 I decided to start anew and port the desktop code first and update the game to take advantage of the new features. After that the new process was simple in idea.

  1. Create a desktop release project of the game and only move the desktop specific code.
  2. Create abstract classes and/or interfaces and begin refactoring the base project so that it will not depend on any platform code, but use generic methods.
  3. Make changes to the desktop release project to extend abstractions and implement interfaces and ensure the gameplay was the same as before this process.

The game works now on desktop as before and the Android is almost ready as well for a future release. Who knows where the game might end up next ;)

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: