Jump to content

Introducing Sea Cliffs


Toby Haynes

Recommended Posts

It's time for a new scenario. Here's my latest production - Sea Cliffs - featuring CTF and Objective game modes.

This scenario features a sea port, a military base, steep hillsides and a research base. Finally I have a technique that produces sane roads (so no more extreme slopes to one side) and my erosion tools are ticking over nicely. Even the shadows appear to be working correctly.

Screenshot1-medium;init:.jpg

You can get it from this page:

http://tjwhaynes.googlepages.com/dropteamresource

Please let me know if there are any problems. The files are taken directly from my own data directory and so hopefully there shouldn't be a repeat of the Volcanic Deposits flipflop....

Cheers,

Toby Haynes

Link to comment
Share on other sites

I'm glad you like it (and judging from the screenshots I got the right files into the tarball!).

I now have permission from the company I work for to release the source code. The source code has nothing to do with the company I work for but we still have to notify them about any extra curricular activities.

I'll tidy up the source code and get it up on my Googlepages website in the next few days. The source code will be licensed under the GPL (partly because it uses some GPL code for the PNG file loaders but also because that is the license I prefer). At the moment, all the code has been developed on a 64bit Linux box so I'll try and get it to compile on a 32bit Linux box. I write code for many platforms for a living so I'm hopeful that porting shouldn't be too much of a burden.

Once that is done, I'll try and write a tutorial on creating a scenario from scratch. Beware - I'm a UNIX developer and the tools I wrote are all command line. I might add a GUI later but my interest is in good algorithms first, interface later. Oh and performance MUCH later! Some of the processing is of the "go and have coffee" school.

I'll probably stick the tutorial straight into the DropTeam wiki. That seems to be a natural place for it.

Cheers,

Toby Haynes

Link to comment
Share on other sites

Thanks Aittam.

In Objective mode, it's reall important for the defenders to spread out a bit and seize the good view points early so that they can cover the main attack directions. Also, because on Objective there is no covering AA tower, a Hermes and Bacchus combo is useful to restrict how close the enemy can land and minimize the threat of artillery.

When I've play tested this on the attacking side, getting either Apollo-H or Thor-H tanks into positions where two or more such tanks can engage the defenders simultaneously is key. I ripped through the bots squad of Thor's in the first three minutes using this tactic.

One of the things that is hard to get right as a map-developer is the actual playability. I can look at a landscape as I work on it and think about where the attackers might get overview of the objectives, or where defenders might hull down. Playing against the bots gives me some idea of how the battles might play out but it's not the same as having four or five human players engaging with better tactics. In many respects, having these levels included in the main DropTeam releases is fabulous because it allows me to finally see whether all those ideas really work.

Anyway, I welcome comments and (constructive!) criticism about this or any other map I make.

Link to comment
Share on other sites

The roads are a technique I worked out when I producing tracks for Trigger, a rally racing game that got somewhere around version 0.40.

It's basically a masked blur of the underlying terrain. So ideally I would create a selection which was the roads for the landscape and copy the selection into a separate layer. In theory, any decent graphics package should allow you to blur the roads based entirely (and ONLY) on the pixels within the selection. In practice, most graphics packages that I've tried (Cinepaint, Pixel and Krita) screw it up. I believe that locked layers in Photoshop act correctly but that's not a package I have at my disposal. Interestingly, gimp-2.2 gets this wrong but gimp-2.3 gets it right. Sadly the GIMP is only 8bits per pixel so that isn't suitable here. The bug report below details the problem if my explanation isn't clear enough.

http://bugzilla.gnome.org/show_bug.cgi?id=70335

So, in the absence of an appropriate filter on a graphics package, I wrote my own. I'm trying to tidy up the source code for all my tools so I can put a tarball up on my googlepages site - that hopefully will be done soon-ish. If you want an advanced copy of the routine I can send you some code. You'll need the PNG development header files, the libPNG libraries and a copy of SCONS for compilation. (If nobody else uses SCONS, I could be persuaded to write a Makefile).

The road-making utility takes the input landscape as a 16bit grayscale PNG file (without any alpha channels or anything funny like that), a mask image (also 16bit grayscale PNG) where the flat areas are white, unaffected areas are black. Gray areas will be flattened proportionally. Output is a new PNG image with the flattened areas.

Because the mask is just another image, you can use any paint tools you like to create the mask. I used Cinepaint and a graphics tablet to get nice smooth roads. The bases are just areas where I used larger brushes or worked over the area a little more.

Link to comment
Share on other sites

Hmmm, so, in abstract, the idea is:

</font>

  • Create your terrain heightmap and save it as PNG (or other convenient lossless format).</font>
  • Mask the areas off you want to be roads/flattened.</font>
  • Blur/smooth the masked area until it's regular.</font>
  • Merge the layers again.</font>
  • Convert to binary heightfield.</font>

Seems like a reasonable process. Wish it'd occured to me to use layer masking. I hate it when I forget the obvious.

Link to comment
Share on other sites

I use a circular blur with a radius of 25 pixels. The road is about 7 to 9 pixels wide so the effect is that the road is essentially horizontal widthwise. Beware of sharp corners going steeply up hill where this doesn't apply. As long as the curve has a radius of 25 pixels or so, no one will ever notice.

In a pixel editor, it is critical to cut the terrain out where the road is and put it into a seperate layer. This ensures that the rest of the terrain has alpha values of zero so that it does not affect the blur procedure.

My tool just spits out a new PNG with the appropriate areas flattened out. Usually one application is all that is required. If certain areas must be absolutely horizontal (such as the port area in Sea Cliffs), just select that area in a pixel editor and flood fill with an appropriate grey shade. Then just rerun the flattening as before and it will smooth out any rough transitions.

Link to comment
Share on other sites

My tool just spits out a new PNG with the appropriate areas flattened out. Usually one application is all that is required. If certain areas must be absolutely horizontal (such as the port area in Sea Cliffs), just select that area in a pixel editor and flood fill with an appropriate grey shade. Then just rerun the flattening as before and it will smooth out any rough transitions.
Makes complete sense and now that I understand the underlying method, I think I can pull it off. Which is good, because Hunt the Wumpus needs assembly areas and a couple little ragged cobblestone roads.
Link to comment
Share on other sites

×
×
  • Create New...