HexFarm - Now with destroyables bridges

HexFarm - Now with destroyables bridges

All map release threads should be posted here

Moderator: Moderators

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

HexFarm - Now with destroyables bridges

Post by zwzsg »

This map use Lua trickery to redo the heightmap (as well as terraintype, metalmap if available, airmesh, etc..), and to draw textured quads by itself, so that the map layout and appearance is controlled by code, and is thus configurable and randomisable.

Download link: http://springfiles.com/spring/spring-maps/hexfarm8

Pictures

Image
^ Can be explored, destroyed & rebuilt ^

Image

Image

Image


Download at
http://springfiles.com/spring/spring-maps/hexfarm8


Map Options


Randomisable:
  • Force All to random : Ticked by default, this make it ignore every other map option and use random or automatic values instead.
  • Skin : Auto guess from the presence of some units what mod is it, and attempt to pick an appropriate skin, with still a random factor for better variety.
  • Color : Fixed is normal color, Team Color make the whole texture grayscale, and then add team color depending on who owns the towers. Where ownership is determined by who finished a building over 5x5 footprint on the tower.
  • Boundary : You can use /cheat /devlua to see the boundary ingame (except circle and rectangle).
  • Center : This just offset the lattice.
  • Density : Full towers looks too crowded, the T75 B50 remove one tower out of four, making the map more pleasant looking.
  • Geo : How many towers top have geovents.
  • Metal : How much metal the sum of all towers is worth (the 25% on the bridges is bonus). If you put 0, then it use automagical formula 30+6*(TeamCount without Gaia).
  • Tower Radius : How big are the tower tops. 0 for a random value between 192 and 768
  • Bridge Length : How long are the bridges between tower tops. 0 for a random value between 4 and 384
  • Bridge Width : How large are the bridges. Best is to use the same value as Tower Radius. 0 for a random value between 64 and TowerRadius, skewed toward TowerRadius.
  • Bridge Slope : The angle of the bridges Positive for concave, negative for convex. 0 for a random value between -45° and 60°
  • Orientation : Turn the lattice, north-south-east-west wise. 0 for a random value between 0 and 360.
Distance are in pixels
Angles are in degrees

If you like a certain random layout, you can read back what values were picked from infolog.txt


Not Randomisable:
  • Exploration : Does the map needs to be explored: 0 if no, positive if has to be scouted, negative if it has to be constructed, also if not zero absolute value is duration in second of popping effect.
  • Destruction : Can bridge and tower be destructed, 0 if no, positive for multiple of median unit hitpoint, negative for absolute hitpoint.
  • Construction : Can bridge and tower be reconstructed, 0 if no, positive for multiple of median unit buildtimecost, negative for absolute buildpower. To reconstruct bridges and towers, build something, anything, nearby.
  • Method : Fast : Detect units destruction and completion. Precise: Detect explosions and build steps.
  • Indication : Tick to have destruction and construction percentage indicators over tower and bridges.
More details on those five last on page 3.



Start Position
  • Fixed Start Position place teams on the map extremities
  • Random Start Position place the teams evenly around the map
-> So use fixed start pos if you play 1 vs 1 on rhombic or 3 FFA on triangular!


Custom Skin

The map skin can be ovveridden. Place an image named HexFarm.png into your Spring folder, and the map will load it. Here is an exemple texture:
Image

The texture can be placed in any folder scanned by Spring. It can be named HexFarm.png to load it every time, HexFarm8.png to not load it for other versions of this map, or hexfarm8_technical.png, hexfarm8_pastoral.jpg, hexfarm8_geological.jpg, hexfarm8_capital.png, hexfarm8_medieval.png, hexfarm8_industrial.png, hexfarm8_summital.jpg, hexfarm8_crystal.jpg, hexfarm8_digital.png if you want to be more specific and only override one of the skin. HexFarm8.png will make it use different texture for tip and bottom of columns, HexFarm.png will make it alternating texture when alternating face.

