Light Style© by Fisana

Jump to content


Photo

new random island map generator


  • Please log in to reply
29 replies to this topic

#1 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 12 August 2011 - 02:05 PM

I really enjoy 0ad so I decided that I would try to contribute. I have created a new random map. It creates one central island surrounded by spoke islands. Players start on the spoke islands. If there are fewer than 6 players the map will have six spoke islands and players will start off on islands as indicated by the chart below. If there are more than 6 players there will be a spoke island for each player.


0 = empty island
x = occupied island

1 pers | 2 pers | 3 pers
_x_0_ | _x_0_ | _x_0_
0_0_0 | 0_0_0 | 0_0_x
_0_0_ | _0_x_ | _x_0_

4 pers | 5 pers | 6 pers
_x_x_ | _x_x_ | _x_x_
0_0_0 | 0_0_x | x_0_x
_x_x_ | _x_x_ | _x_x_


The map is intended to model mediteranian islands. Each spoke island has the standard start metal and stone as well as a few trees and other standard starting resources. There may be a few forests as well depending on the map size. The main island has most of the rest of the resources. The sea is populated by fish, whales, and random treasure.

I like the normal size maps best but all sizes work. I used the Cantabrian Highlands and Latium maps heavily as guides and templates for some parts of the code.

To install this random map put islands.js and islands.json in the random map folder. In my copy of 0ad I use the following path ~/0ad/binaries/data/mods/public/maps/random

Please let me know how you like this map and your suggestions. (I am more of a programmer than an artist so would appreciate comments on its artistic aspects). I would love if this random map could eventually become part of 0ad.

Attached Thumbnails

  • isEx1.jpg
  • isEx2.jpg
  • isEx3.jpg

Attached Files


  • 0

#2 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 12 August 2011 - 03:26 PM

Very nice. One thing I don't like (and this is the case with the other random maps we have) is the random-facing direction of the starting Civic Centre. It's modeled (as are most buildings) to look best facing toward the bottom right corner of the screen.

The map itself looks really nice. Some nice blending going on along the shorelines. (y)
  • 0

#3 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,788 posts

Posted 12 August 2011 - 05:24 PM

Sweet (y) Really nice to see :)
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#4 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,392 posts

Posted 13 August 2011 - 12:38 AM

Cool! It's about time we had an islands random map, will definitely check it out.

Very nice. One thing I don't like (and this is the case with the other random maps we have) is the random-facing direction of the starting Civic Centre. It's modeled (as are most buildings) to look best facing toward the bottom right corner of the screen.

I've just forgotten to fix this :P
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#5 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 13 August 2011 - 03:54 AM

Very nice. One thing I don't like (and this is the case with the other random maps we have) is the random-facing direction of the starting Civic Centre. It's modeled (as are most buildings) to look best facing toward the bottom right corner of the screen.

The map itself looks really nice. Some nice blending going on along the shorelines. (y)

Thanks for the comments. I have attached two images to this post showing my attempts to fix the random facing Civic Centre. One is to use a fixed orientation for all the Civic Centres (so they all point towards the bottom right). The other is so the Civic Centres are oriented towards the center island. I think I like the one where they all are facing the center island because the fixed orientation one looks a bit unnatural but I still could be convinced either way. Both of these ways are a lot better then the way it was before (random orientation). Let me know which way you think looks better.

Thanks for noticing the shore blending :P. That took 5 painter layers: wet sand, dry sand, dry sand to brush, brush to grass, grass


I've just forgotten to fix this :P

I noticed that someone fixed this in the svn today :)

Attached Thumbnails

  • isFix.jpg
  • isRot.jpg

  • 0

#6 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,392 posts

Posted 13 August 2011 - 04:22 AM

Yeah I fixed it. If I'm not mistaken the point was that the starting camera angle hides the building and possibly units, if they're rotated the wrong way. It's not as realistic as all the buildings facing different directions but it's a nice way to start the game :)
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#7 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 13 August 2011 - 02:33 PM

Thanks for the comments. I have attached two images to this post showing my attempts to fix the random facing Civic Centre. One is to use a fixed orientation for all the Civic Centres (so they all point towards the bottom right). The other is so the Civic Centres are oriented towards the center island. I think I like the one where they all are facing the center island because the fixed orientation one looks a bit unnatural but I still could be convinced either way. Both of these ways are a lot better then the way it was before (random orientation). Let me know which way you think looks better.

Nice. :) I think in a small map where you see all of the Civ Centres in one screenshot, the fact that they all face toward the center looks good. However, I think in most matches you will never see a view like that, so making them all face the center really doesn't do anything aesthetically. Personally I'd rather have a consistent "look" to things.

Thanks for noticing the shore blending Posted Image. That took 5 painter layers: wet sand, dry sand, dry sand to brush, brush to grass, grass

Yep! Such detail is appreciated greatly! Gives a "hand-painted" look.
  • 0

