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

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #210 on: November 10, 2018, 06:40:06 AM »
Map Editor
Bug fix
De-select any terrain which is selected whilst saving. Then re-select it after.
Previously if you had a terrain selected the "marching ants" were visible as black dashes on the picture saved.
Which was not ideal.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #211 on: April 29, 2012, 09:17:42 PM »
Sandbox

Shooting points for column formation.
If you look very closely you may notice spots are very slightly out of line.
Each location needs to be defined by integers for x and y - they're used to match a cell in the terrains and elevations matrices.
The graphics and hence those spots are, however,  located using doubles.
There's a conversion to integer and back to double which makes their location approximate and that of the spot even more so.
The pictures I post also tend to look bigger than they will on a monitor.
In any case, this won't be a problem in the game. Sub pixel accuracy is more than sufficient.

What could look a bit odd is if you have unit A in column and it is contacted in the flank by unit B.
B will overlap A partially.
This should be a rare event.
I may give some thought on how to avoid the anomaly but my thinking at the moment is this is not worth the complications it would introduce.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #212 on: November 12, 2018, 09:34:08 AM »
Scenario Editor

Allow units to be placed overlapping.

This change is necessary to allow someone designing a scenario to have several units in close proximity eg the british units in hougomont.
 It's up to you to avoid bad things happening with this.
Various parts of the game will assume that units will not literally occupy the same space.
EG if you stack then a player will not be able to give any orders to the bottom units until the top one moves.

Avoided a null reference error under obscure circumstances whilst dragging a piece onto the board.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #213 on: November 17, 2018, 06:48:09 AM »
Map Editor

Bug Fix
A while ago I changed the way terrains were presented to the UI.
The order of these matters because they go on top of any previous ones as you add a terrain.
What I hadn't noticed was that combining terrains needed to change.
They were being inserted and ended up bottom of the collection and below everything else.
When you click combine two new things are created. Technically these are geometries.
One defines the shape of the combined water and the other roads.
First water and then roads are added to the collection at the point you click the combine button.
The separate roads, lakes and rivers are hidden.
The implication is that if you combine and then add some terrain it could go over your water and roads.
Which you might want. Or you might not.
If that's not what you want you can redo the process by clicking split and then combine again.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #214 on: November 18, 2018, 04:23:33 AM »
Sandbox

Working out which enemy units are in range to shoot at.

The first iteration finds enemy units within range + half piece width measured centre to centre.
The final version has to be rather more sophisticated.
Those that are found are "lit up" with a yellow radialgradient background which then fades out in a similar manner to the scenario editor mouse over.
As you can see from the below picture, it's possible that you might expect one unit to shoot at multiple enemy with split firepower.
I also need some way to work out whether a unit is masked by another.
This is an example of the value this prototyping adds -  it's easy to drag pieces around and see what happens which then makes things obvious one might not have considered.




Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #215 on: November 20, 2018, 06:41:36 AM »
Map Editor

Bug Fix avoid re-selecting a terrain causing error when none selected.
Experimented with changing zindex of terrain. This is problematic so I shelved it.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #216 on: November 21, 2018, 07:42:09 AM »
Map Editor

Move the zindex of a terrain up or down.
This will raise or lower a terrain object ( and children ) compared to other terrains.
Usually, as you add new terrains they appear on the map on top of previous ones.
The new terrain also appears at the end of the list of terrains in edit terrains.
If you drew something in the "wrong" order then you couldn't change that order short of deleting something and drawing it again.

You move a terrain by clicking one of the chevrons on the right of the terrain in Edit Terrain.
The lower the terrain in this list the "higher" it appears on the map.
Here we start with a river which is on top of the rest of the terrains.



If I click the top button of that river then it moves up the list and now appears below the woods and it's trees.


Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #217 on: November 27, 2018, 04:14:13 AM »
Map Editor

Replaced line processing in order to ameliorate "anomalies".
Whilst drawing roads Ezra has found you can get some "artifacts" appear.
When you select such a road the animated dashes can be seen crossing the line.

This seems to be when drawing very slowly.
I replicated the problem but had to draw very slowly and wiggle the mouse to reproduce it.
My machine, however, is win 10 and just 3 years old whilst Ezra's is way older and win 7 with only 2 cores.
The issue might be worse on machines with just 2 cores because they're under powered for the multi threading.

My replacement routine is less likely to produce these.
If you get a lot then try drawing slightly faster with less wiggling.
Do not go back over a line as you are drawing it.
You can force it to try and recalculate a road.
In edit terrain, select the problem road.
Check you're seeing dashes animating across it and make sure you know which road you're about to re-process.
Right click the entry for your road in the left panel.
When I do this it fixes any problems I've managed to introduce.
On one of Ezra's test maps I found a couple of roads just disappeared.
If that happens to you then it's somehow corrupt - delete that road ( select in left panel and press delete ).



Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #218 on: November 29, 2018, 09:50:00 AM »
Map Editor

River anomalies fix.
All line drawing other than rivers now processes using a constant width line.
You are very unlikely to really want a road or fence to have variable width so that's pretty safe.
Rivers tend to get wider as they go, so this is the one line terrain you might not want constant width.
Avoiding the odd line you sometimes get with slow wiggly lines drawn with a radius close to width is a bit tricky.
If you right click the word "River" in the list of terrains then that river will be recalculated.
This usually removes anomalies.
Sometimes two or three clicks are necessary.
If you have the problem river selected and the black dashes animating around it, then any oddities are much more obvious.

Since rivers are outlined in a low contrast colour, any extra little line inside the river isn't particularly noticeable.
A fairly simple way to avoid these anomalies completely is to draw slightly faster and avoid wiggling the mouse.

« Last Edit: November 30, 2018, 04:13:00 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #219 on: November 30, 2018, 04:31:18 AM »
All

Centralising Places text.

Map Editor

Optimising river outline process so that the longer "fix" process that slightly widens the river is only used when you right click and not initially.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #220 on: December 06, 2018, 12:20:45 PM »
Map Editor

Visualising terrain which has been set.
This allows you to see a red overlay where a given type of terrain has been set. You can thus double check the terrain has been processed as you expected and those cells which you wanted to be water are marked as water.
This is particularly useful if you happen to have a low end or old and low end PC which only has 2 cores.

A new panel in the left tabcontrol allows you to select a terrain type. Notice that terrains which have no meaningful area or do not play a part in marking terrain are not options. A place is a special sort of a label and no terrain cell is marked as type place. Similarly contours are used to calculate elevation rather than set terrain type.  You can put a woods over a contour and still process that contour for elevation.
The cells are then translated into a red overlay.


Bug Fix

The way the area of buildings was worked out had several problems.
I've refactored this to improve the process.
seems stable to me.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 267
Re: Changelog - picture heavy
« Reply #221 on: Today at 10:29:57 AM »
Army editor
Add army description
This is in an expander you drop down using a round button next to the army name.

Map Editor
Improved calculation of points contained in a terrain.
This morning I drew a river from top left corner to bottom right on a map and it took 9 minutes to calculate.
Not many maps will have this sort of thing but it got me thinking.
I tried another approach - I didn't think it would be particularly efficient but 9 minutes is pretty easy to beat.
Now under a second.
I thought it might be faster.... but that's ridiculous.
 :D :D :D :D

Persist compass rose visibility as a preference