Hi Tony and everyone,
I'm developing a space roguelike prototype at the moment, which means a few things:
1) It's turn based.
2) Most of the NPCs are not in a scene at any given moment, so they don't really need to be stored as game objects, only as data.
3) Even though they're not in scene, they still have a chance to get their emotional state and relationship values updated every turn by procedural events.
At the heart of the prototype is a utility AI quest generator which will use current emotion and relationship data along with procedural templating to (hopefully) generate interesting quests.
I'm considering using Love/Hate to manage the simulation of factions, personal relationships, and emotional reactions that take place procedurally across the game world, but I wanted to get your thoughts on this use case.
I know you've talked before about customizing L/H for turn-based play by adjusting the game time. However, this is also a case where I probably wouldn't even use the built-in gameObject components, since executing a lot of the procedural stuff would happen through code which generates events and updates C# objects in the background.
Does L/H seem like a fit for this? If so, could you say a bit about how you might approach it (or at least what you might be concerned about)?
Thanks as always!
Thoughts on using Love/Hate for a roguelike?
Re: Thoughts on using Love/Hate for a roguelike?
Hi,
I'd create empty GameObjects just as holders for the faction member data. (FactionMember is a MonoBehaviour.)
As you mentioned, handling turn-based play is easy. Set GameTime.mode to Custom, and increment GameTime.time each turn.
I'd create empty GameObjects just as holders for the faction member data. (FactionMember is a MonoBehaviour.)
As you mentioned, handling turn-based play is easy. Set GameTime.mode to Custom, and increment GameTime.time each turn.
Re: Thoughts on using Love/Hate for a roguelike?
Excellent, thanks so much. I will give that a go.
Re: Thoughts on using Love/Hate for a roguelike?
Glad to help!
Re: Thoughts on using Love/Hate for a roguelike?
Hey Tony,
Finally getting back to this project after a long delay. When you have a moment, I just want to confirm a couple of things about L/H and turn-based play:
1) It looks like the GameTime.mode I'd want to use for turn-based play is now called "Manual" not "Custom." So...
Correct?
2) Can I just set GameTime.mode once in the Awake/Start of something like a turn manager class and then forget about it? That is, will it then essentially just wait for me to increment GameTime.time after that, with L/H listening for when I do?
3) It seems like I can set GameTime.deltaTime to a fixed rate like 1/60th of a second using this approach, since turns will happen totally independent of frame updates?
3) Also, using this approach, will I need to keep track of the current manual time increment across saves? It seems like no, but I just wanted to double check.
Sorry for all the questions; up until now, Unity's Time class has always been a bit of a black box for me.
Let me know what you think, thanks!
Finally getting back to this project after a long delay. When you have a moment, I just want to confirm a couple of things about L/H and turn-based play:
1) It looks like the GameTime.mode I'd want to use for turn-based play is now called "Manual" not "Custom." So...
Code: Select all
GameTime.mode = GameTimeMode.Manual;
2) Can I just set GameTime.mode once in the Awake/Start of something like a turn manager class and then forget about it? That is, will it then essentially just wait for me to increment GameTime.time after that, with L/H listening for when I do?
3) It seems like I can set GameTime.deltaTime to a fixed rate like 1/60th of a second using this approach, since turns will happen totally independent of frame updates?
3) Also, using this approach, will I need to keep track of the current manual time increment across saves? It seems like no, but I just wanted to double check.
Sorry for all the questions; up until now, Unity's Time class has always been a bit of a black box for me.
Let me know what you think, thanks!
Re: Thoughts on using Love/Hate for a roguelike?
Hi,
Yes.joeykid6 wrote: ↑Tue Feb 22, 2022 2:59 pm1) It looks like the GameTime.mode I'd want to use for turn-based play is now called "Manual" not "Custom." So...
Correct?Code: Select all
GameTime.mode = GameTimeMode.Manual;
Yes.
Yes, you can do that, but Love/Hate doesn't do anything with Gametime.deltaTime.
Yes. When you load a saved game, restore GameTime.time. Faction Members clean up their memory based on the current value of GameTime.time.
Re: Thoughts on using Love/Hate for a roguelike?
Wonderful! As always, thanks for the quick, thoughtful response. I own like 175 unity assets and you consistently provide the best support of any dev I've ever contacted.
Take care,
Joe
Take care,
Joe
Re: Thoughts on using Love/Hate for a roguelike?
Thanks! Happy to help.