#8 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 13 August 2011 - 10:53 PM

isNew.jpg
I changed the orientation of the buildings so they all face bottom right corner. (If you want the civic centres to all to face the center island comment out line 236 in islands.js that is //angletemple = 0.75*PI;). I made a few other changes inluding:
  • adding some blending to the edges of the shrub patches.
  • more decorative stones.
  • removed the restrictions that straggler trees and decorative stones couldn't be on hills.
  • allow straggler trees to grow closer to the shore and water
  • whales generate further away from islands
  • added more bumps
I also cleaned up the code a little bit. I have attached the new files below.

Attached Files


  • 0

#9 WhiteTreePaladin

WhiteTreePaladin

    Primus Pilus

  • WFG Retired
  • 1,641 posts

Posted 13 August 2011 - 11:19 PM

One of the reasons decorative rocks were restricted from the hills was because they don't align to the terrain. This means that they often appear to be floating. That's a feature that needs to be re-implemented from the first simulation.
  • 0

Brian [aka WhiteTreePaladin]

0 A.D. Gameplay and UI Developer


#10 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 14 August 2011 - 02:55 AM

One of the reasons decorative rocks were restricted from the hills was because they don't align to the terrain. This means that they often appear to be floating. That's a feature that needs to be re-implemented from the first simulation.

In Sim1 this was done in the entity. I'd like to instead do this in the actor, perhaps with a checkbox for simple terrain conformity. Perhaps more complete terrain conformity will need to be done in entities, I don't know. But it seems like overkill to require an entity be made for simple decorative things like rocks.

isNew.jpg
I changed the orientation of the buildings so they all face bottom right corner. (If you want the civic centres to all to face the center island comment out line 236 in islands.js that is //angletemple = 0.75*PI;). I made a few other changes inluding:

  • adding some blending to the edges of the shrub patches.
  • more decorative stones.
  • removed the restrictions that straggler trees and decorative stones couldn't be on hills.
  • allow straggler trees to grow closer to the shore and water
  • whales generate further away from islands
  • added more bumps
I also cleaned up the code a little bit. I have attached the new files below.

I took a look in Atlas. Very nice! Some comments (the first two aren't aimed at you):

-- We really need some dialog or something to tell us that the Map Script was "working." It took a while to generate the map and I thought Atlas had frozen or something.

-- We also really need a way to choose the number of players before generating the map in Atlas.

-- I think the grass areas can be less mixed.

-- Check out the map "Cycladic Archipelago III" for some ideas on how islands can look, specifically terrain blending, the terrains I picked, the trees I used, and how cliffs can look. Check out the map "Sicilia" for more ideas on how cliffs and beaches can look.

-- I made a new tree-type, "Cretan Date Palm" which would go great with your islands (there are three varieties for your pleasure, clump, short, tall). Check them out. :)

-- Need some more underwater terrain blending, specifically the black terrain for really deep water.

-- If you break up the large center island into a couple of smaller islands, I don't see why we couldn't use your script as the "official" Cycladic Archipelago random map in the next release. :worship:
  • 0

#11 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 14 August 2011 - 04:49 AM

-- We also really need a way to choose the number of players before generating the map in Atlas.


You can already (this is how I have been testing my map). Under the player settings tab there is a drop down box where you can pick the number of players. Then if you go back to the map settings tab you can use the drop down box for random maps and pick Islands. It should be there if you put the map in the right folder. Then you can change map size, random seed and then click generate map.

-- I think the grass areas can be less mixed.

-- Check out the map "Cycladic Archipelago III" for some ideas on how islands can look, specifically terrain blending, the terrains I picked, the trees I used, and how cliffs can look. Check out the map "Sicilia" for more ideas on how cliffs and beaches can look.

-- I made a new tree-type, "Cretan Date Palm" which would go great with your islands (there are three varieties for your pleasure, clump, short, tall). Check them out. :)

-- Need some more underwater terrain blending, specifically the black terrain for really deep water.

-- If you break up the large center island into a couple of smaller islands, I don't see why we couldn't use your script as the "official" Cycladic Archipelago random map in the next release. :worship:


I looked at the maps you mentioned. They are really great and gave me some new ideas about blending and terrain to use. I think you are right that grass is currently too mixed.
How many islands were you thinking the center one should be broken into? I had tried just randomly generating other islands at random coordinates but they ended up ending up spaced nicely maybe if I define ahead of time the possible areas and range of angles they can be generated at. I will definitely keep working on this and it would be awesome if you can use this in game once I have made all the necessary changes.
  • 0

#12 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 14 August 2011 - 05:10 AM

You can already (this is how I have been testing my map). Under the player settings tab there is a drop down box where you can pick the number of players. Then if you go back to the map settings tab you can use the drop down box for random maps and pick Islands. It should be there if you put the map in the right folder. Then you can change map size, random seed and then click generate map.

Alright! We need a better way of doing this. ;)

