Recent Posts

Pages: [1] 2 3 ... 10
General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on Yesterday at 04:11:37 AM »
Scenario Editor
Use new optimised hypsometric routine

Map Editor
Improving background file picker selection filter
Changed font used for drawing options to reduce number of different fonts on screen
Ephinol font as default for the left panel (tabcontrol) 

Rationalised elevation storage ( it was stored in both designer and map data ).

Started Shapers.
These are intended for a bit of "fixing up" rather than drawing an entire map.
That's the plan at the moment anyhow.
Having said that.
Due to the optimisation work, I can redraw the entire map very quickly.
That has removed one of the obstacles to somewhat more ambitious shaping.

The tooling needs more styling work but the idea is you pick one of the shapers from a list.
The various attributes of that shaper can then be set in the area above the list.
These will vary from one shaper to another.
There will (obviously) be more than one once I write them.

What I've done is the first iteration of flatten.
This allows you to set the same elevation for an elliptical area.
The two sliders allow you to adjust the size vertically and horizontally.
If they both have the same value then the ellipse is a circle.

In these pictures I'll remove the lion's mound from the waterloo battlefield.

You then drag the ellipse over the area you want to set.
Right click somewhere on the map to "pick up" the elevation from there
Over type in the set elevation textbox.

Either right click the ellipse, press return or click the apply button.
The elevation is applied to all the points under the ellipse and the map redrawn.

In the final picture, I've then dragged the ellipse back off the map.
The mound is no more.
You can't see the redrawing happen immediately because the ellipse is on top of the area changed.
The processing and redrawing the map is so fast it appears to be pretty much instant.

I then changed the ellipse so it's transparent with a white outline.

You can then see the bit of terrain you're about to change.
Counter - intuitively it seemed to me to be a bit harder to work out exactly where the edges of what I was about to change were.
Having said that, you can easily drag the marker round a bit and right click to do a bit more.
This was part of the idea of the right click to apply.

I could potentially allow the user to pick fill and outline.

General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on May 24, 2018, 03:21:19 AM »
Hypsometric Elevation Image

Optimising algorithm which creates the bitmap.
Exactly how this works is pretty technical stuff involving building a huge array of bytes with 4 per pixel holding blue, green, red and alpha values.

Rather than working out each colour to use for an elevation dynamically I've built a collection of 255 colours.
I then work out which of those 255 "bands" any elevation would be in and use that colour.
The downside of this is that I can't now easily make this user configurable.
OTOH the processing savings are significant.

This may read as pretty dry stuff but it's huge.
Overall, the changes cut building one example picture down from a rather stately 2.68 seconds to 4 milliseconds.
That makes rebuilding the entire image as someone "shapes" a hill or valley practical and should just be a brief flicker rather than noticeable wait.

General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on May 23, 2018, 04:30:56 AM »
Map Editor

Remove "old" code which set elevation based purely on contour height when saving a map.
Save new generated elevations
Respect default height
Limit input of (GreyScale elevation) values to numbers

Bug fixing and refactoring greyscale code.

Greyscale image import.
You now select between using Contours or Picture to generate a greyscale based set of elevations.
You can do both but whichever values you save last will be used.

Although a greyscale picture of the right proportion is advisable, this should handle any image you have.
That includes coloured ones.  These will be translated to greyscale based on tone.
If the picture is the wrong sort of shape it will be stretched.

Note that no particular validation is done on what you enter in this view.
If you set a low higher than the high then bad things are going to happen.

The interval is not used for anything yet.
The plan is to speed up allocating a value to contour height.
I may instead move this to the contours option settings.
General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on May 22, 2018, 04:14:52 AM »
Map Editor

Fixed Bug failed to reset isbusy flag/indicator on re-opening saved map

Prototype greyscale calculation.

This uses the data from contours.
You need to set low and high so it "knows" the expected range of black through to white.
Set all the parameters, click the calculate button and you get a grey layered effect initially.

Checking the blurred box adds a gaussian blur effect which will then result in a slope rather than cliff when converted to elevation values

