Jump to content

new random island map generator


Recommended Posts

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.

Islands.zip

post-12995-0-79182300-1313156959_thumb.j

post-12995-0-50433800-1313157024_thumb.j

post-12995-0-14548600-1313157032_thumb.j

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

post-12995-0-94696900-1313207138_thumb.j

post-12995-0-28887100-1313207153_thumb.j

Link to comment
Share on other sites

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 tongue.gif. 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.
Link to comment
Share on other sites

post-12995-0-95480100-1313275899_thumb.j

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.

Islands.zip

Link to comment
Share on other sites

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.

post-12995-0-95480100-1313275899_thumb.j

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:

Link to comment
Share on other sites

-- 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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

-- 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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :) )

Link to comment
Share on other sites

post-12995-0-36398500-1313468964_thumb.j

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.

post-12995-0-52724500-1313468935_thumb.j

post-12995-0-42882400-1313468946_thumb.j

Islands.zip

Link to comment
Share on other sites

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 :) )

Not sure how you mean. When you generate a random map in Atlas, it should be the same as loading a new map, so environment settings and everything should be updated in Atlas. If not, it's a bug :)

Link to comment
Share on other sites

post-12995-0-36398500-1313468964_thumb.j

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.

I tried it, looks nice (y) But still with 8 players on a large map, there are waaaaay too many shipwrecks. It would be a very dangerous group of islands to have so many ;)

Link to comment
Share on other sites

Tried the updated script and it's looking great! Do you mind a few more suggestions/requests?

-- Try sprinkling in some Cretan Date Palms. They are my favorites. :wub:

-- Use Medit Forest Floor A for the forest floor texture instead of Medit Grass Wild. Medit Grass Wild will probably be replaced/updated at some point, but right now I think it looks funky.

-- Same goes for Medit Grass Shrubs. It's kinda not good, so maybe substitute it with Medit Shrubs.

-- See if you can concentrate Shipwrecks near the center islands, shipwreck debris floating between all of the islands in the open ocean, and fisheries near the starting islands.

-- See if you can't put some space between the side of the map and the shore of the starting islands. At least enough space for some ships to pass through.

-- If you want all of the starting islands on the map, regardless of number of players, perhaps leave out the city tile texture for these empty islands.

Link to comment
Share on other sites

  • 2 weeks later...

Tried the updated script and it's looking great! Do you mind a few more suggestions/requests?

-- Try sprinkling in some Cretan Date Palms. They are my favorites. :wub:

-- Use Medit Forest Floor A for the forest floor texture instead of Medit Grass Wild. Medit Grass Wild will probably be replaced/updated at some point, but right now I think it looks funky.

-- Same goes for Medit Grass Shrubs. It's kinda not good, so maybe substitute it with Medit Shrubs.

-- See if you can concentrate Shipwrecks near the center islands, shipwreck debris floating between all of the islands in the open ocean, and fisheries near the starting islands.

-- See if you can't put some space between the side of the map and the shore of the starting islands. At least enough space for some ships to pass through.

-- If you want all of the starting islands on the map, regardless of number of players, perhaps leave out the city tile texture for these empty islands.

Thanks for all the suggestions. I have made most of the changes that you suggested. I have attached the new script to the bottom of this post. The changes I made include:

  • a few Cretan Date Palms (you may need to look for them, kind of hidden)
  • changed forest floor terrain to Medit Forest Floor A
  • Changed the shrub patches to use Medit Shrubs
  • Changed the terrain on the top of the hills/ cliffs
  • reduced shipwrecks again (hopefully more of a reasonable number this time)
  • got rid of city tile texture on islands without starting players

I think getting rid of the city tile for islands without players was a really good idea. Now those Islands have more trees and look more natural. The other idea I had was putting ruins on those islands, but I think the natural island look and feel better for this type of map. I decided not to move the spoke islands closer to the center, because when I did the islands started to get too close to one another. The other option to make the back sides of the spoke islands accessible is to make the spoke islands smaller (which I also don't like). At any rate I think this map is starting to shape up very nicely.

Islands.zip

post-12995-0-24336100-1314193088_thumb.j

post-12995-0-64336500-1314193103_thumb.j

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...