the cutting room mirror

Dev Notes

This is a sub-page of King of the Hill/Hootenanny.

Found in bp_lib are notes, suggestions and other stuff from devs and to other devs (few even titled NOTES).

51_•••#

--SECT
--IONS

--NOTE:
--"sections" are designed to work abstractly and use information derived from
--standard naming conventions; they get complete control of all sprite channels
--(except for possibly a few very low-level system sprites, including the dev status box)
--
--for example:
-- * section id is identified by a frame label.
--   this also is used to derive the name of the parent object that gets control
-- * note that the frame label is INSET 1 frame into the sprite range;
--   this is to accommodate 'goSection' which goes to the named marker -1,
--   while the std section init frame script must be on the same frame as the marker label
--   in order to derived the name of the controlling parent object.
--   (if 'goSection' uses lingo to jump directly to the marker frame & the script, 
--   enterFrame can get called twice (once as a result of the lingo call, once as a
--   result of natural score advancement... thus, the preceding technique)
-- * for optimal performance, sections loops across a range of frames, rather than a single frame
--   (see note in the frame script handler)

407_NOTES#

NOTES - PACK THE COOLER

11/17

 - added (this.lcmgrQueue.count > 0) check to avoid "idx out of range"
   arising when new counter food is grabbed from peggy early,
   before she's finished setting it on the counter.
   

11/3

 - set OrgLoc = point(0,0), (unlinked from HQ OrgLoc)
   this fixes disappearing bkgd bug

 - outro set to #lipsync

 - fixed missing "fade to black" bug.  
   was foiled by char mgr mStopAction call.

 - made sure SFX channels stopped in mExit



10/30

 - integrated new peggy walk-in art/layout.  i couldn't get the anim to
   look good coming in from the doorway.  path to doorway is still too
   steep for animation.  so now she walks up two cycles from the mid-right.

 - set intro VOs to #lipsync

 - limited right-side "abort region" to only upper-half of screen
   during gameplay.  this to avoid accidental clicks in counter area.

 - add lose logic for dropping too many items in trash.  now peggy gives
   three VO "warnings".  on the fourth, cuts back to kitchen shot
   and delivers lose-game speech.

 - re: fade to black at endgame.  this was already in my version.
   don't know why it's not in the main build?  maybe i changed it
   at some point after my last delivery on 10/20?


10/12

 - swapped in new sounds:
    pc_sfx_flip, pc_sfx_placein, pc_sfx_pourl, pc_sfx_pours


10/3

 - added ability to leave early by clicking in far left/right edges
   of screen.  10 pixels from each edge, as in mosquito attack and
   sunscreen bill. 

 - added explicit mCleanUp, freeing all allocations on mExit.


9/17

 - fixed overlapping dialogue bugs.  now peggy only speaks sideline
   chatter when not saying something else already.


9/16

 - added dialogue and sfx

 - *** long ice pour sound too long for animation.  is this for 
   a special case?  or maybe just the last ice pour?



8/27
 - fixed visual bug in the logic that causes the foods to jiggle a bit
   further down the counter after a collision.

 - optimized the counter collision mgmt.


7/28
 - reduced the duration that "dropped" food is displayed inside trash can
   at half size.  this to reduce obviousness of grainy directore half-sizing


 - fixed "bug":  a graphic, "pc_trashLidopen", was not copied during the 7/27 
   integration.  this graphic contains the tilted lid of the trash can,
   and is displayed over the half-size food item when trash can is "open".
   this lid element is also in the "trashBkgd" gfx displayed under the
   half-size food item when trash can is "open".

   visual result:  half-size food appeared to be above trash lid.
   copied graphic from archive version and restored to correct position.


 - per talk with chi-an:  changed peggy's eye animation in intro.
   previously, she used all her eye targets randomly,
   including looking left, right, up.  now she only blinks.



7/24
 - cleaned gray out of cooler lining in "ice pour animation".
    turned out the gray was in previous versions as well, but was easy to clean.

 - added facial expressions to peggy dialog in intro and closing.
    per yuka's email, logic picks random eye/mouth art for duration
    of audio clip.
    for title-wide consistency, i'd like to touch base with someone else
    (chi-an?) about the specific parameters to use in these random segments.
    for now, i vary the mouth at 8 fps, and the eyes every 3-12 mouth frames.

 - added "percent full" method for grid (cooler packing) manager.
    this, in anticipation of the scoring system suggested by the script.
    the running percent full value is now dumped to the msg window every
    time a piece is dropped.  for ref, it's fairly easy to get above 80%
    so the 70% specified in the script sounds perfect.


7/23
 - i layed out the peggy "walkup" animation, and integrated it.
    the lay out file is included, so you can tweak this if you want.

 - food items that go off edge of counter are now shown half-size in trash.
    ditto for dragged food that is dropped without an appropriate spot in cooler.
    this is still awkward, but at least the user will now make the visual 
    connection between inappropriately dropped food and the trash.

    NOTE: currently using director dynamic scaling to create half-size image.
    the result is grainy and pixelated, particularly noticeable with can shapes.
    to improve img quality, we could prerender these half-sizes in debab.

 - food now slides in smoothly, in sync with, but not locked to peggy's arm.
    results in more attractive counter queue motion, but doesnt visually match arm.
    let me know what you think.

 - food can now "interlock" on counter.  that is tabs can fit into slots.
    rollover detection is grid sensitive, allowing correct mouse picking
    of overlapped objects. 

 - one can object can no longer be followed immediately by another can object.
    can objects can become neighbors if the user picks up a non-can object from
    between them.  but at least then, the user will have seen them as distinct
    shapes first.

 - single row objects (eg: horizontal bottles) now slide in center row.
    (vertical middle of counter queue)

 - fixed an obscure bug:  if a food obj was dropped in the cooler exactly on
    a grid cell wall, round-off error caused the dropped food to be displayed
    in the wrong cell.  (one cell lower)
    now gridMgmt logic passes back dropped location explicitly for robustness.



7/15
 - which palette to use?  "koh_unevnt.pal" or "pc_bg_intro Palette"
 - brian:  do i need to set palette explicitly, or is this done in the main engine?
 - new food objs can intersect while on counter.  i can add mask collision detection, but
   will wait until we talk before doing so.
 - gray in cooler lining of new ice pour art (was white, still is white in bkgd image) - 

417_NOTES#

NOTES - BBQ GRILL

11/11

 - fixed bug 875, exiting before dialog finished.
   was legacy outro timeout i had added when outro VO wasn't in DB
   (and thus not generating mActionDone to signal game exit)

 - fixed bug 885, characters congradulating even tho no food cooked.
   solved with following logic:
   request period now extended until 10 seconds after first item placed
   on grill.  thereafter, spectator chatter is suspended whenever
   there is no food on grill.

 - also modified win logic:  if nothing ever placed on grill, user loses.


11/3

 - now skips intro sequence (with spatula).  jumps directly to gameplay

 - set OrgLoc = point(0,0), (unlinked from HQ OrgLoc)
   this fixes disappearing bkgd bug

 - set HQ ambient loop to play continuously during game

 - fixed missing "fade to black" bug.  
   was foiled by char mgr mStopAction call.

 - made sure SFX channels stopped in mExit


10/30

 - replaced minh fingering-pointing anim with new artwork

 - fixed bug 745.  was due to lingering debug code that inited
   numBurnt counter to "4" when game begins.  ie: you always lose.

 - balanced #taunt VO among all 3 spectators.  previously was
   only minh, because cot & con #bgBad VO are all specifically
   about burning meat.

 - added logic to keep same character from speaking twice in a row.

 - gated introSFX (cow moo) and introVO so they play sequentially
   instead of in parallel.
 

10/19

 - spaced out VO commentary.  now 4-9 seconds between each.


10/12

 - swapped in new sounds:
    bq_sfx_flame, bq_sfx_plate


10/3

 - implemented smooth blending of food graphics between cook states.
   now cooking objects darken gradually, instead of snapping between
   their 5 states.

 - added sizzling, flameup sfx.  also added "cow moo" intro.

 - added ability to leave early by clicking in far left/right edges
   of screen.  10 pixels from each edge, as in mosquito attack and
   sunscreen bill. 

 - added explicit mCleanUp, freeing all allocations on mExit.


9/17

 - added dialogue

 - it might make sense to break the bgBad lines into two categories:
     bgBad, and bgBurn (for when the user burns one)
   this would allow me to play taunts that are not burnt specific
   at random to increase the tension of the game.


9/6

 - reduced packing grid cell size by half.  now cells are 28x28 pixels
   allowing denser and more flexible packing.

   extended the grid range to edge of grill, to reduce the amount of visual
   space that seemed wasted outside grid.  now some objects can now overlap
   the edge of the grill a bit, but i think this is realistic.

 - implemented grid-based mouse collision.  now the mouse collides with food
   objects only when it is over one of their solid cells.  this eliminates
   the picking problem associated with overlapping bounding boxes.

 - randomized the pattern of flame-up flames under meat.  was very regular
   before, one flame for each meat cell.  random feature makes the pattern
   different every time.  more visually interesting.

 - disabled food loader.  game now starts with 30 pieces of food.
   (roughly 1.5 grill's worth.)  no more food is added.

 - added game timer.  now game ends after two minutes.
   given that there is now a finite amount of food, we may need to add
   logic that detects for all pieces being on cooked plate and at least
   partially cooked.


8/2

 - all games (PC,BQ,FT,LM) now preload and unload their cast members.
   this is done wholesale (ie: all mbrs) when the scene is cued.
   i will tune mem mgmt post-alpha, preloading the intro first, and 
   the game elements on idle.

 - cleaned all unevt/event cast members:
    - converted some stray 32bit casts to 8-bit
    - assigned all to "koh_main" palette
    - changed unload priority of all <cast spacers> to "3-normal"

 - wrapped all BBQ grid debugging sprites in "if gDebug" conditionals.

 - added clean disposal of debugging sprites on mExit().



7/28

 - per george's rev1 comments:  raw food plate now starts with 15 pieces
   at scene open.  for the sake of test playing, after 10 seconds
   more pieces are added periodically as before.


 - per george's rev1 comments:  i set fixed food type balance.
   these values are not final, but closer to what george intends:

    -- [burger, hotdog, drum, leg1, leg2, steak, veggie]
     foodVols =  [10,10,8,5,5,1,5]


 - food objects dropped inappropriately (not on grill or plate)
   now snap back to the location from which they were picked up.
   (eliminates "sticky hand" problem from rev1)


 - now checks drag distance on mouseUp.  
   if drag more than 5 pixels total (dx+dy), then no flip can occur.
   was just based on time in rev1.  this is more robust.


 - active food objects are now hidden offscreen on activity suspend.
   (previously they appeared above graphics on suspend screen due to locZ.)


 - hot spots now flare up every 4-8 seconds (was 2-4).


 - i fixed the white border around min's animation.  was due to non-bkgd
   white pixels in graphics.


 - i renamed all code objects name from "BG" to "BQ".
   art is still prefixed with "bg" in case new art retains this prefix.


 - game still has no ending. 
   should we set a time or cooked food limit for the alpha?

 - chicken leg gfx still need to be replaced with 45 degree rotations.

 - i have not changed the grid cell size.  my thought is that this is
   not crucial for alpha, so i will work on the lawnmower race first,
   returning to fix this for alpha if i have time.



7/24

 - currently the balance of different food types is completely random.
   min of 5, max of 10 for each type.  could also be preset to a
   specific balance tailored to the KOTH demographic:

     -- burger, hotdog, drum, leg1, leg2, steak, veggie
     foodVols =  [20,20,15,10,10,7,10]


 - currently raw food is simply stacked on the raw plate over time.
   max of 15 raw items on plate at a time.  rollover rects block access
   to foods below, but any item visible to cursor can be picked up.

   we had talked about implementing a pick-up-sticks-esque layering system
   but i'll wait until we review this rev before doing anything complex.


 - once onscreen, food can be picked up and dropped in one of 3 locations.
   back on raw plate, on empty grill space, on "done" plate.  
   game will not allow user to drop (mouse up) food anywhere else.  
   on mouse up, food will remain attached to cursor.  moving over a valid
   drop space and clicking (or dragging again and releasing) will drop food.

   this is a bit awkward, but the best alternative i can think of is having
   the food rubberband (fly) back to its recent place of rest.  as in the
   fix-the-truck game.  also not very elegant.
   

 - we may need to use a smaller packing-grid cell size (with same size objects)
   current size (based on storyboard art) leaves a lot of space between 
   items, esp. hot dogs.  also creates awkward situations where there
   is visually enough space for an item, but not enough unused grid cells.

   7-26: i talked with yuka about this and will drop the cell size to 1/3
   it's former size.  to do so, i will need to implement grid-based mouse
   picking (because objects will be so close that rollover rects will overlap).
   i'll wait until this rev is reviewed.


 - cook time is fairly slow.  it is driven by a scaling factor, so it's 
   easy to increase.  each food types has an independent cook time and
   "cook thru" rate, both of which can be changed easily.
   "cook thru" is a param which controls how much cooking on one side 
   affects the other side.  (ie: foods also cook slowly on top while
   cooking on bottom.)


 - hot spots come very frequently (every 2 seconds).  this is just to make 
    them easier to test.  we can space them out more later.

 - when a hot spot flames up under a meat object:
    - flames appear under each of the meats cells (ie: multiple flames)
    - for variety, flames are randomly flipped in x,y
    - meat begins to char, one state per frame anim
    - if quick, user can grab meat and save it, charring stops on drag
    - if not, meat is fully charred and becomes stuck to grill


 - i made a quick sound effect for the flipping to help tune the 
   click vs drag event timing.
   this is just a placeholder until the real sfx are done.


 - i left in my grid-packing debugging sprites (the blue,red,and yellow tracers).
   i'll take them out when we've settled on a grid cell size.

 - kahn intro animation is a placeholder until i talk with chi-an about 
    the character dialogue engine.

 - the three spectators are currently silent.  i will implement their
    animations next.

 - there is currently no end to the game.  presumably when all meat is
   cooked.  we can discuss this and amounts of meat involved in the review.


.

418_NOTES#

BBQ
LAYER GRID


layered grid object design for plate grids:

 (*) foundation grid
   - used to check that objects are over plate.  never burned.

 (*) list of grid objects
   - represents stack of grid layers.  when burning if collision with current top layer, create new one.


when picking up objects, can only grab ones from topmost layer.
when top layer empty, is deleted, and next layer is exposed.


*** really should be able to see thru to lower layers ***
such that objects from lower layers can be picked up if not obstructed by an object in a higher layer.

427#

NOTES - FIX THE TRUCK

11/3

 - set OrgLoc = point(0,0), (unlinked from HQ OrgLoc)
   this fixes disappearing bkgd bug

 - set HQ ambient loop to play continuously during game

 - outro set to #lipsync (not asked for, but for future option.
   will default to #mouthflap if not cue info in DB)

 - fixed missing "fade to black" bug.  
   was foiled by char mgr mStopAction call.

 - made sure SFX channels stopped in mExit



10/30

 - set intro VOs to #lipsync

 - re: fade to black at endgame.  this was already in my version.
   don't know why it's not in the main build?  maybe i changed it
   at some point after my last delivery on 10/20?


10/19

 - fixed bug in which user could grab parts out of luanne's hand
   while she withdrew her arm.  now luanne "owns" the part from when
   the user makes the hand-off until she uses it or gives it back on rejection.

 - made intro SFX and Luanne's intro dialog play sequentially instead of
   simultaneously.



10/5

 - fixed out-of-order sfx in lftPartMbrs table.
 - added additional tool sfx

10/3

 - fixed "double wrong" bug, in which the "that's not it" VO was
   queued in the charObj twice.

 - added ability to leave early by clicking in far left/right edges
   of screen.  10 pixels from each edge, as in mosquito attack and
   sunscreen bill. 

 - added explicit mCleanUp, freeing all allocations on mExit.


9/17

 - added dialogue and sfx


7/28

 - now only need to hand luanne 8 parts (of 12 on blanket) to win


 - changed UI logic of part handoff to luanne.
   before, user needed to drag actual part gfx over luanne's hand.
   this was chosen because the user can "grab" a part anywhere within
   its rollover rectangle.  for the long, thin, diagonal parts, this
   could be empty space.

   now user drags mouse cursor over hand, and part jumps to be in
   center of luanne's hand.

   also increased size of drop region (around luanne's hand)
   to make it easier for less experienced mouse users



7/24

 - as placeholder for audio clips, luanne "dialog" is communicated through the
    message window.  her feedback is prefixed by "LUANNE:  "

 - "return to blanket" motion is currently linear.  could be made quadratic/cubic.
    this would take more processor time, but would make the animation snappier.
    ie: objs would have higher top speed, and decelerate sharper when close. 
    probably not worth the hit; already fairly computationally intensive scene.

 - gfx "ft_egg" seems to have a light-yellow shadow built in.  i'm guessing this
    was rendered for the formerly yellow blanket as specified in the storyboard.
    i can clean it up, but will wait to hear from creative.


 - because some of the parts are long, thin, and diagonal, it is possible
    to grab them in a corner of their bounding box that is simply empty.
    not an issue for mouse dragging, but would look awkward if luanne's hand
    wasn't actually touching them when she pulled them under the truck.

    as a first thought, i used the center of the part as the contact point that
    needs to be over luanne's hand.  this guarantees the part ends up physically
    touching her hand, but might confuse a user who continuously tries to simply
    drag the "hand cursor" over her hand.

    another option is to just have the part snap into the center of her hand on
    mouse release.  but i thought this would look too jerky.
    send me your thoughts.
    

 - i used only the truck hood as the sprite mask above luanne, leaving the tire
    in the background.  concept being that parts can't go under the tire.
    result is somewhat odd effect that large parts can pass between
    tire and fender.  not a big deal, but i thought i'd point it out.

430#

TECH QUESTIONS

 - matte vs bkgdTrans.  BT faster, but matte better if items will have white.  gfx designed not to have white?
 - Ancestor.isSuspended is always true on idle and mousedown/up.
 - crntCurs technique.  any potential snafus?


  >>>> OLD / ANSWERED <<<<

 - script compile seems very slow.  way to speed up?  (ie: removing some unnecc scripts?)
   ---- LIGHT BOLT now only compiles crnt script (dir7)

 - issues with director 7 string tables  -- NONE, since win95 only

 - can i poll "the mouseh", etc.. directly?  if so, need to keep w.r.t scene OrgLoc.
    ---- USE gCurRefMouseLoc - OrgLoc

 - gbpCurTime seems to only increment in 1 second intervals.  if there a ticks-accurate equiv for internal anim timing?  otherwise, anims update instantly on resume.
      ----- ASSUME NOT A PROBLEM FOR NOW.  maybe in lawnmower.  if so, add nextTime delta tracking logic in suspend/resume methods.
 
 - setCursor is done by polling child objs?
   --- YUP.  HIERARCH PRIORITY TREE.  polls every frame.

 - need to use sprSetProps
   --- NO.  just convenience func for batched changes

437#

NOTES - LAWNMOWER

11/11

 - now explicitly forcing HQambient replay when LR outro starts.

 - added more mStops in outro init to assure silencing of mower sound.


11/3

 - set OrgLoc = point(0,0), (unlinked from HQ OrgLoc)
   this fixes disappearing bkgd bug

 - set HQ ambient loop to play continuously during game

 - outro set to #lipsync

 - fixed missing "fade to black" bug.  
   was foiled by char mgr mStopAction call.

 - made sure SFX channels stopped in mExit
    NOT stopping SFX during mSuspend (lawnmower loop keeps playing
    while looking at watch, per 11/2 discussion with brian)


10/30

 - replaced "lr_hit.aif" sfx.

 - hank intros were already set to #lipsync.  please confirm this is
   working with new dialog cues.

 - added new click-thru logic to intros: 
   - clicking during intro VO cuts off VO and jumps to instruct.
   - letting VO play, jumps immediately to instruct on VO end.
   - outro was already jumping back to HQ immed after close VO ended.

 - changed tire gfx to solid black.


10/19

 - implemented new sequential intro sequence:
    hank VO --> instruct --> pick opponent --> pick mower --> game

 - now hank is alone in closing


10/12

 - added new sounds:
    lr_sfx_idle, lr_sfx_hay, lr_sfx_hit, lr_sfx_sprinklerm,
    lr_sfx_tree, lr_sfx_weedgrow

 - now plays crowd loop in background during game


10/3

 - added more SFX:  anthill, weeds, soccer ball pop, mulch empty

 - now mower slows down when mowing weeds.  slowdown factor is proportional
   to weed age.  max slowdown is half-speed for full-grown weeds.

 - now using #dlog snd channels for intro mower selection sfx.
   this solves both the volume balancing issue and the engine slowdown bug.

 - swapped in new intro1 and intro.instructions gfx

 - instructions now disappear from tree when returning to intro1 from
   intro.instructions.  ie: as if ripped off tree once read.

 - altered mower attributes to new settings:
    armakillo:   fast, but small mulch bag capacity
    weedinator:  mid-speed, mid-capacity
    momma proud: slowest, large capacity

 - implemented per-mode preloading of assets, breaking intro and game assets
   into separate preload groups.
 
 - added explicit mCleanUp, freeing all allocations on mExit.


9/18

 - added dialogue and sfx throughout

 - added sfx to the mower selection screen.  currently the sound
   volumes don't match btwn the start-up and idle sounds.  this because
   i'm using two different channels in unison, and i can't seem to
   set the volumes of the channels.  need to check in with brian about this.

 - LR_DIA_XX_GAL01_01.AIF missing?
   once in place, can we link this to kahn's #lrSoccer?  this would
   make it easy to call, since i could use the already configured
   kahn character.

 - currently i have the dialogue gated, such that only one line can
   play at once.  this is problematic with the soccer ball and peggy's
   garden, since the VO for these events won't happen if another VO
   is playing.

 - user wins when within 10% of the opponent's score. 
   ie: user=55, oppt=60, is still a "win" for the user.

 - soccer ball dialogue doesn't play when requested.
   not in DB?

 - it's pretty hard to win unless you have the faster mower.  (red weeder)
   i should probably balance the abilities a bit more.  



9/13

 - cleaned general mower object code, eliminating known navigation
   bugs.

 - added small incentive for AI to go for soccer ball when close.
   incentive could be made larger if desired.

 - previously, i had extended the time a sprinkler stayed up when a mower
   ran over it.  this way, the user could see why they had been blocked
   when they backed up.  i removed this time extension due to the possibility 
   of a mower becoming permanently stuck over a sprinkler by an ant hill 
   rising behind to block its reverse option.
   ie: now a sprinkler can disappear while a mower is over it, allowing the
   mower to continue on its way.  

   if this is not the desired functionality, i could add some code that
   built a list of cells that were at least 2 cells from the nearest
   anthill.


9/9

 - in intro mower selection screen:  made mowers finish a full piston
   cycle before stopping.  makes the anim a touch more realistic for
   brief (one-piston-cycle) rollovers.

 - improved AI destination seeking logic.
   now first checks for unCut grass in next cell left or right.
   if not, checks for distance and length of next unCut strip left or right
   if facing north/south, compares to distance to next vertical unCut
   if all fail (no nearby unCut), defaults to sector tree search
   (which searches entire lawn for densest regions of unCut remaining)

 - improved AI mulch pit decision.  now also considers distance to mulch pit
   if close to pit, will continue to mow some more until really full.
   
 - dropped lawn border (bkgd art) back to lowest sprite channel.
   had raised it above lawn to solve wall-obscuring issue; however this
   required bkgd transparent ink for the whole 1200x480 graphic.  
   instead, i copied the section of the wall at issue, and now just
   draw it over the lawn as a separate sprite.


9/3

 - revamped mower UI control logic.  on arrow key, mower now turns
   to face new direction, and immediately begins driving fwd,
   accelerating from zero to maximum speed.

   pressing key in opposite direction as current facing, engages
   reverse gear.  max reverse speed is half max fwd speed.

   this model offers the user less control over speed than previous, but
   is less sensitive to the problematic mouseDown/Up tracking.


 - implemented new, more robust turning control logic, eliminating
   the sporadic 0/360 bug in the first version.


 - unfortunately, my desire to share as much of the mower control code
   between the user and AI has led to some odd bugs.  most notable, both
   parties can now "teleport" a cell or two, typically when initiating
   a turn.  i know what's causing this, and plan to refactor the 
   mower driving logic to a robust, common functionality set.


 - added computer AI.

   this is a parameter-based AI.  meaning that its behavior is affected
   by a set of control values.  as such, i could set up trials in which
   clones with slightly different params face off in competition.
   collecting the winners, and cloning them with slightly shifted params
   (mutations), i could gradually evolve optimal param sets.

   this explanantion is just for reference.  i don't expect you want to dedicate
   the time/effort to such for this title.  for now, i'm just going to eye it,
   adjusting params based on my intuition while watching it mow.


 - implemented precanned obstacle configurations.  on start-up one of 3
   stock hay/ant patterns is chosen.  these are easy to change, and more can 
   be added if desired.

 - set the weeds on independent growth timers (instead of the previously
   synchronized ones).

 - set each weed sprites to a random blend between 70-100%.  net effect
   is slight variance in color among them.  makes them look less garish
   when they dominate a cut lawn.

 - added revving mower animations to mower-selection screen in intro.


8/2

 - added setup screens:
     - intro1   - pick opponent
     - intro2   - pick mower
     - instruct - read instructions.
   from intro1, clicking on "paper on tree" launches "instruct".
   from instruct, clicking anywhere returns to "intro1"
   from intro1, clicking on character launches "intro2"
   from intro2, clicking on mower starts game

 - opponent mower is selected at random from the two that the user
   does not pick.  (assuring user and opponent don't have same steed.)

 - per discussion with george, 8-2:
   allowed access to the two corner squares by the gardens that were
   marked as "non-play areas" in the storyboard.

 - player can no longer drive over opponent.  (opponent remains stationary)

 - cleaned edges of east roof to make it a perfect rectangle.
   (allowing the use of a much faster rendering technique, 
    thereby increasing the scrolling speed.)

 - removed vertical white pixels in right edge of "lm_cutflower_1" graphic.
    (image for mowed flowers.)

 - game now references all art in "bp_se_lr.cst".



8/1

 - added sprinklers.  one comes up every 12-16 seconds, and stays up for
   10-15 seconds.  (both times are random within range.)
   running over them stops fwd motion.  need to back up to get free.

 - NOTE: for debugging purposes, i increased the sprinkler rate to come
   every 2 seconds, and stay for 5.  i will change this back to the above
   values for the final alpha release.

 - currently there is only one sprinkler at a time, but the code is fully
   parallel, so it could animate several active sprinklers at once.

 - if user runs over sprinkler, sprinkler active time is extended so that
   it will remain up for 2-4 seconds after the user backs off.  this, so
   the user can still see the sprinkler after backing off.

 - sprinklers have no "up from ground" animation, so they pop on and off
   magically.  might be good to have a 1-2 frame animation of them coming
   up from ground.  (post-alpha, of course)


 - ant hills could be flipped both vertically and horizontally for variety.
   unfort, since grass could only be flipped horizontally, i didn't add 
   vertical flip tracking to the lawngrid mgr.  not much effort, if we 
   decide it's worth doing.

 - ant hills currently grow at 0.5 frames per sec.  could be faster or slower.


 - game starts with 3 weed patches, randomly distributed.
   mowing over one, clears it, but starts 2-3 new weed patches in
   the neighboring grid cells.

 - weeds can only take root in cut or uncut grass.
   ie: not over anthills or hay bales

 - weeds are in separate animation layer from sprinkler and soccer ball
   so they can be in the same cell.  ie: weeds under sprinkler/soccer ball.

 - currently no scoring (neg or pos) for weed mowing.  assuming this is
   just ambiant eye candy?

 - currently weeds and ant hills can be underneath the starting location of
   the mowers.  ie: triggered as soon as game begins.  is this an issue?


 - game currently has no ending.  assuming it should be when all grass cells
   are mowed?  trick there is that some grass cells could become inaccessible 
   due to haybales/tree/anthill "fences".

   i can implement "maze-walking" logic if necessary, but this might be slow
   and take some time to implement.  maybe there is a simpler solution?
   the best i have so far is running the race for 60 seconds, but i'd rather
   keep in the drama element of the players racing for the last few patches
   of uncut grass.

  <per discussion with yuka 8/1.  game is to time.>


 - because the anthills are dynamic obstacles, ie: rising randomly during
   gameplay, it is possible that the user could be corralled into a small
   section of cells by haybales/tree/anthill "fences".  this could even
   be a single cell.  issue is same as one above.  could be solved by
   "maze-walking" logic, but might be slow.

  <per discusion with yuka 8/1.  now obstacles are intentionally placed
    to assure mowers can reach every grass cell.  still random, but organized.)


 - if an anthill rises behind a player while the player is over a sprinkler,
   the user can become stuck on that square.  (need to back up to get off
   sprinkler, can't back up due to anthill.)
   one easy solution to this would be to have the sprinklers go down
   even when the mowers are over them.  (currently they remain up until 
   the mower backs off of them.)

    


7/30

 - basic gameplay is implemented:  navigation, mowing, mulch dumping,
   and obstacle collisions.  soocer ball is also in.  i didn't have time to
   integrate sprinklers, ants, and weeds robustly, but will do so by
   monday morning.

   wanted to give you something to play with ASAP.


 - there are still some bugs in the navigation (arrow key driving).
   - some cells dont get mowed if you are stopped by a wall in the cell beyond.
   - keyboard event bugs due to mouseUp/Down/keyHeld.

   i will fix these by monday.


 - steering is done with the arrow keys.  currently is "direct control"
   (ie: pac-man) style as discussed with yuka.  pressing an arrow attempts
   to drive in that direction, turning if necessary to face it.
   pressing the arrow in the opposite direction mower is currently facing,
   initiates reverse driving.  caveat: to turn 180 degrees, user must first
   turn 90, and then 90 again.  we could add <space bar> for 180 but this
   if tacky.

   alternative nav UI would be "relative control". ie:
    - up arrow is always "forward" in the direction facing
    - down arrow is always "reverse" in the direction facing
    - left and right arrows are always turn left/right.

   relative control is more common in video games, and easier to
   use once the brain is remapped.  issue is that non-video game
   players (our demographic?) may find this confusing.


 - opponent AI in not yet implemented.  my plan had been to add something
   quick for the alpha.  my thought in hindsight is that this is would be
   throwaway code.  and a waste of time if it's not key to have the interaction
   btwn the two mowers for alpha.
   let me know your thoughts.


 - scrolling is implemented, but looks like it will be too slow.
   chugs at 10fps on my G3.  i can optimize some more, but will
   wait for feedback.

 - re: scrolling optimization:
   the "west" roof is a perfect rectangle, allowing me to render
   it with fast, "direct copy" blitting (pixel rendering).
   the "east" roof has some roughness to it's edges.  i assume for visual effect.
   the roughness requires the use of "bkgd transparent" rendering which
   needs to check the value of each pixel as it renders. 
   if we can eliminate that roughness, i can use copy for it also,
   boosting the speed of the scene scrolling.

   if the roughness is visually key, then i can also optimize by breaking
   the east roof into 3 pieces, and rendering the bulk with "direct copy".


 - random objs (hay, soccer, sprinklers, etc...) can appear under the tree 
   where they are difficult to see.  is this a "feature"?
   or should we keep the area under the tree free of obstacles/toys?
    (aside from the tree trunk)


 - currently, user can "cut" flowers even if mulch bag is full.
   (and thus, can't cut grass).  is this right?


 - the two grass squares in the upper left and upper right corners of the
   lawn are marked as "non-play" areas on the storyboard.
   however, there is no reason programatically why they couldn't be mowable.


 - current mower specifications are:

     mower: arma
      1: acc - 0.2000       - acceleration (horsepower)
      2: AngVel - 4         - turning rate (degress/frame)
      3: maxGrs - 70        - mulch capacity (1 square = 1 unit)
      4: maxVel - 2.0000    - max speed (pixels/frame @ 20fps)

     mower: mmp
      1: acc - 0.4000
      2: AngVel - 5
      3: maxGrs - 50
      4: maxVel - 3.0000
 
     mower: wedr
      1: acc - 0.7500
      2: AngVel - 8
      3: maxGrs - 25
      4: maxVel - 6.0000

   fundamental analysis:  weedinator is light, fast, and agile, but can
   only carry half the load of MMP.  MMP balances speed/agility with 
   mulch capacity.  armakillo has the greatest capacity, but is slightly
   slower and more sluggish than MMP.

   these are just numbers, and easy to change.  let me know your thoughts.

438#

NOTES - LM AI

9/7

the lawnmower AI is a two-stage logic process:

 1. choose a target cell anywhere on the lawns.  decision-making factors include:
      - volume of uncut grass in target's vicinity
      - volume of uncut grass at target
      - distance from current position (including turning time to target)

 2. choose fastest path to target, avoiding obstacles, 
     collecting as much grass as possible along the way.


currently part 1 is a bit chunky.  i changed the logic structure to encourage the AI to mow as long as possible within a given horizontal row.  however, this preference needs to be balanced with the desire to jump to a denser row with more uncut cells, possibly even the next lawn.  as such, the balance is a bit off at this point, causing the AI to make some illogical choices here and there.  

i will revisit this, rebalancing the desires with some supporting control logic.

part 2 is beta-ready at this point.  the logic is fairly robust, and can deal with obstacle "fence", dead-ends.  it is sensitive to hay, ants, sprinklers, the opponent, and logical path dead-ends implied by walls.  because we control the layout of obstacles, i was able to trade complexity for speed, omitting code to handle some special case obstacle configurations.

the current code executes in an average of 2-3ms, or 6% of a frame interval at 20 fps.  (note that this is without the yellow path tracers on.  the tracers alone can take a full second to render.)

this leaves some room to enhance the AI "smartness", if the concensus deems it necessary.