Menu

#21 Helpers/friends enhancements

open
None
5
2002-08-06
2002-08-04
No

This patch introduces various changes having to do with
helpers.
Specifically, it:
o Allows helpers other than dogs to be spawned.
o Provides the option of having invincible helpers.
o Provides the option of having multiple helpers for
multiple player starts
of a given type.
o Adds cheat codes that allow the helpers to be
teleported a configurable
distance in front of the console player. This is
useful when the helpers
refuse to enter a narrow passageway.
o Fixed a bug where additional invisible defunct
helpers were spawned in
P_SpawnMapThing() each time a game was loaded.

There are various changes that I should consider,
including:
o Separate out the helper menu items in the "enemies"
menu into a separate
menu.
o Assuming it makes sense to do the separation change
all references to
"helper" to "friend" as a "friend" menu would be a
natural conjugate to
the "enemies" menu.
o Change or remove all references to "#if DOGS" as
helpers are no longer
limited to dogs. Also, I doubt many people use the
"--disable-dogs"
configure option.

I generated this patch against version 2.2.3, as
opposed to any CVS branch, as
I consider these changes to be tentative. Also, I'm
not sure if it makes sense
to add this to the 2.2 branch (prboom_stable_2_2). It
may make more sense to
later add port this change to the 2.3 branch once the
2.3 branch's menu issues
are resolved. Please send me any feedback you might have.

Discussion

  • Steven Elliott

    Steven Elliott - 2002-08-04

    Helpers/friends enhancements

     
  • Colin Phipps

    Colin Phipps - 2002-08-06

    Logged In: YES
    user_id=18428

    Yes I will look at including these in 2.3.0, it sounds like you've spent some time thinking these through.
    The cheat code to teleport helpers is a particularly good idea.

     
  • Colin Phipps

    Colin Phipps - 2002-08-06
    • assigned_to: nobody --> cph
     
  • Colin Phipps

    Colin Phipps - 2002-08-06

    Logged In: YES
    user_id=18428

    A few more comments;

    - bug in P_SpawnMapThing - doesn't look like a
    bug in prboom to me. Doom, for eccentric reasons
    known only to the original programmers, spawns all
    the monsters from the original map when loading a
    level, then deletes them all and recreates only
    those in the savegame in P_UnArchiveThinkers. I
    see where it causes a problem for your code
    though... best to clear the helpers[] array in
    P_UnArchiveThinkers if that's what you need (well,
    perhaps not the best design overall, but consistent
    with the current code).
    - In p_saveg.c, you've modified
    P_UnArchiveThinkers to fill the helpers[] array with
    friends it finds from the save game. This is not 100%
    correct, friends are a superset of helpers, e.g. if you
    have a helper archville it will resurrect friends for
    you, but they won't be the original helpers, and you
    wouldn't want them to displace the archie from your
    helpers list. I think to restore the original state we
    need to save and restore the actual helpers[] array.
    This one needs more thought though as the
    distinction is somewhat artificial.
    - The diff hunk from r_things.c looks like an
    unrelated thing, explain? There is also the
    P_IsDoomnumAllowed that is not directly part of the
    helper stuff that I'm inclined to put in immediately
    because it's obviously correct and neater.

    Move discussion to email if you prefer :-), either me
    personally or prboom-devel .

     
  • Colin Phipps

    Colin Phipps - 2002-08-09

    Logged In: YES
    user_id=18428

    Ok things which I think are settled:
    - the diff chunk for r_things.c and the P_IsDoomedNumAllowed I will include immediately
    - the idthx cheat makes good sense, let's use that one for now and leave out idth[abc] and possible
    FindSpotNextToPlayer refinements for later.
    - drop the multiple-helpers-for-multiple-player-starts thing.

    On that last point, I would recommend that instead we start using the extra coop start things (things 4001-
    IIRC) which are reserved but currently unused and disabled. This would allow more than 3 dogs without
    conflicting with voodoo dolls and would work straight off with levels designed for source ports which
    already have this feature. OTOH we start to have a long list of config options for helper_a,
    helper_v...helper_h...

    I think invulnerable helpers should be a cheat code, that makes it explicitly cheating and automatically
    protects it from use in demos.

    Demos... hmmm... that needs some thought. We can record and play demos with MBF dogs right now I'm fairly
    sure. We could disable the new fine control of helper types for demos, or we could record them somehow. I'll
    think about this one.

    > Is there any harm in my preventing the helpers
    > from being respawned on subsequent loads? As you point out,
    > doing so makes it easier for me to populate the helpers[]
    > array correctly.

    I see harm in adding another global variable having subtle side effects in P_LoadThings, yes. Just clear the
    helpers[] array at the start of P_UnArchiveThinkers, and then the helpers can be loaded from the save game,
    that should be fine and matches how the rest of the code works.

    The main question in my mind at the moment is whether to save helpers[] in save games, or whether to keep
    your helpers[] reconstruction code. Right now helpers[] is only to assist one cheat code, so it's not game
    critical and so we should be OK with your idea. If it were to be used for anything important, it would need
    to be saved so we could guarantee demo sync across saves & loads.

     
  • Colin Phipps

    Colin Phipps - 2002-08-09

    Logged In: YES
    user_id=18428

    > the diff chunk for r_things.c and the
    P_IsDoomedNumAllowed I will include immediately

    Done, to CVS HEAD.

     

Log in to post a comment.