mopa42's maps

Started by mopa42, November 12, 2013, 12:12:01 AM

Previous topic - Next topic

mopa42

My first CW3 map!

Sheep Mountain Fog - Your explorations in this world are hindered by a sickly green mass hovering over the landscape. A "Fog of War", if you squint.

Highlights from the guide book:

  • Never-before seen shade of green.
  • The most realistic terrain west of ... someplace east of here. Lots of hill climbing - bring the whole family out on a stroll!
  • Ore, energy, and a power zone are near the start.
  • World promotes wide-front assault tactics with steady advancement.

Just want to see the fog? Download the crpl.

Michionlion

So... I just had an epic map idea.  I shall be experimenting!  Haven't play your map yet, but I'll get around to it sometime, it looks cool.
"Remember kids, the only difference between science and messing around is writing it down."
                                                                                                                         - Adam Savage

My website
My CW1, and CW2 maps!

TLMike

This was fun. It forced me to build out in a way that I don't normally do. You know, because I didn't want any fog left on the map....

Anyway. I'm sure this map was inspired by previous threads on the subject of fog. And I'm glad this happened, because, frankly, I think FoW is a great thing for this game to have (under certain circumstances).

But, I have to say that I wish the fog weren't so...square. That is, I wish that the sight of each of my towers was round and left a concave dent in the FoW itself.

The Fog is (fair warning: my understanding of CRPL is limited, so try not to think I'm an idiot)--the Fog is sort of a binary switch: if there's a unit in range to see into a sector (let's label it, C2, for ease of discussion), then whatever script controls the fog, whether each sector gets its own CRPL Core and its own script, or whether there's one script which governs the whole thing-- if there's a tower with line of sight in range of sector C2, the switch turns the FoW off. Simple enough.

But, I would prefer if the bits of fog were concave-round. If each sector has its own CRPL core, then this would require like hundreds of cores and hundreds of layers of FoW machines so that each time I move on of my towers a tiny bit forward, a bit more fog is turned off. Now, like I said, my understanding of CRPL is limited. But, obviously, with a lot of work, this could be done. I understand if no one wants to do it.

My other kind-of-gripe with the Fog here is a result of it being so blocky. I wish that units close to terrain which is two or more levels above it would not have line-of-sight, and would thereby not be able to see into the fog. So, units like Sprayers and Pulse Cannons wouldn't be able to see upward, but units like Mortars would (since they can fire over walls, and that). Collectors and Relays should probably be able to see up the next level of terrain, or you'd never be able to advance your line.

Now, this would be pretty easy to do if the FoW cells weren't as big as Command Nodes (9 cells by 9), but were 1 cell by 1 each. And if each Fog sector is controlled by its own core, that's a lot of CRPL cores. Jesus, a 256x256 map would have 65K+ cores for the Fog alone.

Again. I wish my suggestions about the fog were true, but I totally understand if no one wants to code that. 

eduran

Quote from: TLMike on November 12, 2013, 04:01:36 AM
Now, this would be pretty easy to do if the FoW cells weren't as big as Command Nodes (9 cells by 9), but were 1 cell by 1 each. And if each Fog sector is controlled by its own core, that's a lot of CRPL cores. Jesus, a 256x256 map would have 65K+ cores for the Fog alone.

Again. I wish my suggestions about the fog were true, but I totally understand if no one wants to code that. 

I actually did code that a few days ago. The resulting lag on a 100x100 map was horrible (my machine managed to crank out something like 2 frames per second). Thousands of cores checking for units in range all the time is apparently too much for the game to handle.

Michionlion

You should be able to do something with just one tower looking for unit changes...  and then updating a list which is used to draw the images...  I have no practice with that, though, so I'd have to see.
"Remember kids, the only difference between science and messing around is writing it down."
                                                                                                                         - Adam Savage

My website
My CW1, and CW2 maps!

mopa42

The way I did the fog was as fast as I could conceivably think of doing it: only one core calls GetUnitsInRange, and it then decides which of the slave cores is on or off based on the presence of any player unit in that cell or in adjacent cells. I determine which cell block a unit is in just by dividing the x and y coordinate by the grid size.

Theoretically, I could have custom rules for unit types, considering the ranges and terrain differences and such to see how many cells are visible to a given unit. I didn't go that way just because of speed - I wanted something as fast as possible. Some of the variants I tried brought my (slow) machine to its knees.

The core issue seems to be the need to have units representing the fog, rather than units representing gaps in the fog. There is no overlay mode that lets you cut out a circle from another image. If that were possible, we could very easily have pretty circular holes in the fog.

TLMike

Right. I figured it would be an almost insane endeavor. Which is why I suggested making the Fow sectors 1x1 cells each. Then if you turn off the right ones, you can get a decent circular shape.

But, you're probably right. Speed is all.

Grauniad

Mopa42, Virgil has some kind of FoW effect on the credits mission. There is also a map in the Alpha sector (forgot the name/author) that implements a non-square FoW.  I assume you did look at that code in implementing your own FoW?
A goodnight to all and to all a good night - Goodnight Moon

eduran

The credits mission uses an inverted circle centered on the player. That works as long as there is only one unit, otherwise the circles will overlap and you end up not seeing anything.

Grauniad

Incidentally, nice (and difficult) map. I lost one of my CNs early on and thought I'd just push on regardless. I did hope that perhaps totems or some other unit could act as a lighthouse to cast a wider illumination on the map, since towards the end clearing the FoW was a bit tedious more than difficult. Nice map however, right up there in the list with MadMag's maps.
A goodnight to all and to all a good night - Goodnight Moon

TLMike

That same thing happened to me, G.