Author Topic: Game Pacing  (Read 22532 times)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Game Pacing
« on: May 16, 2017, 08:42:34 AM »
Thread for your thoughts on pacing.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #1 on: May 16, 2017, 10:42:56 AM »
I have a suggestion for speeding up battles, but it should really be an option the player can select (if it can be done at all).

This is the amount of time battles take, rather than the number of hits to kill.

One of the things I've noticed on higher danger level maps is the number of enemies causes a massive wait between player turns.

If possible... I propose a (player selectable) option where the enemy doesn't wait between moves. Have the NPC calculate its move and as soon as it knows where it's going the next NPC calculates and moves while the previous one is moving. Visually it will look like most of them are all moving at once (there'd be a small delay between each one starting to move).

It would have to be a player selectable option, because like the option to have the camera follow the enemy, some players like to see what each enemy does.
Having the enemy seemingly all move at once would speed up turns immensely.

... if it can be done without too much hassle (if at all).
(and yes I do realise that, visually, it may lead to some enemies seeming to run through each other)

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Game Pacing
« Reply #2 on: May 17, 2017, 01:50:50 AM »
Although this isn't I-go-you-go of teams I suppose it's always good to do re-considering how things can be pre-calculated. Your proposal for a group of enemies between turns of two player's units is neat but really depends on the workings under the hood. It would require that all actions and results for the first unit were already calculated (including results of attacks of opportunity) and the status of the whole battlefield updated at the time the next unit starts with its calculations, and so forth. Hm, I initially thought it's done this way and calculations for the next one are started while we are still watching animations of the first, but then why there is so long delay at the start of the next unit in a row?


Other options for (not only) speeding up battles overall:
  • Slider in settings to adjust speed of camera actions (scrolling, rotation, zooming, centering) -> at least it can considerably speed up player's turn, but perhaps also when camera follows actions of hostile units.

  • Two sliders for running speed (only movement action) - for player controlled and for AI controlled units separately -> usual setup is having own units to run faster and for enemy slower.

  • Slider for a tooltip delay.

  • Possible re-considerations when camera follow is on:
    • camera doesn't need to fully center on the character when his turn is due. I usually find myself scrolling back to the original camera position. Especially not in the case it would bring us partially out of the map.
    • don't zoom lower than was zoom level the player ended his turn.

  • Let us give orders during animation. Perhaps a bug (quite obvious when CC): right now if I right-click to attack but an animation of the previous action wasn't done yet, the game doesn't remember nor subsequently execute the order. Typical example: If you right-click on your character to heal while he is still changing hands it won't remember and you need to order again. I think, sometimes even "End Turn" isn't obeyed while an animation ongoing. It will become even more obvious with a keyboard support, as we will be much faster at ordering. In case this is done because an action can be changed, then let's consider execute order (right-click) as locking the previous action into finishing without interruption.

  • For any unit doing the same attacks (actions) in a row it would be interesting if can be somehow chained without idle in the middle. For enemy units I guess knowing if needs do more attacks is no problem when it's all pre-rolled. But player sees results with delay, there would need to be some deadline for the next attack order to be counted into chaining.

uff, to be continued?

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #3 on: May 17, 2017, 02:46:55 AM »
lol.... and I'm pretty sure none of our suggestions so far are relevant to what you were originally wanting discussion on.  =)
Sorry about that.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Game Pacing
« Reply #4 on: May 17, 2017, 10:05:51 AM »
It's good to get ideas - how do you feel about pacing in general?

Your idea for precalculating is good, but it's also going to be very (very) hard to implement. I noticed X-Com 2 does this (and moves enemies at same time) when you alert aliens, but it's for simple stuff, like taking cover after being spotted.

Some of what you suggested will be looked at ushas. CC animation speed can't really be touched, but move speed can. Accepting orders while animation is playing out would be work intensive. Camera movement speed slider is a good call, very doable.

Some thoughts: AP systems (rather than the 2 action system in more modern games) generally results in slower pacing. There are now limits on the number of enemies that can be spawned at once, capped at around 13 for higher danger levels with a full party vs church. The remainder will spawn as reinforcements. An area that could be worked on is rebalancing the stat system (which would like to do for multiple reasons) and further reducing the number of enemies active at once.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #5 on: May 17, 2017, 06:58:07 PM »
After moving away from the starting gun, I haven't really had any issues with pacing. Just the amount of time waiting until it's my turn again.

I think the pacing (of the default starting difficulty) is fine.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Game Pacing
« Reply #6 on: May 18, 2017, 02:20:27 AM »
Hehe, sorry, got it mixed with the battle pacing. No general thoughts on the game's pacing yet. So please feel free to move my posts anywhere else.

Quote from: Daithi
Accepting orders while animation is playing out would be work intensive.
Sad to hear that. Would it be easier just for some actions? I mean End Turn is remembered here and there already. After all that time still ordering prematurely when changing hands  :-\

Quote
There are now limits on the number of enemies that can be spawned at once, capped at around 13 for higher danger levels with a full party vs church. The remainder will spawn as reinforcements. An area that could be worked on is rebalancing the stat system (which would like to do for multiple reasons) and further reducing the number of enemies active at once.
Yeah, I initially meant to talk about the culpit no #1: number of enemies. Then critically failed the roll against befuddlement. (don't underestimate the smoothness of the player's turn flow though)

So obviously high number makes you wait a lot (aren't turns also more computationally intensive?). Cooked dinner during one such battle (on Vigilante, v15). In v16 had fun playing with Sam alone on Hard Boiled (says one whose ideal number of units to govern is around 14).

Even 13 seems too much for a battle (in total). For Churchers it is indeed interesting gang specific attribute - a swarm. But even then it would be more interesting if higher numbers are more for special situations like a facility attack, or tiles around, etc.

As far as I got the sense what influences this: 4 party members will face at min 8 survivalists at danger 1 and at max 15 churchers at danger 3; and 1 party member faces min 2 max 4 enemies. What is bad on 4 vs. 4-7? Just for the sake of waiting the upper hard limit should be lower, more like 8 enemies. Reinforcements would make it slightly better paced indeed, but can angry players if done unpredictably. And even that will eventually wear down.

Of course if there is be something to do (eg. reaction fire) or interesting happening to watch (barks, grenade catching, turn-timed events) in between turns, then the same number of enemies becomes less taxing.

Quote from: Daithi
AP systems (rather than the 2 action system in more modern games) generally results in slower pacing
Not buying. Technically yes battles in this AP system may last longer than in TU system, TU can last longer than 2 action system... uh, 2 action system is for sure slower than real-time...

Don't all just have different challenges to face when addressing pacing and balance? I dunno, Achilles' heel of fallout-like AP systems being number of units and usage of AP currency.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Game Pacing
« Reply #7 on: May 18, 2017, 01:24:29 PM »
@Nomad - the starting gun has been mentioned before - at least it can be replaced soon. Glad you feel the battle pacing is reasonable enough. Hopefully I'll be able to tune it a little more.


@Ushas - Should have been more specific, is battle pacing most interesting at the minute. Battles are close to fixed, so a better thing to hone in on.

Feeling on queuing orders: the majority of the time is spent in completing the action (moving, shooting, melee animation). Outside that, there's a brief lapse (usually a bit of slack to allow animations to complete), and then input is accepted again. The only gain would be the player's time to react to input being accepted, maybe in the region of a 1-2 seconds. The input is tied into a lot of things, displaying info, querying tiles, triggering animations, managing hand positions. Assuming it's possible, it would likely take days to make the changes and days to handle the bugs. Unfortunately, Benefit Vs Effort isn't good.

Am with you on the enemies - think it's the easiest way to improve the pacing. If we look at a full party 4 (player) vs 13 (enemies) = 17 -  if the character system and stats can be balanced to bring that down to 13 total, that's around a 25% gain. As characters are among the most complex things being drawn, it would help a small amount with performance too. It should be possible to decrease characters more than that, as you suggested, and bump the numbers up for special encounters, like gang leader and facility battles. 4-7 might be low, would like to maintain the idea that you're outnumbered, but this is a promising area to investigate.

Danger level buffs could be increased, to manage the difficulty of battles, rather instead of increasing enemies. A lot of pieces to the puzzle :)


Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #8 on: May 18, 2017, 08:56:19 PM »
It looks like lesser numbers might be the way to go (if coding faster enemy moves is a problem).

Hmm.... would it be possible/easy to have an option where the enemy move animations are increased? So the enemy sprints?
It would need to be an option as some would like to see what's going on. I just prefer for them to get on with it and then when it's my turn, I'll check out where things sit.

Less enemies would be the other alternative.
I think the balance comes down to some maths. Work out what you think a baseline for the characters are, and then work out chances to hit at an average range versus the enemy's chance to hit at that range. Then look at what damage both sides do and then the health's of the two parties.
That will give you an idea of how long a fight should take.
Throw some numbers at me if you'd like me to crunch them and let you know the results.

Eg: If a solo player has a gun that does 8 damage and an accuracy of 33%, it will take them approximately 9 turns to kill an enemy with 17-24 health.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Game Pacing
« Reply #9 on: May 18, 2017, 10:05:22 PM »
Nomad, the best way how some games do this is offering those two sliders for movement speed for your units and for enemies separately. So one can then adjust both to his liking.

Math is a good servant. A bit worried about interpreting such results though.

Am with you on the enemies - think it's the easiest way to improve the pacing. If we look at a full party 4 (player) vs 13 (enemies) = 17 -  if the character system and stats can be balanced to bring that down to 13 total, that's around a 25% gain. As characters are among the most complex things being drawn, it would help a small amount with performance too. It should be possible to decrease characters more than that, as you suggested, and bump the numbers up for special encounters, like gang leader and facility battles. 4-7 might be low, would like to maintain the idea that you're outnumbered, but this is a promising area to investigate.

Danger level buffs could be increased, to manage the difficulty of battles, rather instead of increasing enemies. A lot of pieces to the puzzle :)
A puzzle! ;D

