Starting a game in Java, ideas on where to begin?

Started by
15 comments, last by 3Ddreamer 11 years ago

Hi! I was going to start making my first game in Java and I was unsure of how I should plan this out. For now I am building the game for PC but if successful I will try to port it over to android so that my friends can also play as well. My java experience is some what new as I am taking a class in java now, but I have taken a summer course on it before. For game making experience I have worked with GameMaker (mostly coding not drag and drop) and about a year in Unity.

The point of this game is mostly be a learning experience of trying to make a game without an engine such as GM or Unity. Would it be a good idea to use just java or get other sdks or libraries? Also is there anything I should know or keep in mind if I am building as a PC game first and then porting it over to android or mac?

Any suggestions or tips would be helpful. Thanks!

This will be a 2d platforming game.

Advertisement
If you look around on the Web I am sure you can find some good libraries for java. I recommend http://www.slick2d.org I don't know if it will work on Android, but I know it will work on Windows, Linux and OSX if they have java installed.

If you look around on the Web I am sure you can find some good libraries for java. I recommend http://www.slick2d.org I don't know if it will work on Android, but I know it will work on Windows, Linux and OSX if they have java installed.

Well I am not just looking for libraries, I wondering if it would be a good idea to use just java instead of libraries to make a game.

I am asking this because I want to know how much harder is it without a library or sdk to make a full game.


If you look around on the Web I am sure you can find some good libraries for java. I recommend http://www.slick2d.org I don't know if it will work on Android, but I know it will work on Windows, Linux and OSX if they have java installed.

Well I am not just looking for libraries, I wondering if it would be a good idea to use just java instead of libraries to make a game.
I am asking this because I want to know how much harder is it without a library or sdk to make a full game.
unless you know really much about graphic hardware and stuff, it's really hard to make a game, library or engine. And yes, java is a good language!

Also is there anything I should know or keep in mind if I am building as a PC game first and then porting it over to android or mac?

PC and Mac will be quite similar with Java and OpenGL. However, for android, you will most likely have to rewrite a huge portion of the game either for optimization reasons or because of different APIs. Android does not use Oracle's Java Virtual Machine.

unless you know really much about graphic hardware and stuff, it's really hard to make a game, library or engine. And yes, java is a good language!

So I guess a library or sdk will do the graphics thing for me or at least make it easier? Also would you know if that could be implemented for android if a library is used or would that be library specific?



unless you know really much about graphic hardware and stuff, it's really hard to make a game, library or engine. And yes, java is a good language!

So I guess a library or sdk will do the graphics thing for me or at least make it easier? Also would you know if that could be implemented for android if a library is used or would that be library specific?
If you are going to use slick2d you have to keep in mind that it isn't going to work on Android, so if you really want that look for another library.

Because this is the first game you are making its better to just focus on getting a game working and worry about making games for phones, like android, later.

Take a look at libgdx
http://libgdx.badlogicgames.com/

Really easy to create games with it. There is also a nice documentation and a tutorial for developers how to begin.

Libgdx is easy to configure for Desktop, Android and web games.

Follow my hobby projects:

Ognarion Commander (Java/LIBGDX): https://github.com/OlafVanSchlacht/ognarion-commander

I would recommend focusing on game mechanics: health system, collision detection and moving objects around. Java has a built-in library to do this. I spend time coding Java for 3 months really helps build my algorithmic problem solving skills in Java.

Take a look at the Canvas, JPanel, Component and Graphics2D class in the Java API. You will need these classes to form the base of a 2D game.

unless you know really much about graphic hardware and stuff, it's really hard to make a game, library or engine. And yes, java is a good language!

So I guess a library or sdk will do the graphics thing for me or at least make it easier? Also would you know if that could be implemented for android if a library is used or would that be library specific?

It is quite complicated to make a multi platform title with a low level library. Say that you want to do it all yourself, grab LWJGL and code the OpenGL stuff by your own. You'd have to make several renderers for your target platforms (mobile, desktop, etc) which it gets complicated really fast.

If you're going for multi platform from the start, better grab a library that already can do that stuff for you (I've heard good things from what Olaf Van Schlacht suggested, libgdx, though I haven't used it).

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

This topic is closed to new replies.

Advertisement