I’m a bit confused as to how to organize classes and maket hem interact when developing a game that has multiple levels in it, or if your developing an RPG how to handle creating the world(terrain and stuff) and dealing with what location your ina nd stuff…
Ive made a guess as to how to structure this… its probably the completely wrong way to do this, but i dont know of any other way, imt rying to design a simple RPG game, classic zelda-looking.
Mainc lass that extends an interface that has final data on window size and get methods for different things, and in this main class, you loop a logic method, and then a drawing method… a seperate class for logic, to make all the entities move and stuff, then a class for drawing, the drawer class extends your window(canvas) so it can draw onto it. the drawer gets all positions of the entities and just draws them on the screen. a class for the resource cache to retrieve the sound and graphics… and then i was thinking about mabye a world class, that would deal with different levels and area’s, say you want to be able to zone…
Main class ---- extends Stage(interface)
|| | || all classes can access
|| | || data throug this
|| | ||
|| | |------ResourceCache
World<-|| | /-holds sound + images
| | Entities
edits–Logic /
entities Drawer----------extends — > window(canvas/jframe)
positions |
-retrieves entity positions and draws

