Starting to develop games.

Hello, I’ve been studying Java for a little while now, and I’d say I know enough basic stuff to start making some small games.

I have some questions before I begin:

  • Should I try to make my own engine, or use one that is already made? And which one?
  • My games are going to be 2D only for now. What libraries should I use?

And if there’s anything else you think that I should know before I start, feel free to tell me!

No you should not try making your own engine. Try libgdx or slick2d or even Mercury.

Hi and welcome :),

To start with: It’s very good you’re starting with a 2D game. Most of us have started with that, and most of us think that it is the way to go when you just got into gameprogramming.

Making game engines is a very good way to learn in depth about games, and personally I think it’s really fun to do. However, aside from educative reasons, if you want to actually create a game and have a high performace, I suggest you start using a pre made game engine. On this forum you’ll be able to find a few 2D game engines such as Mercury. I haven’t tried it myself, but I do know about it’s existence. I personally had some experience with Slick2D, which, IMHO, is a very nice library and fairly easy to use.

If you want to get something more of a challenge (but I’d suggest you first start of by learning game programming basics) you can look into LWJGL, which is the library for hardware accelerated graphics in java.

You could also make a game in Java2D, which just uses the built in Java API’s for graphics programming. Personally I learned it this way, and by using some Google magic and some trial and error it’s fairly easy to get a decent game going.

I find it hard to tell you exactly where to start, but I guess you have enough information now to start with.

Good luck and happy programming :smiley:

Start with simple games, like tic tac toe. Or minesweeper. Go from there.

You need to create a few games before you can create an engine. Otherwise you don’t know what problems you are trying to solve.

It will also give you more of an idea of the amount of effort that has gone into LibGDX or jMonkey Engine.

Absolutely not.

None. Start out with basic Java. Write Pong, or Flappy Bird. Get a few tiny games under your belt, then revisit the idea of libraries.

I agree with KevinWorkman and delt0r: neither make your own engine just yet nor use a pre-made one.

Make games using basic Java and only use the accompanied Java Class library. Make simple games and go from there. Slowly as you start making more and more games, you will notice general patterns you use for standard constructs, class relationships, and behavior… => game “engine”/library/framework (they all refer to the same thing).

If you want to just focus on making games, when you get to this level I highly recommend you use good pre-made one. Not only you will have the advantage of being able to understand how it works underneath but you will be able to accomplish more in completing a game.

Do yourself a favor and don’t use SJGL :persecutioncomplex:

Not only do you wanna use a pre made engine like libgdx (engine is a loose term)
you also probably NEVER want to write your own engine EVER. Unless that is specifically something you want to dedicate many years of your life to and imply that you can do better or as good as existing solutions.

Just make a few simple games with plain Java, and when you feel like it, learn a high level library (like LibGDX, which is more like an engine), and if you feel like you want to get more into the low-level stuff, consider something like LWJGL.

But remember, make games, not “engines” or “libraries”, that just slows you down. Have fun making games, it’s much more enjoyable, and you’ll make faster progress that way. :slight_smile:

If you are interested in making games and only games then grab an existing game engine / library and go make a game, there are quite a few around which are good and these have some good tutorials and intros. Lots of people on this forum will help you out with the many questions.

If you are interested in making games but would like to like to eventually make an engine or library then make a game using an existing library and learn how the engine is structured to get an idea of how to do it yourself, the alternative is to make them both together but this will be much harder because there will be a lot of trial and error (a lot will be an understatement).

If you want to make an engine / library you should understand it will probably be a personal project which little or no other people will use and that it will also take a long time. Your engine will also be in the quality range of very bad to very good and most likely near the bad end, this is just because the task is a big one and a hard one.

Me personally, I have always had a life long ambition to make a game (3D RPG) and because of who I am I like to learn all the bits that go in to making the game so I am also making an engine at the same time. Its a really fun project but I know it will take a very very long time but I am ok with that. And I also understand that little or no people will ever see it or use it, again I am ok with this. Some people would say its a colossal waste of time but to me it isn’t :slight_smile: