Day based task system

Trying to find the best way to implement a day based task system in c++. I’m trying to setup something where you have a certain number of days and each day the player has a new set of tasks to complete before they can go to bed, where going to bed triggers the next day therefore the next set of tasks. Not really stuck on anything in particular just need help brainstorming some good efficient ways to implement a system like this.

What have you already come up with?

Don’t get too bogged down in “best”. Build something that works and you can improve it later as you need new features or understand how the solution isn’t working for you as currently implemented.

1 Like

Well first I tried a struct based system in a single game mode class, where each struct held variables representing what needed to be done in that particular day, and you could swap between the structs based on which day it was but that ended up being a total nightmare, im honestly thinking I might just create a separate game mode and level for each day and just handling it like that, although that would probably be fine since this isnt on a very large scale id prefer to find a more efficient method, both for game reasons and learning reasons.

single player or multiplayer?

its kinda just a quest system really, id have the GameState or GameMode track time and call time based events.

and id create a UObject base for task/quests each UObject can bind to world events (interact with actor x) and time events.

then create a UObject subclass for each quest and add them as a list to your player

The struct solution sounds like it should be perfectly viable (depending on the tasks), you’d have to describe how it was a nightmare for any help there.

I would suggest avoiding tying each day to a specific level. Even for a small scale, populating those tasks from something else (even if it’s just the game mode with the tasks for every day) will make it much easier to add new days, debug by starting on different days or even transitioning to task lists that are generated in some way instead of fixed.