Been working on the new dungeon system, here are some of the new things so far.
The first is a rework of the transition system. This is kinda hard to explain without going into technical details. But basically, under the old system, the game simulates all zone that the player have visited. So the game may be running the village area, the tent area and the dungeon area at once. This have a couple of problems, such as poorer performance and oddities such as villagers falling into the camp and so on.
Under the new system, only one active zone is run at once. If you visit the village, the tent area is “frozen” into data and removed from memory. When the player visit the tent from village, the village area is “frozen” and the tent area is loaded into memory.
So why isn't this done in the first place? Well, basically, the game had some issues in saving units information. So the village cannot be “frozen” and brought it back. If done so, it would be a ghost town.
That brings us to the second feature. Which is maps now saves (some) unit information, in addition to some other stuff required for the next feature:
Feature three, a new dungeon generation algorithm.
The main change is that instead of generating everything procedurally, this new algorithm will take a list of existing premade pieces (map files), and sew them together to make a dungeon.
Here are a couple examples: The individual dungeon building blocks are on the left, the generated output is on the right.
Compared to the first algorithm, the new algorithm generates more linear dungeons instead of maze-like. think this is an improvement because running around/ backtracking in a maze really isn’t that interesting.
Also note that the “walls” are a pure development tool to distinguish between the building pieces. The algorithm only cares about where the connections can happen (those are in blue) in each building block, it is entirely up to the creator how each block should look like.
Finally, I added “blueprint” items. These can be used to place objects in the environment. How it works is similar to Minecraft, you acquire the item (through shop, drop, etc), equip it, and it will bring up the preview model on the cursor. Move around, look around, then press LMB to confirm placement.
The end result is similar to what you can accomplish via the “terrain_editor,” but this is much better in my opinion. The interface is a lot cleaner and it takes advantage of the hotbar system so you can quickly access to the objects you are interested in. But the biggest reason is that the “terrain_editor” is too powerful for regular gameplay, it’s basically a cheat. However, these individual blueprint items can be fine tuned in terms of what type of objects the player can construct, their accessibility, and their cost.
Still a bit more work to do. Need to implement some additional meta information/placement information, etc which are required for turning the 2d sewed-together dungeon blueprint into reality. I should be able to get the features working sometime near the end of next week. However, actually making the individual map files (dungeon blocks) and create a new dungeon will probably take some more time to do. So what I might do is release the next build with the new features but without any new dungeon/content. It’s probably going to be somewhat buggy and it’s probably more for the modders rather the players. Caution is advised. :D
No comments:
Post a Comment