Recent Posts

Pages: [1] 2 3 ... 10
1
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on Yesterday at 01:32:55 PM »
Scenario Editor

Minor refactor on piece dragging to reduce overhead.
Narrowed the scope of the piece dragging routed event handlers.

Refactored a load of mapping orientated code out of the mainwindow code behind into modellib.map.
Needs to be re-used in the game exe. Eventually.

Refactored out a number of public variables from mainwindow.
2
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on Yesterday at 08:13:35 AM »
Scenario Editor

I've added scaling of the map board.
There's probably more to do, but it seems stable at the moment.
Anyhow, as you drag the corner or edges of the screen the map "board" will scale to fit.
It retains it's proportions.
In the below, I've dragged the size of the window down, reducing height proportionally more than the width.
This means you'll get a gap either side of the board if you're not careful but gives you total flexibility.




I've also (since taking that screen shot) horizontally centered the elevation and terrain textblocks.
3
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on Yesterday at 03:16:28 AM »
Scenario Editor

Bug fix:
If you dragged a piece that was already on the board, it was being added to the PiecesOnBoard collection again.
Anything in there is templated into a piece meaning there were actually 2 pieces where you'd expect one. As they were all stacked on top of one another it looked just like one. But odd things happened.

Dragging a unit already on board seemed a bit sticky to start off with.
This was due to only starting drag when the user moved over 2 so many pixels at a time.
A piece is relatively small though and the tendency is to start slow. Too slow.
Removing the minimum move check fixed the problem and doesn't seem oversensitive if you just click.
Laptop mouse pads might be an issue but designing a scenario without a mouse doesn't seem very practical anyhow.
4
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on February 18, 2018, 12:03:41 PM »
Scenario Editor

Added bad terrain and collision detection for unit locations.
When you stop dragging, it checks what terrain applies and whether that unit type is allowed in that terrain.
It also checks whether another unit is overlapping.
And whether the unit is entirely on the board.
If any of these fail then the border is set to red.
If you don't move it within 4 seconds the unit is removed from the board.
5
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on February 18, 2018, 03:58:46 AM »
Scenario Editor

Minor refactor:
Both retreat point and pieces now use their center X and Y for positioning and the same contentpresenter style.
This simplifies/improves some of the code used for positioning and pathing.
Also another minor step towards allowing the user to dynamically scale them.
6
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on February 17, 2018, 09:28:37 AM »
Scenario Editor

Dragging units off the treeview and around the board is stable now.
I spent at least 2 minutes trying to break it and it just worked.
Way faster than the original drag drop and a LOT less code.
Buggy unexpected dropping - gone.
The improved performance is particularly pleasing. I can drag a unity as fast as I can move the mouse and it just copes.

Not quite finished yet.

To do.
Invalid location like off board in swamp or water or another unit still needs handling.
Probably stick a fews seconds red flashing border on the unit and then it's gone if the user doesn't grab it.

7
General Staff Support Forum / Re: Changelog
« Last post by bayonetbrant on February 16, 2018, 01:24:20 PM »
it's cool to track the development :)


Us non-game-dev IT weenies can appreciate the headache it can be
8
General Staff Support Forum / Re: Changelog
« Last post by Andy ONeill on February 16, 2018, 01:21:02 PM »
Scenario Editor

First iteration.
Refactor to replace drag drop of units.
I've ripped out the old drag drop code which was buggy and pretty nasty stuff.
The old version could not support stopping the user dropping units on invalid terrain or each other, which we want.
Started replacing with a simpler drag approach.
Further work is required.

The cursor isn't offset and unitvm isn't correctly added to the lists it needs to be added to ( I just realised this as I type ).
Maybe fix up with another iteration tomorrow.
9
Professional Simulation - Digital / Re: Simulating Tomorrow's Battles with AI
« Last post by mirth on February 16, 2018, 08:45:26 AM »
Cool find. Thanks for sharing it.
Pages: [1] 2 3 ... 10