Pretty much thinking alike then.

Btw. according to log it can happen to have more enemies in the battle than is number of gang members on the tile (more party members + higher danger + lowish crime, I think). Have you considered using this occupation (crime rate?) to vary their battle numbers, instead? Meaning high danger + high crime -> more buffed enemies. High danger + low crime -> fewer buffed enemies. So 4-7 would be perhaps only for tiles with very low occupation.

Theoretically (read: I am using unfounded assumptions and didn't think it through), from the campaign perspective it may as well balance itself out, because tackling low crime areas, albeit much easier to win, will still cost some resources, as well as time, and it isn't harming the gang's income much anymore (isn't also less enemies -> lower chance to get subject?).

What brings to wealth. You said that it influences % of enemies to level up. Not sure where I got the idea that it also factors in equipment, apologies if wrong. IIRC the whole gang income is sum over all its tiles' incomes. So it would be square and fair if the gang's equipment is distributed in accordance to the contribution (wealth*crime). -> high wealth tile will be better equipped and so better protected than the low one at the same crime rate. 

All in all, it's about how much variety can emerge naturally. But, yeah, it still boils to choosing the right number range.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #10 on: May 19, 2017, 07:02:30 AM »
I like the idea of the enemies having better gear in high wealth areas. When you think about it... gangs aren't really known to be caring and sharing types. If a group has a good scam going on, they'll have more money and they'll kick money up to their boss. They aren't going to be giving handouts to other gang members that are on low income blocks.
If you want more money, you'll have to prove yourself and see if you can get a job with the group in the high wealth area. I'm talking groups within the individual gangs.