I looked at the maps you mentioned. They are really great and gave me some new ideas about blending and terrain to use. I think you are right that grass is currently too mixed.
How many islands were you thinking the center one should be broken into? I had tried just randomly generating other islands at random coordinates but they ended up ending up spaced nicely maybe if I define ahead of time the possible areas and range of angles they can be generated at. I will definitely keep working on this and it would be awesome if you can use this in game once I have made all the necessary changes.

I'd say islands about the size of the players' starting islands. :) Other requests:

-- Fewer treasures, more fish.

-- We need to fix whales (not your problem).

-- A little bit more distance between islands for more room for naval action.

Keep working on it man! It's a great direction so far! (y)
  • 0

#13 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,392 posts

Posted 14 August 2011 - 06:10 AM

-- We really need some dialog or something to tell us that the Map Script was "working." It took a while to generate the map and I thought Atlas had frozen or something.

Fixed (there was a typo).

-- We also really need a way to choose the number of players before generating the map in Atlas.

Maybe the number of players control can be copied to the map panel and stuck in the random map section, then it would be more clear.
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#14 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,788 posts

Posted 14 August 2011 - 05:48 PM

Maybe the number of players control can be copied to the map panel and stuck in the random map section, then it would be more clear.


Copied as in copy-and-paste or copy as in having duplicate functionality? :) I hope the former as having the same controls in two places would be confusing. Having the number of players setting in the map tab would make sense. Hopefully :)
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#15 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,965 posts

Posted 14 August 2011 - 09:11 PM

Copied as in copy-and-paste or copy as in having duplicate functionality? :) I hope the former as having the same controls in two places would be confusing. Having the number of players setting in the map tab would make sense. Hopefully :)

It wouldn't necessarily be a duplicate of functionality for the end-user though, even if the code is identical.
  • 0

#16 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,788 posts

Posted 14 August 2011 - 09:28 PM

Hmm, you may be onto something =) Just thought of the case where you may want to have say 4 "ordinary players", i.e. with starting civ centres etc, so you specify 4 players and then generate a random map as a starting point. Then you add one (or more) other players in the player settings tab and just give them a bunch of units, to have them act like raiders or fill any other role you want them to. So, ok, there's a use for it I guess :) (One could still do that from the map tab of course, but yeah, for the user it might seem like two different things.) And it's probably best to have all things that affect the random map generation on the map tab. Though, what about things like diplomacy? For maps where for example all team mates should end up on the same island etc that is important. Perhaps that's special enough for people to think about it even if it's not on the map tab though :unsure:
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#17 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,392 posts

Posted 14 August 2011 - 09:34 PM

Hmm, you may be onto something =) Just thought of the case where you may want to have say 4 "ordinary players", i.e. with starting civ centres etc, so you specify 4 players and then generate a random map as a starting point. Then you add one (or more) other players in the player settings tab and just give them a bunch of units, to have them act like raiders or fill any other role you want them to. So, ok, there's a use for it I guess :) (One could still do that from the map tab of course, but yeah, for the user it might seem like two different things.) And it's probably best to have all things that affect the random map generation on the map tab. Though, what about things like diplomacy? For maps where for example all team mates should end up on the same island etc that is important. Perhaps that's special enough for people to think about it even if it's not on the map tab though :unsure:

I'm thinking they should be totally separate, because for one thing it simplifies the design :P and also like you said, there may be cases where random maps might generate X number of players but you really want Y.
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#18 feneur

feneur

    Cartographer of imaginary worlds

  • 0 A.D. Project Leader
  • 7,788 posts

Posted 14 August 2011 - 09:40 PM

Ok, but what about things like diplomacy? Should that be separated out (another instance of it I mean, not moved from the player tab) as well? If there's some other variable that a random map script wants to use, what about it? Perhaps if a script does things differently for different civs or something. I'm just saying it could get crowded =)

Also, just FMI (=for my information :rolleyes: ) does the random map script override all things that can be set in a random map script? I'm thinking about things like environment settings etc. I'm guessing they do/should, just want to know for sure :) )
  • 0

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!


#19 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,392 posts

Posted 14 August 2011 - 09:45 PM

Well I don't mind the way it is now, because it's not very hard to click the players tab to change number of players :P
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#20 howlingflute

howlingflute

    Discens

  • Community Members
  • Pip
  • 59 posts

Posted 16 August 2011 - 04:37 AM

isClose.jpg
So I have made a number of changes to my island random map.
  • Underwater Blending (coral and deep water)
  • changed the terrain to look more like Cycladic Archipelago III
  • Mediterranean dirt and rock brush mixtures
  • added patches of dry grass
  • the center island is now broken up into smaller islands depending on the map size (1 at size tiny and up to 4 at the largest size)
  • fewer shipwrecks
  • more fish
I have attached the new file to this post. Enjoy.

Attached Thumbnails

  • isTex.jpg
  • isTwo.jpg

Attached Files


  • 0