Light Style© by Fisana

Jump to content


Photo

deep_forest_v0.1 Random Map Generator


  • Please log in to reply
41 replies to this topic

#21 Spahbod

Spahbod

    Triplicarius

  • WFG Programming Team
  • 585 posts

Posted 05 March 2012 - 09:30 AM

Your functions overlap with new rmgen functions. But the odd part is that there aren't any warnings/errors. Rename them to something like dfGetDistance and it will work. Only these three are the problem:

getDistance
getDirection
getAngle

I found notepad's replace function useful here.
  • 0
Omid Davoodi [ aka Spahbod ]

Wildfire Games Random Map Designer, Low-level Programmer
Contact me: myops37@yahoo.com


Support Wildfire Games!

#22 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 05 March 2012 - 08:41 PM

Your functions overlap with new rmgen functions. But the odd part is that there aren't any warnings/errors. Rename them to something like dfGetDistance and it will work. Only these three are the problem:

getDistance
getDirection
getAngle

I found notepad's replace function useful here.



Thx, I thought so, I'll rename them... 

BTW: I hope you mean @ least notepad++ :D





Edited by FeXoR, 05 March 2012 - 08:43 PM.

  • 0

#23 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 05 March 2012 - 09:03 PM

Here we go.

Nothing changed but the function names and removed some unused stuff. EDIT: Well, indeed I put it here.
Edit2: Oh, it seams I raised the tree density... sry, well, at least it's a 'deep' forest then...


Attached File  deep_forest_v0.5.zip   6.04KB   69 downloads

Edited by FeXoR, 05 March 2012 - 10:01 PM.

  • 0

#24 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 05 March 2012 - 10:03 PM

It works. Looks great. Perhaps try using trees other than the Baobab. I made the Baobab tree to have more branches and be higher poly because it's supposed to be used in a Savanna setting where trees are sparse. Try a pine tree version and a temperate tree version and see how the lag goes. I also recommend using terrain textures from the same biome together. They are generally made to fit together as a coherent set of terrain textures. Mixing terrains between different biomes can work, but it's tricky.
  • 0

#25 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 05 March 2012 - 11:01 PM

OK, I'll do all that.

May take some time though until the next version cause I'll do some rewrites.

Found some bad code design and since I got to know JS a bit better I want to change it.

Thy for the feedback though.

EDIT: I'll go temperate. I think it fit's best to a deep forest...


Edited by FeXoR, 05 March 2012 - 11:58 PM.

  • 0

#26 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 06 March 2012 - 12:25 AM

Hui, I didn't read that before but 'deep forest' looks very similar to 'Ardennes Forest' in the 'MAPS AND BIOME GUIDE'.

Should really have read that x)

Didn't play AoK.

Didn't meant to steel someones ideas or offense anybody by naming my map 'deep forest' and not ' Ardennes Forest' (which is already taken btw) or anything else.





Edited by FeXoR, 06 March 2012 - 12:33 AM.

  • 0

#27 Mythos_Ruler

Mythos_Ruler

    Senator

  • WFG Retired
  • 14,961 posts

Posted 06 March 2012 - 12:47 AM

No problem. There can be more than 1 type of forest map. :)
  • 0

#28 mmayfield45

mmayfield45

    Discens

  • Community Members
  • Pip
  • 17 posts

Posted 06 March 2012 - 09:33 AM

Hui, I didn't read that before but 'deep forest' looks very similar to 'Ardennes Forest' in the 'MAPS AND BIOME GUIDE'.

Should really have read that x)

Didn't play AoK.

Didn't meant to steel someones ideas or offense anybody by naming my map 'deep forest' and not ' Ardennes Forest' (which is already taken btw) or anything else.


I think your map matches the description of 'Ardennes Forest' in the guide much more than mine. :)

It is well done!
  • 0

#29 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 06 March 2012 - 11:43 AM

THX, I will get to work on it again tomorrow. EDIT: Monday :blush: Edit: Well, soon :lookaround:

Guess I will more or less finalize it then.

Edited by FeXoR, 14 March 2012 - 02:40 PM.

  • 0

#30 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 20 March 2012 - 02:44 PM

The map is not working any more due to changes in the rmgen libraries.

I'm working on it...


  • 0

#31 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 20 March 2012 - 10:47 PM

Here is a total rewrite.

Not finished but 1/4 of the lines of the previous version ;)

It may happen (though it only happened to me once) that a path runs out of the map and causes an error.

Attached File  deep_forest2012-3-20.zip   2.71KB   57 downloads

I'm still not happy with the terrain textures. Any suggestions welcome.

If you play with many players on a small map everything will be covered with paths. But 3 players on a tiny map is ok so it's not that bad.

On large or greater maps the woods is still thin to avoid out of memory errors.

Ideas and criticism welcome.

