
OBLIGE TO-DO
============


----------------------------------------------
  RECENT STUFF
----------------------------------------------

+  add in more scenery, computers etc

-  ability to truly add new textures
   -  use TX_START/TX_END in ZDoom ports
   -  use TEXTURES2 + PNAMES in other ports

-  sprouts from symmetrical rooms : often skip a side

-  Traps: decide an "action_kind" for the trapped object
          [ mainly "open" vs "lower" ] and pick the matching
          action in GAME.ACTIONS for the trigger lines
          [ also require it on trap prefab, via "key" probably ]

-  internal fences (esp. for outdoor rooms)

-  support a "Mix It Up" Strength setting

-  level_usage for: rules, prefabs, rooms themes.
   (maybe have "room_usage" and "zone_usage" for prefabs too)

-  monster spots from a prefab : can cause stuck monsters
   [ ideally shrink them if nearby wall(etc) overlaps ]

-  traps : distinguish "short-range" (same room) and "long-range"
           (another room) when deciding monsters to use

-  fix cages next to low ceilings
   e.g. floor height of 32 + blocking bars

-  a less ornate secret item closet, small items (e.g. 10 potions)

-  support decorative closets, e.g. fancy light thingy

-  one switch opens ALL the barred exits


-  sky generator : better checking of themes (esp. w/ control module)

-  the locked switch closet

-  support prob_skew, skip_prob for prefabs (like for rules)

-  review "svolume" and "innerpoint" usage
   e.g. I think "walk_svol" would be a more useful metric

-  wall prefabs in outdoor rooms facing a certain direction
   should use "shadow" light value as ambient


IDEA : allow TWO conns into a new room (become F1/F2 in CONN object)

IDEA : "Lighting" and "Detail" settings (in miscellaneous module)

IDEA : for music swapper, give each song a theme and try to match
       the song themes with the level it will be played on.

IDEA : a sharp corner removal pass [ before border stuff ]
       [ preserve symmetry, e.g. by preferring horizontal direction to merge ]

IDEA : separated in/out teleporters in very large rooms



-  a "Z" shape for joiners and stairs, which connects two areas
   diagonally.  Directions specified as per "L" shape, i.e.
   from_dir will be perpedicular to dest_dir.

   For example:

       ...bbb.
       ..aZZb.
       ..aZZb.
       ..aaa..


Reorganize Folders
------------------

TOP LEVEL:

   Oblige.exe
   (etc)

   doom/
        game.lua       [ was "base.lua", used to detect games ]
        entities.lua
        monsters.lua
        (etc)

        tech/
             theme.lua    [ used to detect themes ]
             cages/
             joiners/
             (etc)
 

Quake3 CSG
----------

+  brushlib function to visit side faces, and if they
   contain u1/u2/v1/v2 then compute the uv_mat

+  brushlib function to visit top/bottom faces, and generate
   a uv_mat if the sides contain tu/tv/bu/bv values

+  implement ambient lighting -- every face belongs to a "room"
   and ambient light(s) for the room is specified by Lua

+  better triangulation  [ review q3map2 code ]

+  optimise detail face intersection
   1. rebuild BSP tree
   2. reject faces lying completely inside a solid brush


Parks
-----

-  evaluate a hill division:
   - want a good "separation" of walk chunks between floors
   - also prefer no "cliffs" near conns, esp. entry conn

-  ability to make a floor (or TWO) into a liquid
   [ require no connections, except free-standing teleporters ]
   [[ ensure other floors are higher ]]

-  radiation suits when room has much damaging liquid

-  inhibit items in bits of floor cut-off by river
   [ create another FLOOR for them BUT not stored in info.floors list ]

-  review outdoor ROOM_THEMEs, remove/replace any "floors" which
   are actually natural-ish


Caves
-----

+  separate the cave room themes:
   -  any_Cave_WhiteRock   (wall is SP_ROCK1)
   -  any_Cave_Ashy        (wall is ASHWALL2)
   -  any_Cave_Muddy       (wall is ASHWALL4)
   -  any_Cave_BrownRock   (wall is BSTONE1 or STONE6)

   -  urban_Cave_GrayRock
   -  urban_Cave_Grassy
   -  hell_Cave_Snakes

+  ability to make prefabs in caves
   (a) replacement walls (e.g. cages)
   (b) middle of a step

-  handle solid islands, sometimes make pools, or become a step

-  caves with steps: have two floor materials, pick randomly

-  work on having different floor areas, maybe treat CAVE_AREA
   as an extension to AREA class, mode == "cave"
   [ the area used to grow the cave becomes the ENTRY cave area ]

   -  get connections to work with that (proper floor_h)
   -  make floor chunks get right floor_h
   -  make closets get right floor_h


Hallways
--------

+  make some deuce stairs

-  fix issue with T-shape stairs

+  support over-sized pieces (e.g. 3x1 and 3x3 for vent)
   [ will need all I/L/T/P shapes ]
   [[ good for traps! ]]

-  support delta_h in terminator prefabs

?  support pieces with windows
   [ the window side needs _OUTER tex and ability to make it flush ]

?  be real nice to have pieces which are wall on one
   side and open on the other (with sky ceiling OR like nearby ceiling)
   [ BUT: will need to expand vertically ]

   also: open on ALL sides  (mainly I and L pieces)

?  complex shapes: shape = { "mid", "-", "mid", "-" }

   keywords can be: "-"     (no connections)
                    "mid"   (middle of side)
                    "left"
                    "right"
                    "split" (one on left, one on right)
                    "window"
                    "open"

       function REMAP(pos)
          if pos == "left"  then return "right" end
          if pos == "right" then return "left" end
          return pos
       end

       function mirror_X_complex_shape(SH)
          SH[4], SH[6] = REMAP(SH[6]), REMAP(SH[4])
          SH[2], SH[8] = REMAP(SH[2]), REMAP(SH[8])
       end

       function mirror_Y_complex_shape(SH)
          SH[2], SH[8] = REMAP(SH[8]), REMAP(SH[2])
          SH[4], SH[6] = REMAP(SH[4]), REMAP(SH[6])
       end

       function transpose_complex_shape(SH)
          SH[2], SH[4] = REMAP(SH[4]), REMAP(SH[2])
          SH[8], SH[6] = REMAP(SH[6]), REMAP(SH[8])
       end



SHAPE GRAMMARS
--------------

IDEA: '9', '8', '7' matches anything but "1", "2", "3"

   Q/ does "anything" included empty space / other rooms?
   A/ yes it would

   ISSUE: must be handled in second pass, once '1' etc have been
          determined

IDEA: CYCLE pass (after SPROUT) for multiple paths
      [ probably as 'H' hallways, allow these to grow, prune them
        when they fail to connect ]

IDEA: rules can specify a "prefab_flavor" for any rects, and when
      finding a matching prefab require "flavor" field to match.


Auxiliaries
-----------

-  support count adjustments
      e.g. style_adjust = { "hallways", 0.4, 1.0, 4.0 }

-  min_count, max_count

-  support 'count_tab' with probabilities _OR_ a 'count_list' with a
   list of a values (one chosen at random)

IDEA: have a flag which means auxiliaries must match something in their parent
      [ implement by marking parent seeds ]
      [[ when an auxiliaries rule succeeds, it marks seeds the same as parent ]]

IDEA: k/m/n elements which do not represent anything, but allow
      rules to create something, then auxiliaries or future rules
      can transform that shape back into normal geometry
      [ and instead of "count", some rulesets may say "until X is gone" ]


Chunks
------

+  check each side of a chunk, see if it is "alive" or "dead"
   (i.e. dead = a solid wall or map border).

   the alive sides equate to a certain shape (U, I, L, T, P)
   and can match "floor" prefabs for that shape
   (or simply compute size for a "point" prefab)

   e.g. an "L" shape will allow a bunch of crates close to one corner

   e.g. a "P" shape requires a prefab with space all around it

IDEA: if have a KEY in a closet, then use a barred-key-closet
      and add a switch closet which opens it.

IDEA: a generic lowering bars prefab to go in front of closets or
      joiners or exit doors


Doors and Joiners
-----------------

-  a "raising stairs" JOINER, need to find the switch

-  support T-shape joiners (the new room on both sides)

-  support "deep" and "over" for L-shape joiners

-  for switched doors / joiners, use the "action" in the Lua
   definition as the skin.special for the SWITCH prefab

-  make wide door prefab with a switch in it

+  env field for doors and joiners are two values separated by a
   slash, e.g. "building/outdoor".  first value is front side,
   second value is back side.

   - if env field is a single keyword, equivalent to doubling it
     e.g. "cave" ---> "cave/cave"

   - support the word "any", e.g. "outdoor/any"
     [ so default value is "any/any" ]

   - support negation, e.g. "cave/!cave"

   - "indoor" is equivalent to "!outdoor"


Scenic Borders
--------------

-  Water : waterfalls in the far away cliff

-  Water : have some islands

-  Low hills / Mountains



Sinks
-----

+  decide them fairly early, e.g. Room_add_sinks() -- or in layout code
   
-  add "light" to ceilings with a light texture

-  detect the "whole seed" part early (easy: all corners are inner points)
   and [for floors only] give the seed a new floor_h/floor_mat, and honor
   that floor_h when adding importants or decorative prefabs.

-  probably should mark seeds (or whatever) so know where can place
   decorative prefabs.


Secrets
-------

-  support big (room) secret coming off a closet secret

-  a secret that provides little more than another way for the
   player to travel (esp. a shortcut back from a goal room)

-  a secret balcony can be good -- player will see item and
   wonder how to get it

IDEA:  looks like a normal item closet, but opens up

IDEA:  a monster closet with a secret behind it



+  fix lighting with 3D floors

???  apply nice items gotten in normal rooms to the HMODEL

-  proper handling of windows with 3D floors

-  proper handling of pictures with 3D floors



----------------------------------------------
  LEVEL STUFF
----------------------------------------------

+  a setting/module to create a super-megawad
   [ will require MAPINFO to define the extra levels ]

-  review Dante's ideas : doc/DANTE.txt


Prefab system:
-  "outside bbox" pieces via sector type #977

IDEA:  priority for spots  (skill flag)
         if EASY set OR nothing set --> priority = 1
         elseif MEDIUM --> priority = 2
         else              priority = 3

   ALWAYS prefer a higher priority over a lower one.



Outdoor room IDEA:
  -  begin with whole space as "natural", create "constructed"
     intrusions into that space.


Outdoor Idioms:
+  Porches: this is 3 or more seeds around a door from outside->inside
   with a non-sky ceiling and some pillars and a raised floor.

+  overhangs (building extensions with pillars, non-different floor)

+  at edge of map, have rocky/jagged shape
   (needed where caves border outdoor room too)

+  grassy area with water pool

+  large areas with water/blood, must be lowest area
   (especially good for Heretic maps)

+  bridge over a river of lava/nukage

+  tower in corner of map (monster cage, possibly enterable)

+  gazebo in centre with a nice item (or purpose)


Level Themes:
-  IDEA: a 'subs' table -- used to substitute a chosen texture with
   another (randomly picked) one.  Applies to PREFABS too.

-  if keys are left over, can use them for non-Zone locks



Hollow IDEA:
   a "hollow" is an open space under the floor of a normal AREA,
   turning that AREA into a 3D platform.
   
   The floor needs to match a touching AREA, perhaps the hollow
   chunks become part of that AREA.

   The walls can/should have different thickness to the
   above chunks -- could have own pictures/lights/etc.

   The ceiling should be kept simple -- assume top chunk
   provides the bare structure, can add a light prefab.

   Both chunks can support monsters and items [unless
   the hollow has LAVA/WATER for the floor]


Intrusions:
-  this idea is that part of a room is reserved for the player
   to travel through in an earlier or later quest.  If the
   quest is earlier, then the player is prevented from entering
   that room (due to blocking railings or being too low down).

   It's like a kind of window, except the intrusion is built
   as if it were part of the room you look into.  It may work
   best in Quake games where the intrusion is a 3D walkway.


Cycles:
+  get them working again [ esp. for CO-OP ]

+  cycles: fix the "excess" height problem

-  cycles: limit number of same-lock cycles e.g. 3 for heaps, 2 some, 1 few

-  allow joiners _iff_ the height diff is zero

+  less chance if R2 (skipped room) is large

-  create "teleporter cycles" i.e. if R1 -> R2 -> R3 and one
   connection is a teleporter, try add teleporter from R1 -> R3.

-  prevent using section next door to existing conn & same direction
   [maybe prevent same dir altogether except in "heaps"]


Mazes:
-  invert maze + thin_out + cave_render --> interesting walkway
                                            (e.g. over lava)


----------------------------------------------
  MONSTERS / ITEMS
----------------------------------------------

+  make the "boss" monsters able to become fodder/cage/trap
   monsters after a certain point

+  for "mini bosses", don't use them as fodder/cage/trap until
   their usage as a mini boss
   [ probably plan this better.... ]

-  usage of Arch-Viles as boss/guard monsters should have a limit

-  for "big" boss monster rooms, add a big health item / invuln
   [ insert into R.items ]

-  overlapping items in monster closets

-  Fight simulator: adjust monster 'damage' value based on Ambush
   usage, Cage usage, dark rooms, hitscanners/Archies in low cover
   rooms -- and lower values if killed by BFG or rocket launcher

-  Mons: sometimes look toward important item (esp. keys)

-  allow monsters in liquids [ but never place items there ]

IDEA : "Swarms" : a group of 3-N monsters (either a
   single monster or 2-3 of a certain class), and place
   all the monsters close to each other, perhaps even
   have swarm patterns.

IDEA : a setting for "difficulty spikes"
       (an idea by flyingdeath, more info in topic 496)

IDEA : an adjustment (of health) for "environment" of a battle
       (esp. indoor caves and dark outdoors, more likely to get hurt by mons)


Monster flag IDEAS:
-  sniper mode (mainly in a cage, or far from entrance yet visible?)

-  middle of large open space  (never ambushy)

-  deafness chance (rare, few, some, more, heaps)


Visibility:
+  instead of "visit all vis=1 to produce vis=2", limit the vis=1
   spots we visit by distance from entry coord

+  create 'entry_spots' for all rooms
   [ NOTE : depends on SPOT system above to be in place ]

   -  start closets
   -  start pedestals
   -  teleporters
   -  direct connections (one for each seed)
   -  joiner connections

+  debug Monster_visibility()
   -  use brushes to show vis=0, vis=1 and vis=2 spots

+  in START rooms, allow monsters in vis==2 spots
   [ or vis==1 when far enough from entry point ]


----------------------------------------------
  MISCELLANEOUS
----------------------------------------------

+  use no-draw ("draw_never") flag between two border areas

+  a setting (style?) for inescapable slime pits

+  when traversibility in a room is poor (exit near entrance),
   make the exit into a switched door and put a switch at other
   end of room.

+  One-way Routes (see doc/Various_Notes.txt)

-  a mode to use dynamic lights instead of sector lighting
   (for ports like EDGE and GZDoom).  Basically just convert
   the candle thing in prefabs to light-emitting entities.

-  outdoor wall extender: 64x64 block with torch on top

-  "mini stairs" : two areas have largish height diff (2-4 * step)
   and the "stair" is a short intrusion in the side of the lower
   chunk (say no more than 32 units deep, a prefab).

-  experiment with railings for Porches (instead of posts)

-  for indoors or dark outdoors porches : light fittings

-  3D stairs


IDEA: GAME.SCOPED_VARS table which is like styles but (a) fields can
      be used in prefabs (b) a _scope field can be "zone", "level",
      "room", "episode" -- value remains constant over that scope.

IDEA: "weak texturing" (especially on floors) which will try to
      use a texturing from adjoining floor (via a certain side).


-  double or triple switches: each one raises a 24 unit stair,
   but player can only traverse stairs when ALL are raised.
   Might work best if stairs are parallel to height diff.

-  ensure sky heights are higher than neighboring indoor rooms.

-  prefab with window above archway (for Quake etc)

-  smarter choosing health items, especially when health target is very high

-  rarity for bfg10k and railgun for Skulltag

+  ability to replace music using MUS/OGG/MP3 from a bunch of files
   placed in a certain folder (e.g. "music/").  Needs a Lua API to
   read a directory.

IDEA: STYLE to control # of lifts


+  "parallel stairs"  (they run parallel to line between two floors)

+  in Co-op mode, prefer stairs over lifts, and lifts would
   ideally have a switch nearby to lower (instead of WR lines)

-  exit via teleporter pad or holes in floor

-  raising bridges (activate by a switch)

-  cage monsters: don't put hitscan snipers up really high.

-  a module to randomly change DOOM monster / weapon stats via
   DEHACKED / DDF / DECORATE.


Warzone Mode:
-  player progresses from one side to the other of the map.
   it is fairly open and interconnected, and monsters form the
   main obstacles (instead of a key hunt).


Batch Mode:
+  detect invalid game=XXX (etc) keywords


Co-op IDEA:
-  "checkpoint" areas that players pass through, with loads of
   ammunition or health, enough to allow players to restock


Name generator:
-  create random weird-looking words for names of Bosses, planets
   or whatever.  Use them multiple times over an episode or game
   to make it seem like there is a actual story to the maps.

-  random output filenames (as an option)


----------------------------------------------
  POSSIBLE GAMES
----------------------------------------------

+  Heretic

?  Quake
   -  load textures directly from the PAK files
   -  bring back lua-based prefabs
   -  support slopes

   -  ensure textures offsets are handled properly
   -  incorporate id method to build collision hulls
   -  support bmodels with two brushes meeting at a plane

?  Hexen
?  HacX
?  Chex Quest 3
?  Strife

?  Duke Nukem 3D


----------------------------------------------
  PIPE DREAMS
----------------------------------------------

+  generate the Boss maps (don't use prebuilt)
   -  controlled via a module

   IDEA: create BOSS maps using the grower system
         -  start with a special kind of hub
            [ it could depend on the actual map, e.g. MAP07 vs MAP30 ]
         -  extend it with compatible rules
         -  maybe incorporate some gap-filled areas

+  generate random music (incorporate SoundHelix ?)

-  make Oblige easier to mod

-  Rooms that lock you in and you have to find the switch on
   the other side of the room to get out.  All "normal" exits
   would be closed off by a line trigger near the entry way.

-  Pop-up Traps
   you make a sector, lower it enough so monsters cannot see
   the player but are facing him when it springs. The trap walls have
   no lower texture and you set the trigger line to action 19 ( W1
   floor lower to highest floor) and you set the trap monsters deaf so
   they aren't awakened by player gunshots.

   When the player trips the linedef, the floors instantly pop up to
   the nearest floor height without the rising delay of some other
   linedef actions. Another thing is to make sure the line that
   triggers the trap can't be bypassed and thus the player can get
   stuck in the hole if he falls in.

-  Surprise Lifts:
   It is a hallway/room section that looks normal but when the player
   crosses the Lift-Lower-Wait-Rise linedef, it lowers to surprise the
   player with monsters on one or both sides of the lift.


----------------------------------------------
  GUI and C++ CODE
----------------------------------------------

IDEA : sliders for various settings, tooltip shows exactly how much.

+  info files for addons: addons/<name>.txt
   [ tricky since need to find it inside disabled PK3 files ]

   parse "author" and "description" strings
   (and ideally support [[ .. ]] strings as per Lua)

+  i18n issues (like non-ASCII characters in filenames)

-  use fl_utf8.h functions (fl_fopen, etc) for file handling
   [ BUT : glBSP, ajpoly, etc.... would need to use them too ]

+  CSG issue: support beam intersects with 3D floor => wrong side texture

-  fix "no such module" warnings (gui.add_module_option etc...)

IDEA: a better Set Seed dialog, show a few previously used seeds
      and allow choosing them again

Cancellation:
  -  can abort monster code (Fight sim) midstream 
  -  can abort CSG_BSP() midstream
  -  can abort DOOM / Duke processing midstream
  -  can abort Quake I / II BSP generation midstream
  -  can abort Q1_ClippingHull() midstream


----------------------------------------------
  DOCUMENTATION / WEB SITE
----------------------------------------------

+  FAQ : sharing wads
   https://en.wikipedia.org/wiki/Comparison_of_file_hosting_services

+  modding Monsters guide: mention boss stuff

+  tutorial for new prefabs

+  tutorial for new themes

-  tutorial for room shapes (grammar rules)

-  modding guide : code stuff:
   - Lua
   - OB_CONFIG, OB_GAMES, OB_MODULES, OB_THEMES
   - things, monsters, weapons, pickups
   - materials, themes

-  Glossary : describe "Area".

-  Glossary : define "Joiner" and/or "Junction" ??
            : define "Chunk" ??

-  transfer Lua_Extended.txt document to the website
   probably simplified (part of modding guide).


----------------------------------------------
  DOOM and DOOM II
----------------------------------------------

+  for Doom 1, monster/weapon levels should reset for each episode
   [ probably not back to 1.0 -- use a blend of game_along and ep_along ]

+  move stuff in data/ into games/doom/ (etc)

+  support MAPINFO lumps (especially for ZDoom ports).

-  support for the DECORATE lump

-  better starting scenarios (e.g. fix raising_starts)

-  certain cases in DM_AlignTextures don't work well, especially
   an upper where a crate straddles the periph (but does not directly
   overlap any linedefs).

-  support BOOM's 242 linetype for liquids and fake 3D floors

-  Legacy liquids are different (ceiling height is surface)
   (use legacy method for GZDoom and Skulltag)

-  support per-map Fog via sourceport features (MAPINFO etc)
-  support lightning in ZDoom etc (via MAPINFO)

-  log-print CSG stats (e.g. linedef count, plane count, etc)


-  IDEA: generate end-of-episode texts

+  Dead/gibbed player corpses sprinkled around on each level (Just
   like Doom episode 1) with the chance of a weapon near their
   remains (Shotgun 35%, chaingun 30%, Supershot 15%, rocket
   launcher 15% and plasmagun 5%?)? Of course the weapon placement
   by the body is at a chance (15-20% chance?)

-  ZDoom slopes:
   340 = 0,   Plane_Align (1, 0)  // Slope front floor
   341 = 0,   Plane_Align (0, 1)  // Slope front ceiling
   342 = 0,   Plane_Align (1, 1)  // Slope front floor and ceiling
   343 = 0,   Plane_Align (2, 0)  // Slope back floor
   344 = 0,   Plane_Align (0, 2)  // Slope back ceiling
   345 = 0,   Plane_Align (2, 2)  // Slope back floor and ceiling
   346 = 0,   Plane_Align (2, 1)  // Slope b.f. and f.c.
   347 = 0,   Plane_Align (1, 2)  // Slope f.f. and b.c.

EDGE: gui.property("solid_exfloor", 400)
      gui.property("liquid_exfloor", 406)
      gui.property("thing_exfloor_flags", "true")

LEGACY: gui.property("solid_exfloor", 281)
        gui.property("liquid_exfloor", 280)  -- 301


----------------------------------------------
  FINAL DOOM
----------------------------------------------

+  support some of the TNT and Plutonia textures

-  TNT Evilution textures that have been changed:
     BLODGR1..4  SLADRIP1..3  SW1GSTON    SW1SKULL

-  Plutonia textures that have been changed:
     DBRAIN1..4  FIREBLU1..2  SW1SKULL


----------------------------------------------
  HERETIC
----------------------------------------------

Sam's suggestions:
  for Heretic caves should be rare in E1, common in E2, and somewhat common
  in E3. I would, if going along with the “Egypt Sand” theme I made for
  ObHack’s E4 in Heretic, make caverns about as common as they are in E3.

  I would give E2 caverns pretty much the same theme as they have in ObHack;
  E3 should be pretty much like E1, but I would make the occasional cavern in
  E3 be very watery (water flowing down walls and the floor being full of
  pools), or be like some areas in the original E3M7.


----------------------------------------------
  HEXEN
----------------------------------------------

!!  get it working again

+  new 'damage' values for monsters

+  BOSS map : require the 2/3 hub keys to access boss room
               NOTE: could use them to restrict progress along chain

+  BOSS map : actually add the bosses (whatever else is needed)

+  fix weapons, which should be spawned for each class 
   -  put 'fighter only' bit on fighter's weapons, etc..

+  proper hub system
   -  need exit teleporter in final Hub

+  separate prefab for switched vs locked doors
   [why?]

-  support teleporters (flat X_012)

-  support more skies



 _____________________
|                     |
|KEY:                 |
|    !!  critical     |
|    +   important    |
|    -   normal       |
|    >>  in progress  |
|    ??  not sure     |
|_____________________|