So, I like the idea of:
Wealth = Gear
Crime = Numbers
Danger Level = Enemy toughness

That way you have a very clear idea of what to expect and what you might be able to take.
It also means that if you fluke finding a low-ish crime, danger level 1 area that has high wealth, it's just a beautiful thing.
Of course, after you hit it once or twice, the wealth level will go down and their gear won't be as good. OR... if it's high wealth... (adding complexity here) then the Danger Level might increase as they react to a good earning area being hit.

Of course... I'm sure that Daithi already knows what the numbers represent. I'm pretty sure he's explained something like this before.
Once better gear has been implemented, we'll see the effects when they shoot us in the face.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Game Pacing
« Reply #11 on: May 19, 2017, 05:51:29 PM »
Is your word filter for sale?:) I like how you can express, taking 10 time less space.

Btw., as far as I know the contribution is wealth*crime.

For example (using arbitrary numbers):
Tile A: high wealth 3000 + low crime 10% -> 0.1*3000 = 300
Tile B: low wealth 1500 + high crime 50% -> 0.5*1500 = 750
Between the two the low wealth one will be contributing more.
Naturally, the most would come from high wealth + high crime. (so the notion was about wealth*crime=gear)

Or... wait a minute... are you saying they will keep all above the base cut (eg. as if on a low wealth tile) in their pockets?!
Aka: High wealth 3000 + low crime 10% ->
        (low wealth=1500)*0.1=150 send to boss
        (high-low wealth=1500)*0.1=150 will keep ?

Huh, actually, that's somehow fitting. Depends, if wealth is constant, then high wealth tiles are more valuable from the long run. So it's not bad idea to better protect them. One can squeeze only so much from low wealth as the crime grows in time. Would make it also easier to orient, as you pointed out. On the other hand, this can harm the gang in the shorter term and would probably require to keep separate budget on a tile as well as overall gang level.

So yeah, we're musing in a bubble, while Daithi has the whole gang AI to think of.


For a brief moment though, let's just pretend it's somehow viable. In that case the first pitch I would think of [how to vary equipment across time as well as tiles] is that on the top gang level the base value of a gear per troop can be estimated as
    base_value_of_gear_per_troop_unit =
    gang_equipment_budget / number_of_troops_weighted_by_rank 
    (like on a plane, whales taking more and expensive seats).

