coworotel Posted July 11, 2018 Report Share Posted July 11, 2018 This is my first attempt at making a map for 0 A.D. To start simple I tried to replicate a simple but classic mod map in Age of Empires II, Forest Nothing: Here is a screenshot: Files: forest_nothing.json forest_nothing.js This is a work in progress, there's still some problems with the map: Only works for Tiny, Small and Medium maps, more than that map generation crashes (out of memory); Even Tiny takes ages to generate the map, I guess there is some better way of saying "just put trees everywhere" which I don't know about; There is a little space on the edges of the map where people can walk, you were not supposed to be able to reach your enemies without cutting lots of wood; Beginning of game is extremely slow: the AI sends units to cut trees, but the massive number of them makes pathfinding extremely slow (I guess); AI does surprisingly well, but will need some tweaks. Since it doesn't "know" that it needs to make some space their choices are not optimal. They start to have space to build after more than 1 hour. Also, their units often get stuck among the trees; Market prices lower limit should be raised a bit, because this map is all about buying stuff. You only have wood; If players send many units to cut wood at once it lags the game a lot because they will all do a lot of pathfinding to find the nearest tree (since you cannot put 20 units cutting in the same tree). Still, the map is playable. It took me around 2 hours to reach the AI in the tiny map, haha. Will be fun with other human players. There's something cosy about being in a village completely surrounded by trees and protected from your enemies. 2 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 11, 2018 Report Share Posted July 11, 2018 (edited) 29 minutes ago, coworotel said: I guess there is some better way of saying "just put trees everywhere" which I don't know about I suppose you can paint your pForest on the whole map using a createArea call. createArea( new MapBoundsPlacer(), new TerrainPainter(pForest), avoidClasses(clPlayer, 0)); or you can just loop over the whole map and place a tree on each tile using placeEntityPassable(). Both these methods would probably be faster than using createForest()/createStragglerTrees() with insane parameters. Edited July 11, 2018 by Guest Quote Link to comment Share on other sites More sharing options...
coworotel Posted July 11, 2018 Author Report Share Posted July 11, 2018 I will try that! Quote Link to comment Share on other sites More sharing options...
coworotel Posted July 11, 2018 Author Report Share Posted July 11, 2018 Yeah, with createArea(...) it's considerably faster. Now can generate up to Normal size. Quote Link to comment Share on other sites More sharing options...
coworotel Posted July 14, 2018 Author Report Share Posted July 14, 2018 Just in case somebody want to test it, here it is as a mod zip. forest_nothing_map.zip Quote Link to comment Share on other sites More sharing options...
elexis Posted July 14, 2018 Report Share Posted July 14, 2018 The TerrainPainter choses a random array element each tile, so you can change the ratio of trees to free space by adding or removing items. The nomad call should be prior to the createArea call, so players dont end up in trees. (The grass and dirt patches calls are ineffective because the terrain call overwrites it.) 1 Quote Link to comment Share on other sites More sharing options...
Purgator_ Posted February 6, 2023 Report Share Posted February 6, 2023 Any update for latest release? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.