Edit: Start position and starting resource placement not randomized yet.
Deer, sheep and chicken to be added.

Edited by FeXoR, 21 March 2012 - 12:05 AM.

  • 0

#32 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 21 March 2012 - 12:44 PM

Here's a version with randomized stuff, some templates changed to temperate and lots of animals to hunt.

I don't like wolfs so I didn't add them yet. I will when they don't destroy buildings or an acoustic alarm with event position is added.

NOTE: This is for the SVN version and will not work properly in alpha 9!

Attached File  deep_forest2012-3-21.zip   3.02KB   58 downloads

Edited by FeXoR, 23 March 2012 - 09:03 AM.

  • 0

#33 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 23 March 2012 - 02:23 PM

Here's the next version.

Get the rmgen script 'library.js' from the SVN repository for Alpha 9 (actual version in the download).

Here the overview
deep_forest-2players-tiny.jpg deep_forest-3players-small.jpg deep_forest-4players-normal.jpg
or take a closer look
deep_wood-wood_border.jpg deep_wood-wood2.jpg deep_wood-wood1.jpg
deep_wood-center.jpg deep_wood-wood3.jpg deep_wood-wood4.jpg

And here's the download: Attached File  deep_forest2012-3-23.zip   6.66KB   55 downloads 
  • 0

#34 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 06 April 2012 - 07:02 AM

To keep compatible with the svn version Attached File  deep_forest2012-4-6.zip   3.35KB   58 downloads

EDIT: A new version was added to the svn, thx quantumstate!


Edited by FeXoR, 08 April 2012 - 01:13 PM.

  • 0

#35 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 04 July 2012 - 11:42 AM

Here's a new version fixing the out of memory errors on large+ maps with only a few players:
Attached File  deep_forest2012-7-4.zip   3.21KB   53 downloads

Here's a table of the entities per map depending on map size and the number of players:
size    width tiles  entities with:     average tree density
                     8 players 1 player 8 players 1 player
tiny    128   16384  430       1827     ~0,026    ~0,112
small   192   36864  1365      5519     ~0,037    ~0,150
medium  256   65536  4862      8604     ~0,074    ~0,131
normal  320   102400 7010      9029     ~0,068    ~0,088
large   384   147456 8295      9439     ~0,056    ~0,064
very l. 448   200704 9213      9777     ~0,046    ~0,049
giant   512   262144 9916      9866     ~0,038    ~0,038

Edited by FeXoR, 04 July 2012 - 05:22 PM.

  • 0

#36 MishFTW

MishFTW

    Primus Pilus

  • Web Development Team
  • 1,906 posts

Posted 28 July 2012 - 01:09 AM

Works smoothly with Alpha 10. And not as laggy anymore.
  • 0
Mish [Adarash Mishra]
Wildfire Games Webmaster
Email Me | About Me

#37 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,593 posts

Posted 02 November 2012 - 09:49 AM

Small "concern": the trees are not centered correctly, it would appear there is a strip around the bottom left "side" of the map where there are no trees
(the image comes from the AI terrain detection I'm working on, you can see the white strip in the bottom left)

terrain.png
  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#38 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 02 November 2012 - 12:04 PM

Small "concern": the trees are not centered correctly, it would appear there is a strip around the bottom left "side" of the map where there are no trees
(the image comes from the AI terrain detection I'm working on, you can see the white strip in the bottom left)

terrain.png

Nice! I think I know why: I leave a border free of trees to avoid trees are unreachable. I plant all trees in coordinates with integer x/y values. I check the distance to the border with (x*x + y*y)**(1/2). I noticed that a map has NOT getMapSize() tiles but getMapSize() + 1.

So all the trees would have to be placed (currentX - 0.5, currentY - 0.5).

I will check this...
  • 0

#39 FeXoR

FeXoR

    Centurio

  • Community Members
  • PipPipPipPipPip
  • 899 posts

Posted 04 November 2012 - 08:36 AM

The reason is that the trees are placed on the center of the tile (so tile coordinate + 0.5 in x and y direction).
Fixed the corresponding check and added a comment.
Now it should be alright.
Here are the files including the SVN .diff (only one line in the .js changed): http://fexor.dyndns....rest/2012-11-4/
And a screenshot that seams to indicate it works: http://fexor.dyndns....st2012-11-4.jpg
Posted Image

Edited by FeXoR, 04 November 2012 - 08:41 AM.

  • 0

#40 MishFTW

MishFTW

    Primus Pilus

  • Web Development Team
  • 1,906 posts

Posted 04 November 2012 - 02:43 PM

Did we ever get that system implemented that no longer placed resources at the map edge? because the AI still seem to crowd around a tree that doesn't exist (or can't be seen).
  • 0
Mish [Adarash Mishra]
Wildfire Games Webmaster
Email Me | About Me