Author Topic: Changelog - picture heavy  (Read 42565 times)

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 420
Re: Changelog - picture heavy
« Reply #360 on: June 29, 2020, 03:06:05 AM »
Game


Direct movement.

Or movement without wheeling.

The piece spins around it's front central point and heads towards where your cursor is.

This is for pieces in formations Skirmish, Column, Small or none

HQ essentially do not have a formation and there is allowance internally for some sort of a unit which isn't HQ and also isn't a full sized unit.
Although not implemented (yet) this could be used for scouts, messengers etc.

This piece is in column formation and hence it will have the option to take the most efficient route or move direct.



It's perhaps worth mentioning that there are parts of the code which aren't fully implemented but are there with future change or expansion in mind.
Hence a unit type which doesn't currently exist is partly supported so it would be relatively easy to implement.
Sometimes this is because of a change of direction in design.

EG ADC or messengers were originally to be visible moving across the map with the potential for enemy to intercept them.
On further consideration we realised this would be a bad idea as it risked turning the game into chase the messenger. Which might be an interesting game of itself, but not really what we're aiming for.
The complications of messengers travelling to where a piece was when it set out and then trying to find where it had moved to in the mean time also seemed just an over complicated distraction.
Hence messenger time will be calculated at outset rather than having to calculate a series of moves as the adc tries to find his moving recipient.

Sometimes it's just something which was easy to add

Another example is the number of sides in a scenario.
There are 3 armies in a scenario internally.
You can't set the third one at the moment but this could potentially be used for neutrals or a third player ( Blucher at Waterloo eg ).

I've also started planning for order persistence and implementation.
« Last Edit: June 29, 2020, 03:13:13 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 420
Re: Changelog - picture heavy
« Reply #361 on: June 30, 2020, 04:47:58 AM »
Movement Animation Experiments

At the moment I have some raw data that's used to add arrows to the map.
I also have some raw costing data for these.
What I want is some way to persist these.
This is, however,  linked to how it will be used.
One purpose will be animating pieces around on the map as a turn is played out or re-played.
I already have a rough plan in mind for this but it's very detail light.
Best to experiment with this and see what happens with the various options.
Which is what I'm currently doing.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 420
Re: Changelog - picture heavy
« Reply #362 on: July 06, 2020, 02:38:45 AM »
UI library


I've added a custom facing animation to the UI library.

Whilst exploring the various animation options, it became obvious there is no "straight out the box" framework animation which would maintain facing in the direction a piece moves.
As a result I built this class.
The animations will all use one standardised mechanism.
All animate the x and y co-ordinates and the facing angle.
They will all rely on using a "path" supplied.
This will be an arc for wheeling, a straight line for direct moves and a wiggly line for fastest move.
The x and y co-ordinates are fairly straightforward and work in a similar way to graphing or standard maths definition of position.
x is horizontal position and how far from the left
y is vertical position and ( somewhat unusually ) how far from the top
These are relative to whatever container the point you're defining goes in.

The custom code I've written essentially works out the direction of travel so a piece can be rotated to face the way it's headed.
« Last Edit: July 08, 2020, 02:08:08 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 420
Re: Changelog - picture heavy
« Reply #363 on: July 08, 2020, 02:18:58 AM »
Model

More work on sketching out turn and move persistence classes.
An order will translate into a series of things the piece should do.
Each will need timings, details of exactly where it moves when, what direction it is to face in and what posture it should adopt.
All these things for all pieces need to be such that they can be saved to disk as a save game.
When the game reads that save game back into memory, it must give the same result you expected.

The opposition probably have different plans in mind and will likely interfere with your carefully considered moves.
Things will happen part way through carrying out that move from a to b.
The timing of your moves vs the enemy will be important.
The game loop will need to work out if and when moving opponents see one another.
When they do so their posture will define what they do.
Or attempt to do.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 420
Re: Changelog - picture heavy
« Reply #364 on: July 09, 2020, 08:24:07 AM »
Wheeling cost roll up

I have two sets of costings for a wheel.
One for the cells the mid point will move through.
Another for the cells the outer point will move through.
Usually the outer arc will be more expensive.
When that is the case we need the cost of the outer point totalled into the appropriate mid.

Initially I thought I'd just divide one by the other giving say 2.
Add up each pair of outer point costs and set the next mid point to that.
Add any over to the last.

This is too simplistic though.
My first try at this gave odd results.
When I took a look at what was happening this was because you get numbers like 89 mid and 177 outer.
177/89 = 1.988.
Just less than 2.
Meaning 88 outer points cost end up totalled in the last mid one.

I need a plan B.
Work with the amount of relative rotation for each from the starting angle.
Which is more complicated but will give a much more sensible distribution.