OsnaCS / plantex

(UNMAINTAINED) :seedling: experimental open-world exploration game with plants :evergreen_tree: :leaves: :herb: :palm_tree:
Apache License 2.0
191 stars 37 forks source link

Make the world mutable #58

Open LukasKalbertodt opened 8 years ago

LukasKalbertodt commented 8 years ago

The player should be able to change the world with various methods. Additionally we might want to simulate some effects in the world which will also mutate it.

This imposes a challenge to our current system which only creates a WorldView out of the world in the very beginning (once!). To mutate the world (and see the result) we need to update all views accordingly. To me it's still a bit unclear, how we should do this, but I guess the "easiest" way is to recreate the ChunkView completely every time a Chunk is edited. Later it can be measured if this is too slow and if yes, thought of another technique. My current guess is that it's just fine...

But even with this complete regeneration of ChunkViews, I'm not sure how to structure the source code to achieve this. This issue is probably linked to #56 and #57.

kanashius commented 8 years ago

@NilsAffing @Kanashius starting with implementation of method to findout where we are looking at (hexagon)

LukasKalbertodt commented 8 years ago

What about this now? Apparently there are still broken indexing methods that cause the wrong pillars to be removed?