I'm about to begin on the engine for the game I am making. However, I am quite uncertain how I should design it. I have heard lots about threaded games, component and asynchronous systems. I'm wondering which design will give the best performance using the LWJGL with a 2D game. I know that how I build it will greatly impact the performance. I just want to know what direction I should go in for the engine based on what has worked for others.

  • 1
    \$\begingroup\$ This is a very vague "how do I get started" question. Start writing your code and post here if you run into any concrete issues or questions. "Best performance" is very hard to nail down if you have no previous metrics and have no clear definition of what you're trying to make or what hardware you're targetting. \$\endgroup\$ – Sean Middleditch Sep 13 '13 at 22:06
  • \$\begingroup\$ I'm not explicitly asking where to start. I just need to know what design is the most effect/most used/ect. with LWJGL. \$\endgroup\$ – TheNickmaster21 Sep 13 '13 at 22:14
  • 1
    \$\begingroup\$ "Which architecture is best" is quite subjective. The answer for one type of game is going to be utterly different than for some other types of games. LWJGL is not relevant to the decision; the game you're making is. \$\endgroup\$ – Sean Middleditch Sep 13 '13 at 22:22

LWJGL is a tight wrapper around OpenGL. This means that best-practices, techniques and designs are rougly the same as any other language.

You have 2 options here:

  • Write your own 2D engine with OpenGL
  • Use a library for LWJGL like Slick. It will give you the basics like simple texture loading, font drawing and more.

If you are new to Java in general, it's a good idea to use a library, as you can focus more on the general Java programming instead of the OpenGL syntax. If you are completely new to Java though it's probably a better idea to do some normal Java programming first. Making a game is not a simple thing, especially if you are going to make the engine yourself. You will need to use alot of OOP, and you definitely need programming experience.

A good video tutorial series about Slick 2D: EddieVanHalen98 (youtube).

The exact techniques and designs depend on the type of game, and the scale of it. Your question is too broad for this site. As Sean said, start with your code, profile your code, and come back here for more specific questions.

| improve this answer | |
  • \$\begingroup\$ Slick has poor and old documentation so I was hoping to to just avoid trying to figure it out. I'm aware of how difficult this will be; i have java experience. Thanks for your feedback. \$\endgroup\$ – TheNickmaster21 Sep 13 '13 at 23:09

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