miron / NeonCore

Terminal based Cyberpunk Tabletop RPG with Nostr as database and openAI API compatible commands
3 stars 1 forks source link

NPC and Player placement #33

Open miron opened 1 year ago

miron commented 1 year ago

In a traditional tabletop game, the Game Master or Game Mechanic is responsible for placing NPCs on the map, and the player doesn't have direct control over when and where they encounter them.

Here are a couple of ways you could implement NPC placement in the game:

For example, you could have a spawn_npcs() function that gets called when the player enters a new area or after a certain amount of time has passed. This function would be responsible for randomly spawning NPCs in the new area, while still keeping some NPCs in predetermined locations based on the player's progress in the game.

You can use this method to place them in the positions where they should be in the map, it's a very intuitive way, that allows you to see which NPCs are active and where they are in the game.