A dynamic map
Another day, another dollar, well not really my game is not even finished. I want to mix in a fair bit of technical stuff in my blogs because I like talking about it and its useful for others that want to make games and wonder on how to approach solving the various different systems required to make RPG and other games.
I've been thinking about my game world and it is dynamic in terms of objects that are not part of the main map, but I also want the main map and sub maps (for example inside interiors) to be dynamic and change based on quests, characters reps and so on.
The way the system works at the moment is the whole map is covered in rectangular areas, when the player gets within range of that area all of the game objects switch on, for example NPC's, crops, objects and so on. I implemented it this way for a number of reasons:
- I want to reduce processing so I'm only processing the area that the player is within, this helps keep a nice smooth frame rate on slower devices and reduced initial memory usage / allocation times
- I want to switch areas of the map on/ off based on the time of day, day of week, month and season. For example when entering the town market in the day you will see NPC's and quest givers but enter at night and they will have gone but giant poison spitting rats are there instead
- I want to switch areas of the map on based on quests that have been completed or rep with certain characters etc.. Completing a quest for the trader causes wild turkeys to spawn behind the trading post as an example.
So systems like this are in place and working well, but I also need to make the map change. For example, there is a quest that involves helping the local witch fix up her broken house. Once you have helped the witch the house will be rebuilt, this needs a change in the world tile map.
In addition, we need to allow the player modify any houses that they own, so they can be decorated and new rooms added. The player can own multiple houses b y the way.
I ended up with two separate systems, the decor system that deals with interiors, it supports adding new rooms to the house as well as decorating those houses with all sorts of different types of objects and flooring. This involves painting those items into the interior map once the player enters it, the system is very nice and dynamic.
The second system works on the main game world tile map and it supports copying in a new section of tile map over the existing map (multiple layers) and objects that should be switched on and off when this map mod is applied. An optional quest is also stored which can be used to determine if this map mod should be switched on or off. For example when the witches hovel quest is completed it will always apply the map mod,

Twilight Haven
A living RPG world of farming, magic, and adventure
| Status | In development |
| Author | mrmop44 |
| Genre | Role Playing, Adventure |
| Tags | 2D, Crafting, Indie, Solo RPG |
More posts
- Farming but not farming centric10 hours ago
- Map Progress Update 27 Oct 255 days ago
- Making a moddable game5 days ago
- Resources - stuff things are made of5 days ago
- Mines and monsters15 days ago
- How it started15 days ago
Leave a comment
Log in with itch.io to leave a comment.