The texture can be any size, but respect the 4x1 ratio if you don't want pixels to be stretched. Also, I believe old graphic card prefer textures to be power of two.

Alpha channel is used to make everything under 50% transparent, use it to make the bridges see-through.

The two pixels at 1,1 and 1,2 from top-right are used to color the sky and the groundfog. However, it would be best if you used black, because fade to black can be done without extra fog layers, and because my lua skybox thingy fails for unclear reason if the camera isn't up and away.


Known Bugs
- Units maybe be rendered all black if you use "reflective unit" video setting. To fix, disable reflective units video setting.
- The flattening on ramps and near edge never completes: Don't build there!
- Spring bouncing and pushing can make you lose units to the void.
- When 1v1 random startpos on a two-towered map, sometimes teams start on same tower.
- Since Spring 95, when new towers rise outside the sight of your units, your eyes see the new towers (because the map Lua doesn't care about LoS), but your units and interface only know about them (that is, will accept to go or build there) when you move a unit close enough to get sight. => If you can't build somewhere, move a unit on the spot first.


Changelog

HexFarm8:
- Fixed max index in SetMapSquareTerrainType and SetMetalAmount to fix crashing in Spring 99 and over.

HexFarm7:
- Now disabling fog if FPS is low.
- Fix bug where frontier shape wasn't resized with area.
- Skin can now use face A for the tip and face B for the rest of columns.
- Added skins Summital and Crystal.

HexFarm6:
- Added percentage of construction and destruction : ugly but better than nothing
- Units inside air transport don't explode anymore

HexFarm5:
- Load much faster!
- Include a new skin by KaiserJ
- Increased size from 12x12 to 24x24
- New map option to restrict dimension
- Bridges and towers are now destroyable and rebuildable!

HexFarm4:
- Amount of metal is now configurable, and much higher by default.

HexFarm3:
- Added PicassoCT city-at-night and monument valley skins
- Avoid the case with three unconnected towers by adding a big one in the middle in this case
- Push back units that only slightly fell
- Fixed bug where the two pixels for skybox only worked for a given texture size

HexFarm2:
- Now with three skins: Medieval, Industrial, Digital
- Not all towers have geo anymore
- Set metal map (if possible) and terrain type map
- Workaround for relayhost start pos type implemented
- Destroy units that are outside the playable area
- Draw fog and a pseudo skybox for external skins
- Use the texture transparency
- Avoid time-outs with ClearWatchDogTimer instead of setting overlay

HexFarm1:
- First release!

Topic split from the KP subforum thread as this map is no longer only for Kernel Panic.
Last edited by zwzsg on 09 Sep 2015, 23:22, edited 15 times in total.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

HexFarm - N4T

Post by PicassoCT »

I guess its the random i cant resist.

http://springrts.com/phpbb/download/fil ... ew&id=6737


Works even better without lighting at all. Im out of here before you can demad a fix of anythin ;)
Attachments
hexfarm.png
(3.65 MiB) Downloaded 3 times
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: HexFarm - Dynamically generated map (Also random)

Post by Beherith »

the fuck is this
the fuck is that
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: HexFarm - Dynamically generated map (Also random)

Post by smoth »

God z is a fucking code ninja
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

Beherith wrote:the fuck is that
What PicassoCT posted is a new Skin for this map.

To use it:
- Get HexFarm2 or higher.
- Download PicassoCT file into your Spring folder.
- The map will use it instead of its internal textures.

Image


Beherith wrote:the fuck is this
  • HexFarm1 has issues under Spring84, namely, the antihang doesn't work so there's crashdumps during loading which slow it down even more.
  • HexFarm2 has issues, namely, the void silently eats planes and units near the edge.
  • HexFarm3 not out yet, I'm still busy debugging it.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: HexFarm - Dynamically generated map (Also random)

Post by knorke »

