Opened 6 years ago
Last modified 5 years ago
#4947 new defect
Converge rmgen1 and rmgen2
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Maps | Keywords: | |
Cc: | Patch: |
Description
Follow up to comment:3:ticket:4804.
rmgen2
should probably have the globals removed, especially g_TileClasses
and each map should specify the used tileclasses, even if there are some very common definitions IMO. This way the library functions don't have any state but their output solely depends on the passed arguments, making it easier to understand their results (for instance which properties of g_TileClasses
are unused by a map).
This means rmgen2
becomes a bit more similar to rmgen1
.
Equally rmgen2
functions, especiallyaddElements
could be used by rmgen1
maps.
After that rmgen2
, rmgen/gaia_entities.js
, rmgen/gaia_terrain.js
, rmgen/player.js
and rmgen/wall_builder.js
might form a new library (Layer 3 in the ticket comment), whereas the remaining rmgen
prototypes (Painters, Placers, Constraint, Map, ...) would become the Layer 2 of the rmgen stack.
This way mods can create random map scripts that reuse reuse the basic map creation tools without importing a dictionary of ancient history rts terms.
Change History (3)
comment:1 by , 6 years ago
comment:3 by , 5 years ago
Converging functionality and hopefully getting rid of some functions that do very similar things sounds great.
However, where's the defect?
Also organizing everything in layers makes everything less modular in the sense that you can import a set of libs because layers depend on each other. Maybe I misunderstand that "layer" thingy?
In 21206: