Forums
April 29, 2024, 05:29 PM

Author Topic: MapGEN v0.8.7.2  (Read 55843 times)

0 Members and 2 Guests are viewing this topic.

Offline Plutonic

Re: MapGEN v0.7.1
« Reply #120 on: March 29, 2016, 06:38 PM »
For WfW, I would like to know which color means what

Right! As I don't remember how WfW stuff works I am going to do my best from the code comments:

Glossary:
Ok, first off, some terminology.
* Blocks: Blocks are the graphics used to make up Lines.
* Lines: Are used to connect between different Nodes
* Nodes: Are the small circles you see about the place and are possible connection points.
* Pads: Are special nodes, which will contain a weapon.
* Tiles: are graphics containing any of the things above, represented by different colours.

Lines:
White is replaced by normal Blocks that make horizontal and vertical lines. Yellow lines are the same, but use the diagonal graphics.

Nodes:
Nodes are the small orange or blue circles, and are the main connection points between different Tiles. They use various shades of green:
RGB(0,255,0) : Top Connecting Node : A node placed near the top, a good candidate for connecting to a Bottom Connecting Node.
RGB(0,128,0) : Bottom Connecting Node : (Like above)
RGB(128,255,128) : Left Conneting Node: (Like above)
RGB(0,192,0) : Right connecting node: (like above)
RGB(0,0,255) : Dummy node: Will add a node, like the above, but flag it as used so that it cannot be conencted too. (good for corners)

Pads:
RGB(255,0,0): These make up the main gameplay surface, providing positions for the placemnt of weapons.

Blocking Areas:
RGB (0,255,255) and RGB (0,255,255)
Both of these are used to mark areas that no other tile should overlap. Connecting nodes should stick out a bit to allow connection.
The brighter of these, is used (as far as I can tell) To show important areas e.g. the space a Pad will take up when the tile is placed, or an area that would become inaccessible if blocked.
Code wise however, they seem to be treate the same. It checks for these areas before placing a new tile. This check is only one way though, a black pixel on the new tile will collides with one of these on an old one and be rejected. This is proabbly a bug realy though...

It continues to do this, either chaining tiles together or starting new ones until it hits the required number of Pads.

Hope that helps, any more questions let me know, and if you come up with some new tiles that work realy well (or find some of mine that tend to ruin it) let me know and if you want I can get them added to the main package.

Good luck!

Offline Plutonic

Re: MapGEN v0.7.1
« Reply #121 on: April 09, 2016, 04:11 PM »
Quick question, where do people tend to put MapGen? Just in the WA folder? Program Files? Somewhere else?

Offline StepS

Re: MapGEN v0.7.1
« Reply #122 on: April 09, 2016, 04:35 PM »
User\MapGEN
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline Sensei

Re: MapGEN v0.7.1
« Reply #123 on: April 09, 2016, 04:44 PM »
External Mapgen in program files.
But wk_mapgen in WA folder (useful module, especially when you're too lazy to leave the game for picking map)

EDIT: btw, any new infos about soil free maps, plutonic?

Offline Plutonic

Re: MapGEN v0.7.1
« Reply #124 on: April 09, 2016, 07:17 PM »
Ah cool, thanks! Does it work ok in program files? Which OS are you using?

As for the backgrounds I have done all I can my end, it will need a change to WA to do it properly. I will talk to Deadcode about it again when I next see him

Offline Sensei

Re: MapGEN v0.7.1
« Reply #125 on: April 09, 2016, 07:33 PM »
Yeah, it works perfectly fine. Win7 user here. There were some crashes lately, but it's cause of generating maps. I do it so fast that program can't follow commands. Learning to be patient :)

Eh, pity that "no soil" stuff can't be done without updating WA. It's really only addition that MapGEN needs. Btw, Deadcode is online most of the time in #worms channel, so try finding him there.

 

Offline h3oCharles

Re: MapGEN v0.7.1
« Reply #126 on: April 10, 2016, 08:21 PM »
Quick question, where do people tend to put MapGen? Just in the WA folder? Program Files? Somewhere else?

Program Files

While I'm here, apparently the program is freezing to the point I'm crashing when I attempt to generate a default-sized 20-island map. Is this something related to my weak hardware? I am using windows 10.
« Last Edit: April 10, 2016, 08:23 PM by TheMadCharles »

Offline Plutonic

Re: MapGEN v0.7.1
« Reply #127 on: April 10, 2016, 09:37 PM »
Ha! Um, not sure, I will take a look, but that will only produce a map with 20 vertical lines...

Online XanKriegor

Re: MapGEN v0.7.1
« Reply #128 on: April 11, 2016, 03:07 AM »
Plutonic, i think i know how to solve Sensei's background problem, gonna post at the evening.

Lets start:



This is 52-color MapGEN-created map, with "112 colors" option choosen. But it still have its native 52 colors. I would make "No Soil" checkbox that would do the following:

- If Generate Map button hitted, count resulting image's colors. If user said he need no soul, there should be more than 96 of them.

- We counted colors, result is 52. 97 - 52 = 45. Write this number in a variable.

- Use bottom line of pixels to add these 45 extra colors. They should exist somewhere or else WA will delete them from map's palette due to misuse. This might look like this:



- This line is a grayscale gradient, 64 colors. Lets say first pixel is reserved for Indimask marker. Now, set pixel #1 of the bottom line as color #0 from this gradient.

- Decrement our total colors counter, now it contains "44".

- Set color #1 as color of next, #2 pixel, decrement the variable.

- Repeat this until counter = 0.

- Some colors from the gradient might match with existing colors. Recount them again.

- Oops, 5 colors are exists already, we have 92 colors total.

- Add 5 more colors from the gradient.

- Recount colors.

- Ok, we have 97 colors, no soil will appear, save the map.

    This method will be a little more complicated than to keep color count for each theme in a chart somewhere inside MapGEN, but it gives theme-independency. New themes might be added, no modifacation of this "procedure" will be needed.
« Last Edit: April 11, 2016, 04:40 PM by XanKriegor »

Offline Sensei

Re: MapGEN v0.7.1
« Reply #129 on: April 11, 2016, 04:49 PM »
Looking at this post like it's an article written in hieroglyphs.. But if Xan managed to solve it, I'll just...


Offline Plutonic

Re: MapGEN v0.7.1
« Reply #130 on: April 11, 2016, 05:46 PM »
Thanks Xan, I had considered the hidden extra colours route, but it didnt seem like the "right" solution as you are throwing away colours other parts of the game could use for no benefit to the map.

Tjat said, I may well end up implementing it, or something like it after 0.8 (this update is already pretty involved).

For what its worth, the correct solution is to move the background mode away from a palette fallback, and turn it into an option in the waLV chunk, or even, at the scheme setting level.

Online XanKriegor

Re: MapGEN v0.7.1
« Reply #131 on: April 11, 2016, 05:57 PM »
Well, if someone wants to get rid of the soil - its only way so far.

Offline Plutonic

Re: MapGEN v0.7.1
« Reply #132 on: April 11, 2016, 07:02 PM »
Maybe... but the map results are somewhat not as you might expect...

Offline Sensei

Re: MapGEN v0.7.1
« Reply #133 on: April 11, 2016, 07:09 PM »
Hm, we tested and it worked. Xan formed MapGEN map and add 97th color to it.
When I tried it in game, soil wasn't there.


Offline Plutonic

Re: MapGEN v0.7.1
« Reply #134 on: April 11, 2016, 07:39 PM »
Its at 112 colours that it should happen. It looks like one of the colours is getting stuck as a duplicate still...