Hello all.
I’ve been wanting to create my own level generator for future projects (I can always buy an existing one, but I think creating my own tools is part of the fun, as well as a must for growth).
I want to ask, what do you think a node should contain?
I have a few suggestions, I want to hear your opinions, suggestions, etc…
So I’ve been thinking of creating an interface that would contain whatever may be needed.
Mob Environment Parameters
Interaction interactionOptions- A class that will hold interaction options (can you interact with this type of space? Object type? Locked object? Burning object? etc…)
Movement movementOptions- A class that will hold permissions (Maybe you’d want a water node to be unwalkable, unless the player/mob has a swimming ability/item?)
Sight sightOptions- A class, same as above, allowing visibility options (Can\can’t see ghosts? A hidden switch?)
Node Parameters:
NodeInteraction interactable - Does the space itself have an option of interaction? (such as hidden items in RPGs, hidden switches, this node is a locked gate, etc…) A class that will hold “permissions” (can a mob interact with it? Only player? Only if you have an item? Only at a point in time? Event?)
NodeEnvironment environmentType- Water? Fire? Chasm? This will probably decide if a mob can step on it (if water, the mob’s movementOptions should include water if it wants to step on this tile, if fire, damage, etc…) It should also include the cost for movement (be it damage, slower movement, etc…)
NodeVisibility visible - Is it visible? An Enum giving visibility options (dark node only visible to mobs able to see in the dark, secret area, etc…)
NodeContainer container - A class that would hold the data for objects (items, mobs) that are on/in that node.
NodeStatistics stats - A class that would hold the node’s size, world/grid coordinates, neighbors, their cost (for A* perhaps?) from this node, the room the node is a member of (if the dungeon is cut into rooms, you may want to give it a member, such as, graveyard, cellar, dining room, etc… This would also allow you to set things for random generation, such as, graves only in graveyard, etc…)
NodeExpression expression - For the lack of a better term for now… The sound this node will have (overwrites one given from a room type/environment type), the texture/sprite.
These are the basic classes I am thinking about for now.
I’ll move on to the sub-classes and functions whenever I’ve decided what the parent node object should hold and how it should behave.
I’d love to have any sort of feedback, ideas, etc…
Especially a better name for “NodeExpression”…
Thanks!