How should objects be in a Java game.

Posted by Gabriel A. Zorrilla on Stack Overflow See other posts from Stack Overflow or by Gabriel A. Zorrilla
Published on 2010-04-19T01:45:53Z Indexed on 2010/04/20 0:43 UTC
Read the original article Hit count: 334

Filed under:
|

EDIT: i just deleted the entire post and reformulated the question to be more generic.

I want to do a simple strategy game: map, units.

Map: one class. Units: another class, self drawn.

Simple questions:

  1. How does an unit should redraw itself on the map.
  2. A unit should be a JPanel or similar Swing component (just to be able to manage them as an entity with its own mousehandlers) or can be another thing, without neglecting the fact that it should be an autonomous object with its own action handlers and fields.
  3. Is this map-units model correct of a simple game that would help me to learn in a fun way Java and OOP fundamentals.

Thats it!

© Stack Overflow or respective owner

Related posts about java

Related posts about game-development