Note that the contour line will be towards the edge of the gradient rather than the "top" and hence the expected elevation will be somewhat inside it.
Often the exact elevation at a point isn't really going to matter so much so that few metres won't have any noticeable effect.
If this will be an issue for a map you're drawing, you can either draw your contours slightly further out or give them a higher value.

Hiding the terrain ( which is just contour lines in this case ):

I then have some code which grabs the pixels and translates the grey scale into metres.
Then redoes the hypsometric elevation picture

This is still very much a prototype and needs more work.
The results look pretty good. Certainly way better than cliff edges.

This is never going to be as sophisticated as you can do using the likes of photoshop. On the other hand, probably good enough for most purposes with an almost zero learning curve.
And... this is just one option. 
You'll still be able to import an image created externally.
Or at least you will once I write that part.
Schwerpunkt PC Wargames / Re: Where are we now with World War II - Europe?
« Last post by Boggit on May 21, 2018, 11:36:19 AM »
It's been a while since we heard anything. What is the current state of development? Are any of the campaigns implemented now?
General Staff Support Forum / Re: The road ahead
« Last post by Andy ONeill on May 19, 2018, 10:46:43 AM »
Ezra and I have been discussing how to improve "drawing" elevation.
Smoothing out contour based slopes without taking forever (writing or running)
I think I have a way to do improve contour handling and tick both those boxes along with another.

If you've watched Ezra's videos or used the original prototype map editor you are probably familiar with the concept of drawing a greyscale background and importing this for elevations.
This is a good method because it's simple and a gaussian blur gives you smoothed out slopes.
Simple and practical are huge plusses.
So long as you're OK with photoshop or some similar package then you can use a gradient for gradual slopes and get pretty good results fairly easily.
Those users who don't have photoshop could use Paint.Net with a gaussian blur plug in ( free ).

The downside is the learning curve for those users who don't use such graphics software.

Reproducing photshop would be way too much work and even if I did then the learning curve moves from photoshop to generalstaff.
Clearly not a viable route.

Some sort of a simpler compromise option looks to be fairly easy to implement though.
There is already a way to draw contours.

The (outline ) plan is to translate those contours to a greyscale picture.
Using an approach similar to how I do elevation colours.
Run a gaussian blur over the whole image.
Then translate this to elevations in a similar way to the import.
That way anyone can do a few hills and valleys reasonably easily.
If you want more then you use the shapers ( more about these later ) or look into "proper" drawing software.

And of course.
If drawing contours sounds a bit like hard work then you can still download real wold elevation data or just buy a scenario.
General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on May 19, 2018, 10:15:41 AM »
Map Editor

I've added a quick n dirty prototype method to view and change the size of the area you paint with in the map editor.
Choose Drawing options and hover over one.
You will see a tooltip with the current size and a representation of that.
There are two rectangles.
The upper one is at 0.5 pressure which is what you get from a mouse.
The bottom one is at 1 pressure which you get if you press hard with a stylus or use the widening option on river.
Scroll the mouse wheel up or down in increase or decrease the size by 1 px.
This currently "works" for all of the options but is only meaningful for line.

Researching options to improve contour drawn elevations - so they give a gradual slope rather than a step.

Minor improvement to bevelled frame.

General Staff Support Forum / Preview on Nieblas y batallas
« Last post by lecrop on May 18, 2018, 05:03:50 AM »

I have posted a GSWS preview in Spanish on my blog Nieblas y batallas:

I'm a moderador on the spanish forum Punta de Lanza. Congratulations for the work done, eagerly waiting.
General Staff Support Forum / Re: The road ahead
« Last post by Adraeth on May 17, 2018, 07:31:05 AM »
Excellent, i am happy there is a parallel work on the AI from Ezra and yours for engine and editors. Take your time and we will have an excellent kriegspiel  O0
General Staff Support Forum / Re: The road ahead
« Last post by bbmike on May 17, 2018, 06:11:26 AM »
Yes, look through this sub-forum for more information. Really interesting looking game so far.  O0
Pages: [1] 2 3 ... 10