units (at least xta commander) seem to have problems making buildings on the ramps. On the hexfields they can build normal but on the ramp the nanoframe only gets 1% build. Usually you can just rightclick the nanoframe again to skip terraform but here that will just make it build for another 2% or so, then stop again. (though perhaps that is 84.0 idk)

Apart from that the map is win ofcourse, the idea to provide different textures is very good.
Attachments
xta20111202_145347_Hex Farm 2_84.0.sdf
(142.84 KiB) Downloaded 88 times
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

Hmm, is there anyway to disable terraforming completly except for my Lua? Because if buildings or explosions change the heightmap, then it won't match the graphic anymore.

I made the ground extra-tough but not indeformable. If I make it indeformable then my Lua can't change heightmap anymore.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: HexFarm - Dynamically generated map (Also random)

Post by knorke »

Not sure if some mods or maps have an option to disable mapdamage.
I thought maybe on UnitCreated() flatten the ground under the building but Idk if that would work. Or make buildings not require terraform with a unitpostdef.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

I demand destructable buildings... if you hammer to hard on the way ahead.. it might collaps under to much weight (50 gators lost).. and if you do so, you have to build the bridges yourself by donating conunits to the gap:D

Also: luarules reload turned evil on this map
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

Dunno why im so obsessed with this.

Guess its that the obsticles to take part in the competition are rather low and the results look rather cool. Also i miss beeing good at something. Beeing below the 10.000 hours at something always sucked. And i hate that rope by now. I really hate some bits and bytes.

Here is the monument valley themed hexfarm. Its not as good as city, because, well, city is closer to hexagonal structures. And even my city was ideal. Best would be a ghost in the shell like skyscraper style. Something hanging between the digital world and the futuristic reality.

If ever anybody uses it. Have fun.
Attachments
hexfarm.png
(6.7 MiB) Downloaded 3 times
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

Not sure I like enough to double my map filesize:

Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

yeah.. it doesent look like monumentvalley at all.. sorry..

that dark strip is wrong, and the columns are to bright, the sand looks artificial, and the top that is overgrown sucks ...

will do a rework of this..
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

Car liked, so I jpeg it and put it in HexFarm3:
http://springfiles.com/spring/spring-maps/hexfarm3
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Re: HexFarm - Dynamically generated map (Also random)

Post by SirArtturi »

zwzsg wrote:
Image
As much I like this, theres one thing that annoys me: It's missing awesome futuristic skybox...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: HexFarm - Dynamically generated map (Also random)

Post by Pxtl »

zwzsg wrote:Car liked, so I jpeg it and put it in HexFarm3:
http://springfiles.com/spring/spring-maps/hexfarm3
Oooh, good use of alpha. Although at that scale, won't the peewees get their poor little legs stuck in the grate?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

noo.. noo.. i get it. this is a conspiracy.


SY-Chatlog searched and found:
Someone: I got enough of his rants.
SomeoneOr: And see how he is stuck kneedeep in featurecreep, getting nowhere.
SomoneElse: Sure, but how do we get rid of him?
SomeoneXor: We could get him back into the mapping section, and trap him there. He could do nice skyboxes, and insane stuff, and everything would work, and nobody would ever have to worry about his project stuck in the pipeline through sibiria.
SomeZero: Good plan.
SomeAll: Lets put that into action.
Is shall no longer lift a finger for this. Tempting me back into my old ways, you are.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

SirArtturi wrote:As much I like this, theres one thing that annoys me: It's missing awesome futuristic skybox...
I don't know how could I dynamically swap skyboxes at runtime.
Pxtl wrote:Oooh, good use of alpha. Although at that scale, won't the peewees get their poor little legs stuck in the grate?
Peewees are okay. Cursed infantry, on the other hand...

Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

Isnt it a good and honored tradition to sacrifice the infantry to bridge the gap between diffrent cultures ? Hmmm... im getting bad ideas allready. We havent had hexagons made of skulls yet. Hell ....
nah, i really have troubles getting carried away by good ideas.

