Hello all,
Im fairly new to java but have been working on a game that i’ve been planing out for some time now. The game is still in the development stage and i have programmed a few classes the take care of some parts of the game but i’ve come to a dead end and can’t seem to find a way to get the graphics i would like to see.
So, so far i have a classes for these things:
- Entity (super class for objects in the class… such as character, wall, door, enemy, etc)
- Characters (sub-class of entity)
- Main Panel (will hold all of the graphics and handles mouse/keyboard events)
- Tiles (a class the holds all of the tiles…)
- Item (sub-class of entity… will do general “item”-like things)
- Game (class will control general game flow and logic)
Now that i’ve gotten these i’m not sure where to go next. I want to get the display to work but im having trouble implementing this. I was thinking about using arrays to store the maps for the tiles… I would to use 2D graphics in this rpg but im also having trouble deciding an size.
Here (in psudo-code) is what i was thinking about using:
declare map
...
// store the layout for the tiles in an array
map = { [1,0,0,1,1,1,1],
[1,1,1,1,1,1,1],
...
}
...
displayMap(map){
for(int j=0; j<map.length; j++){
for(int i=0; i < map[j].length; i++){
// draw a tile at the location its correct location
draw(map[i])
}
}
...
so if anyone have any ideas then…
Thanks for what ever amounts of time you decide to donate to me 