Redesign the World Object
Plan:
-
a field has 3 layers
- groundTexture layer (saved within the chunk jsonFile)
- structureTexture layer (structure textures from houses etc, saved in a list in the world)
- decoration layer (items)
-
decoration and structures are stored in List of new deco / structure class
-
structure Classes:
- houses there need to be split into 16x16 tiles for preparation of the textures in the world fields
- each structure gets an own subclass (healthCenter, trainingCenter etc.)
- size (width and height)
- coordinates in the world
-
decoration Classes:
- also subclasses for each decoration, always smaller than the fieldSize
- a decoration can only be in one field at once
- coordinates to calculate the right field saved in game.json in world Object, added to a Chunk on runtime when its rendered the first time
normal / most trees are handled as groundTextures, so the structure List wont get too big
more abstraction the whole world object is a little too bit, also i want to make it possible to have multiple worlds in Game
Edited by Joriex