Open alexanderson1993 opened 7 years ago
What would the radius be used for on each node? As a character walks around the ship, it will use the nodes and their edges to each other to determine where/how to walk. The nodes will need coordinates on the ship's map, and perhaps the radius could be used to provide some wandering around a nodes area. Even better - support drawing arbitrary geometric shapes that are "you can walk around this shape" zones, so that characters can walk around entire areas, all supported by the nodes they can reach.
unfortunately, any pre-computed pathfinding algorithm won't work since bulkheads and such can dynamically change at runtime.
The node map will be small enough that just using a regular A* algorithm will be sufficient. If there are 15 decks and 20 rooms in each deck, that means there are an average of 40 edges per deck or 600 edges total. That couldn't be that bad to do pathfinding on.
This would build on top of the regular ship structure elements (Decks and Rooms) in addition to the personnel elements (Crew) with the addition of two main types:
Nodes, which connect to one another. Nodes can be assigned a room which designates relatively where they are on the ship.
Nodes have a structure much like this:
Nodes would be traversable by crew. Crew would have a few additional attributes added to them:
D&D attributes:
Those attributes would work together to determine which target the crew has, it's speed, and what actions it performs. This would be based on Markov Chains. For example, if the constitution is too low, the crew will go to the rest target and regain that attribute over time. If the crew has a high charisma, it will attempt to stop and talk to other crew as it journeys through the ship. It all depends on what the probability of doing a certain action leads the crew to do.
Core would be able to adjust a person's attributes as well as adding, removing, assigning targets, and moving crew.
Intruders, exocomps, and monsters could also be shown on the map with the crew members. Entities such as these could potentially have additional nodes that would be available to them, such as jefferies tubes, etc.
Officers could be assigned using this screen. An officer could see which crew are under their jurisdiction with a different color. By clicking to select them, they can then select the room they want them to go to, optionally providing instructions. This can apply to security, damage control, medical, etc.
The bridge of the ship would be blocked off, for obvious reasons. However, they would be able to see dots approaching or moving away from the bridge.
Utilities would also be superimposed on the map. Possible utilities are bulkheads/force fields, water pipes, and power conduits. For example, security could open and close bulkhead doors, sealing decks and rooms. The engineer could reroute power using the power conduits themselves. The systems could also be shown on the ship as utilities.