Need help on setting up the strucute for a SideScrolling game

I am using the tile approach and put the objects in a 2D array. For objects that move and interact with the chracters beyond just being there I have a list. The first group of Objects are called bricks and the second is World Objects. Bricks' locations are confined to the grid, but worldObjects' locations aren't. In the levelcreator I''ve made for the game you can select a brick and place it down and select a worldObject and place it down on the grid. I was wondering how I should make it so worldObject's aren't confined to the grid in the levelcreator. I've also made it so the levlecreator is zoomed out more than in the game. The grid consists of 75x75 tiles in the game and 50x50 tiles in the levelcreator. To switch from the levelcreator to the game I simply multiply by 1.5. Any suggestions. Or should I make it so All objects lie on the grid?Thanks. Any questions just post them here

[910 byte] By [WookieRebela] at [2007-10-1 19:36:00]
# 1

make the world objects totally independent of the grid while the bricks be dependent on it. have the world objects in a list with their positions stored in the object itself. When your doing, say, collision checking with bricks, just take their positions and see if the cell it occupies has a brick in it.

personally i won't use a 2d array for a side scrolling game, the level tends to be rather large and a giant 2d array wastes annoying amounts of memory.

Linkera at 2007-7-11 15:51:07 > top of Java-index,Other Topics,Java Game Development...
# 2

Hi

I am in the process of making a 2D Side Scroller, using the book 'Developing Games in Java'.

The code from this book is available at brackeen.com, (using the link - Developing Games in Java).

This has all the source code for a 2D Side Scroller, which is basic, but does use the sort of arrays etc you mentioned.

Brian_Bishopa at 2007-7-11 15:51:07 > top of Java-index,Other Topics,Java Game Development...