Recent Posts

Pages: [1] 2 3 ... 10
General Staff Support Forum / Re: Changelog - picture heavy
« Last post by Andy ONeill on Yesterday at 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
General Staff Support Forum / Re: Changelog - picture heavy
« Last post by bayonetbrant on May 17, 2018, 04:09:14 AM »
Pages: [1] 2 3 ... 10