General Category > Private Alpha Discussion

Improving Wave Options

<< < (2/7) > >>

BadgerBadger:
You'll be pleased to know that your sketched plan was very similar to what I was already planning, though more concretely and accurately realized. Good stuff.

I actually have MonoDevelop installed, but it crashes whenever I try to start it and I haven't gotten around to debugging it.

BadgerBadger:
Okay, I'm not quite done yet, but things are coming along nicely.

I do have one question. How large should the first wave be? For all waves past the first wave, I just spend the value in faction.AITypeData.BudgetItems[AIBudgetType.Wave] which is generated by the Budgeting code. But for the first wave the budget won't have accumulated yet.

keith.lamothe:

--- Quote from: BadgerBadger on November 13, 2017, 12:19:41 am ---But for the first wave the budget won't have accumulated yet.
--- End quote ---
TryToSpendBudget (which calls TryToSpendBudget_Wave) is only called when faction.StoredStrengthByBudget[budget] >= faction.GetSpecificBudgetThreshold(budget) , so whenever TryToSpendBudget_Wave calls PlanWave you can trust that spending the amount in faction.StoredStrengthByBudget[budget] is a reasonable thing to do.

Are you not finding that to be the case?

BadgerBadger:
Ah, I didn't know how TryToSpendBudget was called (that call doesn't seem to be in external code). I actually assumed it was called every X seconds, based on faction.AITypeData.BudgetItems[AIBudgetType.Wave].SecondsBetweenAttemptsToSpend.

That said, the problem with the first wave is this. Lets say that the budget accumulates such that a wave comes every 5 minutes. In the old regime, this meant at the 5 minute mark a wave would show up. In the new regime I only queue the wave once the budget is filled, then the wave actually spawns faction.AITypeData.BudgetItems[AIBudgetType.Wave].SecondsBetweenAttemptsToSpend after it has been queued. So in the new regime, the first wave would show up at 10 minutes in. This means that the very first wave is a special case, since I would like to queue it as soon as the game begins.

Or am I missing something?

keith.lamothe:

--- Quote from: BadgerBadger on November 13, 2017, 08:57:09 am ---Ah, I didn't know how TryToSpendBudget was called (that call doesn't seem to be in external code). I actually assumed it was called every X seconds, based on faction.AITypeData.BudgetItems[AIBudgetType.Wave].SecondsBetweenAttemptsToSpend.
--- End quote ---
It's only called when the threshold is hit. The threshold = (amount accumulated per second) * (SecondsBetweenAttemptsToSpend)



--- Quote ---This means that the very first wave is a special case, since I would like to queue it as soon as the game begins.

Or am I missing something?
--- End quote ---
I think the thing you're missing is that the first game did not queue a wave as soon as the game begins, and that's why this model (adopted from the first game) does not fit well with an immediate wave :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version