DefQuest - Future Scheduled Events

You know in games like Hearthstone where you have quests and get a new one every day? Or games where there is a crate which unlocks in so many hours? Or energy/heart systems which fully recharge in so much time? All of these mechanics are compelling in driving re-engagement with users so that they want to come back to the game every day. Maybe you don’t want to have a game server, but still benefit from these kinds of features.

DefQuest is meant to help with those kinds of systems. It does not trust local time and instead syncs local app time with Google’s time servers to allow reliable time progression without allowing time traveling users to cheat the game systems in their favor. If the game ever loses focus the game will resync just to make sure that time continues to be accurate. You can enable it on screens where time tracking matters and not have it continue to tick away on other screens, and it will know what to do once turned back on again. By default, it uses DefSave to automatically save its own persistent data between game sessions too.

You create quests, assign a time for them to be finished, and can include a data table on what your game is supposed to do when that quest is completed.

It’s not 100% ready for projects, but showing it now so people are aware it exists. I’ll be updating it more and improving it over time.

11 Likes

This looks nice!

2 Likes

Started with adding HTML5 support. It can now be tested on the asset portal and should save your active quests between sessions.

HTML5 can’t use sockets so it can’t use NTP. I looked for a simple timestamp api and didn’t find any that was as simple as I wanted so I made https://www.timestampnow.com/ which is as simple as it can get, and I can guarantee it will be active long term. If for some reason it does go down permanently then it would be easy to replace too.

If you trust the time of any site’s headers you can get time from any site, but it’s not in timestamp form and I didn’t want to convert it either - plus the extra download is lame. I will probably add MS to the timestamp so it’s the same as NTP - right now it’s seconds only.

This is still not production ready but it is getting there.

5 Likes