Same stuff with a friend today. He suggested adding skelettons to the zombies in jw, so if they would touch the E-fence, and get fried, i could show there skeletons through...idea was good. But turned out to be bad if you have to do it for every freaking unit in jw.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: HexFarm - Dynamically generated map (Also random)

Post by zwzsg »

Because there is no reason only PicassoCT gets to make me skins:

The map is set up for anyone to use his own skin.

Step 1:
Download the map: http://springfiles.com/spring/spring-maps/hexfarm3

Step 2:
Have a file named hexfarm.png in your Spring folder.






The texture should be of dimension n^(n+2) by n^2. Ok, that's lil bit too technical. The texture should be four time as wide as tall. Better? Well, in fact the texture can of any dimension, but if it's not fourth as wide as tall, then the pixels will be stretched. And if the dimensions are not power of 2, then some older graphic cards may have problems displaying it.

There is no hard filesize limit. However, I noticed that the texture makes up for most of the map size, so the smaller the better. I now regret making the "digital" skin 4096x1024 considering the "industrial" and "medieval" skins are merely 1024x256 yet look nice ingame.




There is no bumpmap or self-illumination. Worse, I don't apply shading on the geometry, it's displayed as fully lit, always, from every direction. However if it is important for you, then I can apply sun lighting on it, making it shaded in the back, shiny in the front. But reading the self-illumination or other light data from the texture itself is out of my league.

You can use the alpha layer to have see-through, particulary useful for the bridges. Anything with alpha under 50% is completly transparent, anything with alpha over 50% is completly opaque.




To aid you, here is a ready to use texture: hexfarm.png. Just save into any folder scanned by Spring, and notice how it overrides the skins included into the map archive.

Image




As you can notice, the texture is cut like that:

Code: Select all

	--
	--          ____4        ____4
	--        3/  1 \3     3/  5 \3
	--        /__geo_\     /______\     
	--       |\   2  /|   |\   6  /|    ___________
	--       | \____/ |   | \____/ |   |\____7_____\
	--       | |    | |   | |    | |   \|_____8____|
	--       |4|    |4|   |4|    |4|
	--       | |  3 | |   | |  3 | |
	--       | |    | |   | |    | |
	--       \ |    | /   \ |    | /
	--        \|____|/     \|____|/
	--
	--
	--  ________________________________
	--  |/  |  \|   |   |/  |  \|   |   |
	--  ||1 | 2|| 3 | 4 ||5 | 6|| 7 | 8 |
	--  || geo ||   |   ||  |  ||   |   |
	--  |\__|__/|___|___|\__|__/|___|___|
	--
	--
Also compare the exemple texture with how it looks ingame to get a better grasp of how it's mapped.




When it reads the texture "hexfarm.png" from outside (as opposed to the internal textures), and when not teamcolored, then it uses the top-most pixels for the skyboxes (as pointed in the exemple texture).




Because drawing the hexagon was the hard part, here's one: HexaRaw05.png Resize to appropriate size, and sorry for the lack of sharpness in the edges, but if you can draw a crisp hexagon perfectly fitting and centered in the square, then please do and give me.




I suggest you untick the map option "Force all to random", and increase the tower radius and bridge length, or else you'll waste too much time waiting for Spring to load LuaRules.



See me in lobby if you have further questions.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: HexFarm - Dynamically generated map (Also random)

Post by PicassoCT »

mods please move this to mapping, this isnt zwzsgs child anymoar!

Also, if we make further skins, we could bloat this baby into the 100 mb area. Nobody would download this map


Goto hand it to the Big Z: Well done. Thats the spirit of open source right there, catched in this ... paint on that png, and it appears ingame. No scareOffs, not "write into this luafile" .. no look it ups in the wiki. This is the crack that makes the custoMizers come back.
Post Reply

Return to “Map Releases”