2
\$\begingroup\$

I have fairly good experience with Java, but new to Android development. I would like to develop a 2D game which would have animations and online play.

Can I initially develop this game on my pc using Java and then implement in Android?

Will the canvas in Java be sufficient or should I use a game engine?

\$\endgroup\$

closed as off-topic by Josh Dec 19 '17 at 22:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ "on my pc", what else would be your environment? Mac? Try to rephrase your question for more clarity. Do you, or do you not want to use the Android SDK, if so, what is your reasoning? \$\endgroup\$ – user24821 Jan 23 '13 at 16:20
  • \$\begingroup\$ I could be wrong, but I believe the questioner is of the view that developing for android must be done on an Android device. 99.9999% of android development is done on a personal computer. \$\endgroup\$ – Cameron Fredman Feb 26 '13 at 22:45
15
\$\begingroup\$

It sounds like your goal here is just to make games.

Use LibGDX. With this Library you can test it and deploy it to Windows/Linux/Android/HTML5. It's also free.

\$\endgroup\$
  • 1
    \$\begingroup\$ +1 Been using LibGDX for years and it is still the original and the best Android + whatever game engine :) \$\endgroup\$ – aaronsnoswell Jan 15 '13 at 18:19
  • 1
    \$\begingroup\$ Really like libGDX, still learning it but it's absolutely delicious. \$\endgroup\$ – nospamthanks Jan 24 '13 at 11:43
3
\$\begingroup\$

You would make it easier for yourself implementing a game framework. Also if you'd develop your game outside the android framework you might use libraries that don't exist on android.

I'd suggest you build and test it directly on android drom the first line of code you write while using a game framework. You can however build a big part of your game as a jar library so you can re-use parts of it. This library can then be imported in your android project and you can see if it runs (and your not missing libs etc)

\$\endgroup\$
3
\$\begingroup\$

LibGDX is my weapon of choice, note though that many of the tutorials out there are set up pre-0.9.6 and quite a lot got changed in that update, rendering most of them useless. https://www.youtube.com/user/doctoriley has a decent series of tutorials which should give you a starting point (not exactly best practice but you get to understand how it all hangs together) and the code can be found at https://bitbucket.org/GQGK/creating-a-game-in-java-youtube-series/overview if you want it.

LibGDX is excellent, a layer on top of lwjgl which provides support for Android, desktop (win/lin/mac) and html5 (though frankly I'd say just use an applet instead as it's quite limited) and I believe work-in-progress iOS support too.

The documentation is relatively solid (though the wiki is incomplete and outdated) and it has been used in commercial projects.

\$\endgroup\$
2
\$\begingroup\$

There is great blog just for you with number of tutorials for game development for Windows, Mac and Android with Java. Check out this tutorial: http://obviam.net/index.php/getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1/

Unfortunately author of the blog stopped writing, but nevertheless it's a great start, and I've done most of tutorials in August and they were all valid.

\$\endgroup\$
  • \$\begingroup\$ Do they still work with the post 0.9.6 stage2d refactoring? \$\endgroup\$ – nospamthanks Jan 24 '13 at 11:42
  • \$\begingroup\$ To be frank I don't know. I used latest stack of libgdx and android 4.1 sdk this august, but didn't see if tutorial is valid after that. \$\endgroup\$ – David Sergey Jan 27 '13 at 19:11
2
\$\begingroup\$

Android does support the native Java API, but it is heavily reliant on the extended Android-specific API. If you really want to do this, then I would advise writing as much of the game logic completely independent of the platform interface (a good practice anyway).

I would recommend working directly with the Android API though.

\$\endgroup\$
-1
\$\begingroup\$

Yes, you can make Android Game without the prior knowledge of JAVA and without Android SDK. It is a Hypernext Android creator which gives you complete environment to make an Android game.

\$\endgroup\$
  • \$\begingroup\$ I'd suggest from the original question stating the desire to build the game in java and then port to android that java is not a problem, and likely the user wants to have both platforms working. \$\endgroup\$ – nospamthanks Jan 24 '13 at 11:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.