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

Map Editor

I've changed the way custom resource dictionary loading works.
There's a new folder within the maps folder called CustomResources.
Only the extension of a custom resource file name in that folder matters.
It must be .xaml.


If the file is not a properly formed resource dictionary the app previously did not handle this well.
It will now tell you it couldn't load the file.

Other aspects remain unchanged.
The content must be a valid custom resource file with a canvas x:Key CustomCanvas containing any paths you want to use.






Andy ONeill

Map and Scenario Editors

I've added a "validation" check for groundscale.
The default groundscale is 1m per px.
Along the way the elevation measure has changed from integer to float.
Originally integer elevation meant any change between px would be 1+m elevation difference.
1m change over 1m lateral movement is 45 degrees which is very steep and would stop movement.
Changing to float means you can now have decimal places in elevation so for example 0.001m elevation change per px is possible.

Meaning you don't absolutely need groundscale of 3+m per px to ensure units aren't constantly blocked by 45+ degree slope.
Having said that, the game is not trying to be skirmish so 1m per px might work but odd things could happen.

Andy ONeill

Map Editor

Added a file picker for custom resources.
You first load and a resource dictionary.
Then once loaded you may choose to import paths from it.
This isn't all one step because you may want to use the content of the resource dictionary to over ride styling or provide some background to a map.

Andy ONeill

Scenario Editor

In the Scenario Editor you can set different ownership on Places.
You might have two or more scenarios on the same map and different starting positions mean a different side could hold a bridge, hill or town.
In order to accommodate this, scenario has it's own copy of Places.
This copying is done once, when you pick the map.
If you then later go back and change Places in your map then this could cause a problem.
In order to highlight this I've added a couple more validity checks in scenario editor.
These check you have the same number of places as in the map and the same total victory points.
I've also added a menu option under File which allows you to re-import places.

The list of checks in scenario editor now looks like this:


Andy ONeill

Places Prototyping

The first step to changing places is to break them.
What do you mean that doesn't sound so good?

I need to turn the existing working styling into something else which is quite different.
I want a piece of text for the label and a marker for the exact location.
That means some big changes from what we have now.
The first step is to get something basic kind of working.
I've started out with a spot for the location with the text underneath and starting from the same x co-ordinate.
Maybe that text should be offset to the left by half it's width so you can have a place right over on the right and still click the text to move it round.

Below, I've not set the background of antietam.



You'll be able to move that text round in the map editor and the spot will be something else.
Maybe a star if the location is worth points and a cross otherwise.
I've not decided yet.
The points will be moved into a separate panel.
And the colour of the marker will indicate ownership.

Andy ONeill

Places Step 2

Offset the place name text to the left by half it's width - to centralise it below the spot.
When the place is close to the bottom of the map, offset the place name upwards by 30 pixels so the first line is above the spot.
This is applied to both existing places as you load and new ones as you add them in the map editor.

The next step will be to let you drag the name round to position it as you like.
These changes ensure you will definitely have something visible on the map to click and drag.



Andy ONeill

#441
Places

Making the marker fancy.
Colour is hard coded red at the moment.
The idea is that this should be noticeable but not overwhelming,
The aim of the change is to avoid covering things up like the previous version.
You should be able to see enough to play the game without hiding places.

Not sure about the circle.
What do you think - keep it or lose it?
Or maybe a map pin instead.


Andy ONeill

Places

I wasn't happy with the star so I've changed it to a pin.
This is flipped vertically so the point of the pin is the pixel where the place is.


Andy ONeill

Places

Drag and rotate place name.
You click hold and drag the text as you might expect.
Don't try this whilst clicking has some other meaning though.
You can use the mousewheel to rotate the text.
Due to some fiddly dull technical stuff the rotation of the text is not always round it's centre.

Testing this, I just went with the default unknown rather than changing anything.
I moved the text on all these and rotated two.

The places save successfully and this picture is after I tried it out and reloaded the saved map.



This should probably only work whilst you're in edit terrains mode with the list of terrains in the left panel.
The colour should change.
Still need to add panels to the game and review the one in scenario editor so you can see what's going on.
Oh
And decide on any mouse over animation

Andy ONeill

Place Map Pin

Quite a minor change.
Make pin fill colour the same as the place's "owner" colour.
This was previously used as the fill on the background behind the place name so it's gold, blue or red.

Andy ONeill

Places

Animations highlighting place when selected.
The rectangle surrounding the name of a place is now gone and the text might not be right next to the pin.
The marching ants animation now goes in a circle round the place' point.
As you select a place there's a coloured ring animates from nothing to fill that and back.
This is of the same colour as the pin fill, indicating the owner.

Andy ONeill

Places


Fix two omissions.
Place name colour now matches the selected one.
0 point Places use Amaltea or the style based substitute for the name font.

Andy ONeill

Places

Animated circle now grows and shrinks 3 times rather than once when you select a place.

Game

Prototype list of places.
This is a new panel in the left narrow column.
Places are ordered by owner then name.
Each has name and value with a coloured background matching owner.
If you click one you select it and that starts the circle animation so you can easily see which place is what.

Andy ONeill

#448
Places
Neatened up list of places
Fixed sorting of these

In the picture I've selected Ford and you can see a blue ring round it.
That ring is animated, expanding and contracting 3 times when you select the place.

The primary aim of these changes was to make Places less intrusive and make it practical to play the game with them visible.
Secondary was to make it clearer exactly which point was a place.
I think these aims have clearly been achieved.
It is clear where the exact point of each pin is.
The big plaques and solid rectangles are gone but you can still easily see who owns what place and what VP it is.



Think I may still make the points a bit bigger and fancier.
But otherwise this looks like it'll work to me.

Andy ONeill

Places

I styled up the places panel in the game.
There are now 2 flags denoting owner.
The text of the name uses the Dark colour associated with the owning side - black, dark red or dark blue.
The victory points now have a gold effect with a black dropshadow.