Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What pst says about the pros and cons of the two approaches is absolutely correct.</p> <p>However, I wouldn't recommend either. I would use a "designed for games" game engine such as <a href="http://slick.cokeandcode.com/" rel="nofollow noreferrer">Slick2D</a>, and it will help you immensely with the update and logic in a game, the structure of the main game loop, as well at take care of a lot of the low-level issues you'll run into.</p> <p>If you're considering using Swing for games, I would also stay far away from that, for the reasons outlined <a href="https://stackoverflow.com/questions/7781040/java-graphics-stages-of-a-game/7781130#7781130">in my answer here</a>.</p> <p><a href="http://slick.cokeandcode.com/" rel="nofollow noreferrer">Slick2D</a> comes pre-built to handle the timing issues, and figuring out the deltas between rendering frames, etc. You also get a lot of nice stuff that you don't have to build on your own, such as input handling (keyboard, mouse, controllers), accelerated graphics (your games will automatically benefit from graphics acceleration because the engine takes care of this for you), and when you get ready for audio it also has a great audio library.</p> <p>Writing all this stuff yourself is going to make you want to cry. Unless you're really into building the engine itself (as opposed to wanting to spend your time building the game logic itself), building engines is a lot of time spent when you could just use a mature tool off-the-shelf.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload