Opened 9 years ago

Last modified 7 years ago

#3102 closed enhancement

[PATCH] Map modification: Survival of the Fittest — at Version 15

Reported by: NiAypa Owned by: NiAypa
Priority: Should Have Milestone: Alpha 22
Component: Maps Keywords: patch
Cc: Patch:

Description (last modified by bb)

Hello,

I have just modified the random map "Survival of the Fittest".

Here is a link to the forum post

What I changed:

  • Waves now have different unit types (and strength), more are added as waves are coming
  • The first wave spawns at 5 minutes now instead of 10
  • Treasure seeker women now respawn when killed
  • Disabled the corral
  • Treasures now spawn more frequently & more randomly, also more treasures are spawned
  • More info messages are now displayed

More detailed description for the new waves:

The waves can now contain of Infantry, Champions, Elephants, Healers, Siege Units, and Heroes. As more waves are coming, more unit types will be attacking, and their share changes. I guess this is quite unbalanced still, since I did not yet have the opportunity to test well, since this map is supposed to be played with 4 Players.

Im still working on it, but I think it can be tested now especially for balancing So I open this ticket to hope more people can test that way (Im quite confused but testing from SVN would be the point).

I highly appreciate any feedback :)

And I hope, of course, that it will be included in Alpha 19

Change History (19)

by NiAypa, 9 years ago

Survival of the Fittest modified map files. Unpack to 0ad/binaries/data/mods/public/maps/random

comment:1 by NiAypa, 9 years ago

Description: modified (diff)

comment:2 by NiAypa, 9 years ago

Owner: set to NiAypa

comment:3 by NiAypa, 9 years ago

I have attached an update with the following changes:

  • Number of treasures changed
  • Players who are defeated, and empty slots now cause less treasures to spawn (not yet working for the first two spawns)
  • Balanced the waves (Feedback pls)
  • Added a little more resources later in game
  • Fixed a bug in the treasure spawn, that made treasures be unequally spawned

by NiAypa, 9 years ago

Survival of the Fittest modified map files. Unpack to 0ad/binaries/data/mods/public/maps/random

comment:4 by leper, 9 years ago

Some code comments:

  • You should incorporate the changes from r16444. (I guess you were developing this against alpha 18, you should really develop it against SVN though (makes it easier to include, and less updating needs to be done in case something changes))
  • Leave the warning about AI players at the start of the map description.
  • Code style (also see the coding conventions)
    • The indentation for arrays is a bit much, just use something like
      var treasures = [
      	"gaia/special_treasure_food_barrel",
       	"gaia/special_treasure_food_bin",
       	"gaia/special_treasure_food_crate",
       	"gaia/special_treasure_food_jars"
      ];
      
    • In objects quote the value name
      {
      	 "foo": "bar"
      }
      
    • One space between if and ( (also for for).
    • For ifs and fors with just a single line of code in it omit the braces.
    • Adding methods to the prototype should have a ; after the closing } of the method (Also see r16444).
    • switch-case indentation.
  • startEnemyWave() and waveAttackers could likely be simplified by using an object to store the counts and a function to calculate those counts, then looping over those object keys and adding units that way.
  • In MarkUnassignedPlayers in the second if you could just assign a pre-made object. Instead of doing foo = {}; foo.bar = baz; foo.bla = 2; do something akin to foo = { "bar": baz, "bla": 2 };
  • I18n is completely broken. See Internationalization.
    • Do not concatenate strings that should be translated. Use sprintf, or in this case just markForTranslation() the string with the format specifier, and then pass the parameter along.
    • Remove TimeString and use time/date formatting for this.
  • Naming of functions and variables can be improved (eg TalkToPlayers would be a lot nicer as NotifyPlayers)
  • Use an consts instead of strings for the cases (and the parameters you call it with) in TalkToPlayers.

(Not an extensive review, but those should be fixed anyways.)

The ideas on how to improve it implemented in there are quite nice.

comment:5 by Itms, 9 years ago

Component: UI & SimulationMaps
Keywords: review added; Survival of the Fittest Trigger random removed

comment:6 by leper, 9 years ago

Keywords: review removed

See comment above.

comment:7 by leper, 9 years ago

Any updates?

comment:8 by elexis, 9 years ago

Milestone: Alpha 19Alpha 20

If you want I can make an a18 patch from those three javascript files, so that it might be easier to review and update the map to svn.

comment:9 by elexis, 8 years ago

Keywords: patch added

comment:10 by Itms, 8 years ago

Milestone: Alpha 20Backlog

comment:11 by elexis, 8 years ago

Refs r18209 and #2817

by bb, 8 years ago

Attachment: t3102_survival_letsvar.diff added

cleanup

comment:12 by bb, 8 years ago

Keywords: review added
Summary: Map modification: Survival of the Fittest[PATCH] Map modification: Survival of the Fittest

comment:13 by elexis, 8 years ago

In 18430:

Survival of the fittest cleanup. Based on patch by bb, refs #3102.

Show notificaiton to all players and observers.
Whitespace fixes.
let instead of var.

comment:14 by elexis, 8 years ago

Keywords: map review removed

by bb, 8 years ago

Attachment: t3102_survival.diff added

rebased still interesting parts of proposed changes

comment:15 by bb, 8 years ago

Description: modified (diff)
Keywords: review added
Milestone: BacklogAlpha 21

patch includes:

  • respawning woman,
  • more random treasures (place and time),
  • more info messages,
  • trickle resource after some time
Note: See TracTickets for help on using tickets.