Platform games are generally tile-based. So use a 2D array to store your map tiles. You only draw the tiles that are visible within the viewport (what the play can see on the screen). You'd basically have a map pointer that keeps track of what position in the map data it should start drawing. Using different layers (different Z-depth) you can create parallax scrolling backgrounds.
Don't use JPanel for drawing all these graphics. I never heard of GCanvas (i haven't done games in java) but if its designed for drawing graphics and game sprites, then it'll probably already be setup for double buffering.
Reputation Points: 92
Solved Threads: 51
Practically a Posting Shark
Offline 856 posts
since Mar 2004