Hello!
Firstly, I’m making a game using slick. I’m going for a top down strategy/rpg style, kind of like “dungeon keeper”. I have two questions.
- I’m trying to organize it and give it a good design. In the main class (which is a state) i have update() and render() method and I have references to all Images and objects which I’m using. Right now I’m working on the map, which is an array of tiles, 16*16 pixels big. The update method updates the tiles that are on screen and the render fills them on the screen. However, to get a good design, I’d like for the update and rendering of the map take place in the map class itself, so that my core only has:
update(){
map.update();
//update map, minimap, gamepanel, etc.
}
render(){
map.render();
//etc.
}
So that it is clean, just acting as a spider in the wed.
But when I implement this I get funny results. I suspect that it has to do with threading. My core is runnable, but my map class isn’t. It doesn’t implement or extend anything.
- I’m also worried about my FPS. With an empty screen I get 5000FPS. When I fill my screen with my 1000 tiles I get 1000FPS. I’m then going to put in tons more logic, loops animations, objects, effects and so forth, will it be enough, or shall I have to abandon the large-scale tilesystem?