object array mobile development
<p>Im currently creating a tile-based game for android. Using java via dalvik JVM. im fretting over a decision to represent objects in a particular map. should i use an id based map (2 dimensional integer array) and place game logic in a separate function in the game engine, or create an object array (2 dimensional array of game objects) and store game logic within the class methods. i am thinking about the cost of object creation and garbage collection vs extensibility.</p>
