andrew arthur
2004-06-08 16:05:19 UTC
Hi guys,
I'm starting my first Java game, and need some help with the graphics. It's
going to be an RPG on a tile-based 2D map. Here's what I have so far:
About 20 PNG files (50x50) // these will be the tiles
A Tile class which extends JFrame and displays a PNG file
A Map class which creates the map as an int[30][30] array // the value of
the int determines what tile will be displayed
I want the GUI to show only the 400x300 area surrounding the player.
Question 1: Is JFrame the best way to represent a tile?
Question 2: What's the best way to lay out the tiles?
Cheers,
Sean
I'm starting my first Java game, and need some help with the graphics. It's
going to be an RPG on a tile-based 2D map. Here's what I have so far:
About 20 PNG files (50x50) // these will be the tiles
A Tile class which extends JFrame and displays a PNG file
A Map class which creates the map as an int[30][30] array // the value of
the int determines what tile will be displayed
I want the GUI to show only the 400x300 area surrounding the player.
Question 1: Is JFrame the best way to represent a tile?
Question 2: What's the best way to lay out the tiles?
Cheers,
Sean