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

0 Members and 1 Guest are viewing this topic.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #300 on: August 11, 2019, 09:23:54 AM »
Bug Fix

Map Editor

The binding was failing for description so it was never saved.




Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #301 on: December 07, 2019, 09:57:27 AM »
All

I've upgraded the target framework from "regular" .Net 4.7.2 to .Net Core 3.1
This is rather a fiddly process for any substantial code base and particularly for ours which contains things I don't use in business app development.
And some stuff is probably quite unusual in any wpf app.
I've only had enough time to do a quick smoke test through the suite.
Not much more than spin it up and try a couple of options.
It seems stable.
Usually the problem is simply failing to compile at all.

Some particularly expensive process like the pathing seem faster.
One "free" improvement to expect is in the garbage collector.
OK, garbage isn't usually associated with instant excitement and this probably sounds pretty dull to non developers.
But.
The garbage collector runs all the time in the background of a .Net app and re-cycles unused objects which are in memory.
In .Net core 3.1 this runs faster and uses less memory.
Meaning the app your running runs faster and uses less memory.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #302 on: February 02, 2020, 08:46:14 AM »
All

I've removed dependencies on mvvm light from the app since there's no WPF friendly .Net core version available at the moment.
This may well change and I'd rather use the standard library but that's not practical. Yet.
The framework introduced a dependency on .Net old so some parts used core and some the old dll, which would have meant mysterious failures to run and error reports from some users whilst others would have been fine if we had delivered.
Anyhow, bug squashed.
Everything should be OK with .Net core only now.

Launcher

This is Ezra's menu / launcher which you can see on his blog http://general-staff.com/
When you choose to start a game it now writes a file to disk containing the parameters you chose.
This will in turn be read by the game when it starts.
The file represents a PlayState object.
This contains enough data so the game can "just know" what you were doing last time you ran it, what turn you're up to when you've  restored a game save as well as what scenario you're beginning when you start a game from the menu.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #303 on: February 08, 2020, 09:51:17 AM »
Game

Now looks for that PlayState object the launcher writes to disk.
If there's one there where it's expected to be.
It loads that
The scenario
The armies
And selects the appropriate side as the current one.

This would also allow you to resume your last game.
Potentially anyhow.
There'd have to be some actual game in the game to change anything and some code to do a save.
One thing at a time though.

Bugfix

As part of my last change, I refactored so that a generic approach was used to serialising and deserialising objects to disk.
( Serialisation is the term for a process turns an in memory object into a string that can be saved to disk. )
I broke that.
This became apparent when I tried to deserialise my playstate into an object and it didn't work.
Fixed that now.

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #304 on: February 09, 2020, 10:05:36 AM »
Scenario Editor

When saving scenario, capture image of map as byte array to scenario file.
This can then be used in the launcher to give a preview picture of the scenario map with all pieces visible.
This is the first iteration and I've yet to do any testing on it so there are likely bugs and changes.

I think I also fixed a bug whilst rationalising some code.
You only want one piece of code for any sort of operation because when you change anything or have some sort of problem there is then only the one place to make changes.
I had duplicated code in scenario save and scenario save as.
Almost duplicated.
Save as didn't have all the code save had and I think would have missed copying "Places" into the scenario.
Both now use common code in a new method to do a bunch of things including this.
« Last Edit: February 09, 2020, 10:16:11 AM by Andy ONeill »

Offline Andy ONeill

  • Moderator
  • Viking
  • *****
  • Posts: 356
Re: Changelog - picture heavy
« Reply #305 on: February 12, 2020, 01:39:51 PM »
Scenario Editor

Improve generation of scenario "thumbnail".
There are complications to capturing an image from this view.
One of which being some pieces of UI such as Retreat Points can extend out of the logical frame.

Launcher

Use standard method to load scenario data.
Show this thumbnail in select scenario.