Changelog - picture heavy

Started by Andy ONeill, January 02, 2018, 02:08:07 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Andy ONeill

SandBox

Cycle through formations with right click of piece.
Handle column in enfilade calculation.
A column is effectively rotated 90 degrees for purposes of calculating it's edge.

Andy ONeill

SandBox

Bind formation of selected target so it's obvious which it's in.

Working out if a target unit is in arc of fire.
This involves calculating the offset between facing of a unit that is shooting and the bearing to the target.
At the moment I'm using 30 degrees but I may go for as much as 45.
Some designers (of other games and sims ) suggest arc of fire of close order infantry should be very limited.
I don't really follow that.
Napoleonics units drilled for front line(s) kneeling and firing line shooting over them.
Back ranks didn't shoot inbetween those in front - they shot over them.
Even the narrowest standard frontage per man allows for plenty of rotation of each.
And of course each soldier is side on to the direction they shoot in.
Yet some people reckon a unit should only shoot directly to it's front.

I think this is a convention adopted for some tabletop games as convenient.
Then propagated into computer games.
I suspect partly because it simplifies the calculations a lot if a unit only shoots directly ahead.

Andy ONeill

Settings

The suite now shares and persists most of the values set under Layers.
If you lower the opacity of the elevation map or hide the grid in one of the apps then open it in any of the apps it will use that setting.
Some properties don't really have the same meaning.
EG
In map editor the map background could be rather transient and a picture you open temporarily to trace or whatever.
For a Scenario, the background is the picture of the map with terrain etc that you built in the map editor.
The setting for Background is therefore not persisted.

Andy ONeill

Piece Size

I've moved this from Settings to Scenario.
A Piece is a representation of a unit on the map.
This needs to be consistent for both players playing a game by pbem ( or maybe online eventually ).
Any difference in piece size from what the game is internally working with in it's calculations could otherwise potentially look very odd. With pieces overlapping visually but logically still being out of effective musket or close combat range.

Andy ONeill

Map Editor

Description wasn't saving if you chose to save whilst focus still in the description.
Ensure Description persisted to viewmodel from view as user types.

Andy ONeill

Map Editor

Improved the method of avoiding saving whilst a previous save is still processing.

Andy ONeill

Map Editor
Change outline of symbols on river edit to dark blue in order to increase contrast.

Sandbox

Added experimental elevation based line of sight ( bresenham 3d ).
Which runs really quickly but seems to have problems.
Added display of terrain and elevation at cursor.
Necessary so results from 3d los can be checked.


Andy ONeill

Map Editor

Change outline of river shapes in edit terrain to dark blue. Increasing their contrast for readability.
Reversed the icons for river widening in edit terrain

Andy ONeill

Sandbox

Routine to generate a grey overlay showing areas of the map which are out of line of sight using the 3d algorithm.
This allows us to visualise the results of the routine and check speed.
The calculations for the results below took 2.3 seconds which is blazingly quick when you consider it's checking 1155 * 805 cells. Less one.


Andy ONeill

MapEditor

Stop users drawing more terrain whilst the app is still busy processing the one just drawn. This is particularly noticeable with large complicated woods where it takes significant ( maybe 3-10 seconds ) time to "plant" trees.

Note
The map editor is quite resource intensive.
Not only is it processing "ink" to smooth it but it also works out all the points each terrain piece contains. The latter is  particularly costly on large areas.
A 4 core processor with hyper threading is advisable if you want to draw stuff quickly.

On particularly old or low spec 2 core pcs you won't have enough processing for some of the multi threading and you need to draw any area piece of terrain fairly slowly so it can keep up.

The game itself is likely to be less demanding.
I'll only know for sure once I write it though :^)

Andy ONeill

Army Editor

Added first shot bonus mechanism.
Externally all you see at the moment is a checkbox.
Obviously, we will internally need some way for units with this bonus to track whether a unit has shot previously and return a higher factor if not.
This has been implemented using an extensible architecture. 
Of course this is as usual a first cut and therefore a prototype at this stage.
Smoke, notorious jamming and anything else we decide is a good idea will all be done this way.
They can all be called in the same way to give a shooting effect modifier. 
Once I write them.


Andy ONeill

Model Library

Extended the list of "postures" this is what a unit is ordered to do - move, attack etc are obvious. Perhaps less obvious is Demonstrate which orders them to hang about outside range of an enemy but be in a position to potentially attack in order to pin. Probe would be move forward tentatively and avoid engaging.
Delay is try and slow the enemy without being caught and wiped out.

Working on shooting.
Rationalised code used to find width factors for units.
I will need to know exactly where units are when they are shooting or being shot.
There's a lot to do for shooting and hence I will be breaking this up into more digestible chunks.

Andy ONeill

Sandbox

Point visualisation mechanism.

I need a mechanism to work out 5 points on a unit to use shooting from and to.
Just calculating these is all very well but you then just have co-ordinates X and Y for a point.

In order to check these are where I want I need some way to visualise that.
Which is where this thing comes in.
I can add co-ordinates found and it places a spot where they are.
Hence centre front of this red unit has a little spot on it.


Andy ONeill

Sandbox

Calculating all 5 points on the front of a line.
The routine matches the NATO symbol size in an abstract manner.
Meaning it's calculated and not reliant on the graphic or objects on screen.
It allows for variable size of piece and unit type multipliers.

So far this is line only ie not column.


Andy ONeill

Map Editor
Map Save bug fix.
Retain initial preference for grid visibility after capturing picture for map.