Opened 7 years ago

Last modified 2 years ago

#4695 new defect

Replace deprecated SimpleGroup and RandomGroup placement functions — at Version 4

Reported by: Imarok Owned by:
Priority: Should Have Milestone: Backlog
Component: Maps Keywords:
Cc: Patch:

Description (last modified by Imarok)

r19929 fixed SimpleGroup and RandomGroup placement functions, but therefore introduced some deprecated placement functions: createObjectGroupsDeprecated and createObjectGroupsByAreasDeprecated.

To fix that, the functions must be replaced with their non-deprecated variant: createObjectGroupsDeprecated->createObjectGroups createObjectGroupsByAreasDeprecated->createObjectGroupsByAreas

Then their arguments should be adapted, so that the map looks the same as before (or even better): amount and retryFactorneed to be adjusted(the 4th and 5th arguments). (Generate some maps in different size to see the effect of the changes...)

The following maps need this kind of fix(patches for only one map are also welcome):

  • binaries/data/mods/public/maps/random/african_plains.js
  • binaries/data/mods/public/maps/random/alpine_valley.js
  • binaries/data/mods/public/maps/random/amazon.js
  • binaries/data/mods/public/maps/random/anatolian_plateau.js
  • binaries/data/mods/public/maps/random/ardennes_forest.js
  • binaries/data/mods/public/maps/random/atlas_mountains.js
  • binaries/data/mods/public/maps/random/bahrain.js
  • binaries/data/mods/public/maps/random/botswanan_haven.js
  • binaries/data/mods/public/maps/random/cantabrian_highlands.js
  • binaries/data/mods/public/maps/random/canyon.js
  • binaries/data/mods/public/maps/random/corsica.js
  • binaries/data/mods/public/maps/random/cycladic_archipelago.js
  • binaries/data/mods/public/maps/random/danubius.js
  • binaries/data/mods/public/maps/random/extinct_volcano.js
  • binaries/data/mods/public/maps/random/flood.js
  • binaries/data/mods/public/maps/random/fortress.js
  • binaries/data/mods/public/maps/random/gear.js
  • binaries/data/mods/public/maps/random/hyrcanian_shores.js
  • binaries/data/mods/public/maps/random/india.js
  • binaries/data/mods/public/maps/random/island_stronghold.js
  • binaries/data/mods/public/maps/random/islands.js
  • binaries/data/mods/public/maps/random/kerala.js
  • binaries/data/mods/public/maps/random/latium.js
  • binaries/data/mods/public/maps/random/lorraine_plain.js
  • binaries/data/mods/public/maps/random/marmara.js
  • binaries/data/mods/public/maps/random/migration.js
  • binaries/data/mods/public/maps/random/neareastern_badlands.js
  • binaries/data/mods/public/maps/random/northern_lights.js
  • binaries/data/mods/public/maps/random/oasis.js
  • binaries/data/mods/public/maps/random/persian_highlands.js
  • binaries/data/mods/public/maps/random/phoenician_levant.js
  • binaries/data/mods/public/maps/random/polar_sea.js
  • binaries/data/mods/public/maps/random/pompeii.js
  • binaries/data/mods/public/maps/random/pyrenean_sierra.js
  • binaries/data/mods/public/maps/random/red_sea.js
  • binaries/data/mods/public/maps/random/rhine_marshlands.js
  • binaries/data/mods/public/maps/random/river_archipelago.js
  • binaries/data/mods/public/maps/random/rmgen/utilityfunctions.js
  • binaries/data/mods/public/maps/random/rmgen2/gaia.js
  • binaries/data/mods/public/maps/random/saharan_oases.js
  • binaries/data/mods/public/maps/random/sahel.js
  • binaries/data/mods/public/maps/random/sahel_watering_holes.js
  • binaries/data/mods/public/maps/random/schwarzwald.js
  • binaries/data/mods/public/maps/random/snowflake_searocks.js
  • binaries/data/mods/public/maps/random/survivalofthefittest.js
  • binaries/data/mods/public/maps/random/syria.js
  • binaries/data/mods/public/maps/random/the_nile.js
  • binaries/data/mods/public/maps/random/unknown.js
  • binaries/data/mods/public/maps/random/unknown_land.js
  • binaries/data/mods/public/maps/random/unknown_nomad.js
  • binaries/data/mods/public/maps/random/volcanic_lands.js

Change History (4)

comment:1 by Imarok, 7 years ago

In 19935:

Fix metal mines in latium

Reviewed by: FeXoR. Refs #4695.
Differential Revision: https://code.wildfiregames.com/D486

comment:2 by elexis, 6 years ago

This will also mean that the map generation time will be sped up tremendoulsy, since the previous workaround to do 20k blind attempts to place 10 entities costs some dozen of seconds. Danubius loading time got down from 45 seconds to 20 seconds in my first attempt.

comment:3 by elexis, 6 years ago

r21088:
Accelerate Danubius map generation performance, from 90 seconds to 15 seconds, refs #5011.

Use the non-deprecated createObjectGroups variants, so that one doesn't have to do 10 million placement attempts...
Mark the area (land, water, island) and only chose random locations from these areas using createObjectGroupsByAreas.
Don't ignore the map border for siege engine patrol points, because AvoidClassesConstraint is very slow for large radiuses.

comment:4 by Imarok, 6 years ago

Description: modified (diff)

You should update the list.

Note: See TracTickets for help on using tickets.