On the level of individual tiles, however, they will add to this an addition modifier being function of wealth (+0 at low wealth), so on various tiles their gear per troop can be slightly different:
    final_value_of_gear_per_troop_unit =
    base_value_of_gear_per_troop_unit  + 
    tile_equipment_budget [= C * (tile_wealth - low_wealth) * crime_rate]  / number_of_tile_troops_weighted_by_rank.

So if you have an equipment table for each gang and each rank to determine gear for ranges of the final_value_of_gear_per_troop_unit variable, the game will just calculate this value, look the gear up and assign at the time we go on a mission...

Not sure how danger level fits. Right now, number of enemies aside, it buffs levels as well as stats (at least there is a hp multiplier?). Buffing is ok, just not sure what means, whether it's a tile effect like wealth or something based on or influencing local gang activities like crime, etc...  Is it somehow set first and then kept constant, or changes - based on what?

I'm writing this book called "The art of derailing threads". Good exercise.
Still remotely related to pacing I suppose... What isn't though...
« Last Edit: May 19, 2017, 05:56:09 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Game Pacing
« Reply #12 on: May 20, 2017, 12:10:10 PM »
@ Ushas: If the mission requires more enemies, low level ones will be spawned. I think there are effectively infinite enemies for now, but that will change.

@ Nomad: I really like the method you suggested of differentiating the threat level. Don't think it will be possible to boost equipment level every wealth level (there are currently 9 equipment tiers), but +1 at highest would work. Wealth level won't change, crime rate will go down, resulting in less income for the gangs.

@Ushas: Yep, wealth x crime rate is the amount the gang pockets per day. It goes into a single account - I considered separate money for the bosses, and maybe there is some benefit, but the gang AI is going to be a hard one to balance out. Incidentally, progress is slow on enemy rackets (facilities) for the reason you mentioned, so many different factors have to be considered, it makes decisions difficult. Good news, starting to modify the code now, and the system is hopefully flexible enough to change later.

Equipment goes from 0-9, and there are other sources (permanent upgrades, different starting levels, global and local bonuses from rackets). The buffs from danger level are currently additional damage and hp.

Nomad

  • Sr. Member
  • ****
  • Posts: 453
Re: Game Pacing
« Reply #13 on: May 20, 2017, 02:30:50 PM »
Gang equipment tiers go from 0-9?

0 being zero equipment, I assume.

Are you just doing 9 brackets of wealth?
Eg: high crime x high wealth = tier 9.
Work out what value that equates to, then divide it by 9 and then whatever combinations of crime x wealth pay out, will determine the gear they can have.
Or.... high crime x high wealth = tier 5.
Having a particular gang buff gives +1 to gear level.
This upgrade gives a +1. That Starting level gives a minus through to a plus, etc, etc.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Game Pacing
« Reply #14 on: May 21, 2017, 02:54:31 AM »
Heh, Nomad, you took the original notion (wealth*crime->gear) and changed to (wealth->gear), got it approved, and now changed it back... What now?

Well, what about gangs having different priorities when deciding?
Mafia       (long time investments):   wealth-> gear
Survivalists      (effective and fair):   wealth*crime-> gear
Church (protecting weak to grow):   wealth*(1-crime)-> gear

What I like is that Churchers don't need to rely so much on equipment as Survivalists. So if not mistaken, can be used to gang's advantage as well as player's...

If you two insist on equipment tier jumps between wealth (or any other variable), it's also possible to set the medium score (eg. med. wealth) as the one at which the gang by its current shape resides and then based on this variable go up like +1 rank (eg. high wealth) or down like -1 rank (eg. low wealth), or more.

However, although I was unable to express well, sorry, there is reason why tried abstracted continuous modeling translated to concrete discrete only at the end. By no means wanted to have outside rules forced like this looks. On the contrary, was about what we see in intel to be linked to the gang's AI dealings in the background.

No problem if the game is a bunch of rules to game. it's fun. But I got the impression that you actually want the AI feel like we are dealing with an opponent? So I may be giving a bit more tough feedback. I remember one of the Gollop's talks where he said it doesn't need to be intelligent, just appear to be...

AI may be governed by just simple probability regulations, but players don't see the whole picture of the gang's management, just observe side-effects and correlations. Enough for to have something to grasp, but not enough to uncover all the laws.

Would it be possible to approach the problem hierarchically? For example, settle first robust system for gangs that can work without rackets & side facilities (no need to forget them though), and then add them to decision making process later?