CAX Rough Notes

From EQUIS Lab Wiki

Jump to: navigation, search

Contents

ongoing work list

Todo List (roughly in order of precedence and ease of implementation):

  • actual c++ class for resource nodes: no bounding box detection
  • building properties further developed
  • detail textures on the terrain

Known Bugs:

  • in very rare situations, villagers can still get stuck on buildings (when the villager is in the middle of a set of tightly-packed buildings)
  • height queries don't always work perfectly on the terrain scene manager: villagers, robot and cabins can sometimes be seen floating above or sunk into the ground
  • the CAXInGameState::inGameProcessing() method is called by the InsertBuildingGameState main loop; it updates various parts of the game using data collected from the input manager. Unfortunately, it still collects gear up/down and camera pitch values in InsertBuilding mode, so that placing the building on the landscape changes the camera view and engaged gear.
  • in building insert mode the camera up vector is not explicitly specified so that the bird's eye view occasionally flips 180 degrees, making it difficult to insert buildings properly.
  • game state change from insert-building back to standard needs to be more stable: sometimes swing down sends the camera to the bottom of the world and does not permit the game state to change back to normal. at least put in a time-out check on this to make sure it doesn't hang the game any more.
  • sound starts up correctly but stops playing on the first rendered frame in the game. the source is not stopped by anything; it might perhaps be a conflict between OpenAL and SDL.

Finished:

  • chop-trees-at-forest-node code moved into action game state
  • sound module coded and tested
  • debug disappearing buildings in building-insert-mode
    • Unresolved: if a building has an associated skeleton file, it is not properly removed in the building-insert-mode. it behaves like a static pointer that is never deallocated (i.e., every building insert replaces the last building inserted, although bounding boxes continue to work properly). Workaround solution: no animated buildings.
    • Same problem fixed: a few of the cabin models (and perhaps some of the trees???) are not glued to the terrain properly and so are not rendered. Collision detection still works on these buildings though, leading to invisible obstacles in the game world. One of these can be found in the middle of the river near where the avatar starts.
  • debugged fatal invalid pointer access on program startup
  • switched gear-flashing code over to the triggers system
  • documented the triggers system in headers
  • discussed triggers system on the wiki
  • ability to add buildings to the game world: develop user interaction model
  • camera pitch code fixed (previously, it sometime moved the camera in front of the avatar)
  • collision detection: villagers vs. villagers. villagers vs. avatar (villagers can't walk through the avatar; the avatar can push villagers)
  • input manager keeps track of calories burned and distance travelled
  • game state HUD actually updated with info that makes sense
  • user ability to control villagers: develop user interaction model
  • UML updated to reflect current architecture; architecture wiki page edited and some more stuff written.
  • villagers actually remove trees
  • villager steering improvements
    • got villagers "unstuck" off of buildings by keeping track of what buildings they run into
  • asynchronous path finding manager debugged
    • debugging and improvements to the bitmap class
  • villager manager rule-based logic system implemented and tested
    • wood-chopping behaviour is loaded from an external XML file
    • python text-to-xml conversion script included in SVN repository
  • collision detection: avatar vs. buildings, villagers vs. buildings
  • resource manager class to plant trees and track resource nodes, instead of having that code in CAXGame
  • simple villager steering function implemented, including obstacle avoidance
  • terrain self-shadowed
  • project build dependencies copied into source tree and uploaded to subversion repository. stable win32 binary uploaded to subversion repository.
  • villagers present in game with basic animation (performed by AI unit)
  • moved a bunch of building-related code (terrain gluing and collision detection) out of caxgame and into caxbuildingmanager and have it make obstacle maps.
  • generic A* pathfinding implemented and plugged into villager manager.
  • byte-packed bitmap class
  • imported TWin Tunturi monitor into VC project and into SVN repository
  • HUD showing game state
  • minimum camera distance clamp in CAXGame to prevent clipping the avatar
  • avatar location updated on program start-up instead of requiring user input
  • buildings loaded by an Ogre-style building manager, not using a static factory method. Makes use of Ogre::ResourceGroupManager.
  • better terrain (larger with bigger mountains, more realistic base texture)
  • forests planted according to an alpha map generated from the terrain information. associated resource nodes locations are computed from the same alpha map using the k-means clustering algorithm
  • buildings glued to the ground better: now sampling multiple points. todo: the xml file can specify what height evaluation function is used on the terrain height samples (e.g., max, mean, min).
  • DLL dependency installers (for pthread, sdl, openal, dx9sdk) of the binary executible collected in svn repository for easier distribution.
  • media included in subversion repository.
  • ODE linkage investigated.
  • building metadata loaded from external XML file at runtime
  • building collision detection rewritten using building metadata
  • cleaned string manipulation routines out into java-style static helper class
  • camera pitch code changed to allow lower camera pitch values
  • namespacing finished; visual c++ project imported into svn repository
Will 11:25, 27 Jun 2005 (EDT)

week 13 june

  • try to find out about printing custom decals onto the landscape
  • get shadows working in the PLSM2 again
    • on the other hand, the PLSM listener manager interface I was having trouble with is suddenly working
  • terrain: can i get splatting to work?
  • look at terrain manager source, plsm2 source: see how hard it would be to subclass / modify
  • other models representing other game concepts:
    • villager (ninja)
    • resource (ogre head)
  • get the landscape in better colours; put some kind of a detail texture on it
  • shadows: fix them. life isn't worth living without shadows.
    • on all scene managers i've tried, stencil shadows look awful on Irina's cabin model. there's a screenshot below.
    • on all scene managers, stencil additive shadows kill my framerate to 0.5 or something and don't work either. they just turn a bunch of my textures blue.
    • on Ogre CVS, the standard terrain manager will give me texture shadows with a directional light source ... not with a spotlight.
    • the CVS version of PLSM2 just doesn't render shadows. no texture shadows at all, under any kind of lighting.
    • try a spotlight for the sun.
    • try a point light for the sun.
    • try a directional light for the sun.
    • try no far plane.
    • try a lower ambient colour.
    • try reordering the terrain manager initialisation.
  • implement the data model that we designed this week -- it's in the uml diagrams on the Game Architecture page
  • still need to completely rewrite the house collision detection ... Ogre Quaternion tutorial
  • change the camera model around so that we can pitch the view more.
  • try stencil and additive shadows again to see if this fixes our shadow problems made 'em worse: see below
  • put the normal terrain manager back in and see if this hurts or helps us. see if we can get a better terrain texture.
  • get OGRE animation working?
  • start work on the sound library spec
  • document ConceptListener and ConceptApplication
  • input manager fixes:
    • loosen the clamp on camera pitch down
    • tension ramp up on startup should be longer
    • brake decay up
    • brake onset down
    • gear difficulty step down
    • slope difficulty step up
    • visual feedback when changing gears: overlay flashes
    • tie speed to tension with gears and slope: other tension smoothing methods
  • tension smoothing
  • avatar idle animation is no longer working
  • avatar data specification. refactor avatar and camera code into an avatar class.
  • trees. can i get tree models importing?
Will 10:33, 13 Jun 2005 (EDT)

Terrain Manager Texture Shadows:

screenshot_tmshadows-sm.png

week 6 june

  • we did some experiments, and it seems that the terrain manager can handle very large height maps. we tested 5120x5120. with material scripts and some alpha maps we might be able to get a terrain that looks as good as or better than our current plsm2 terrain.
Will 12:40, 14 Jun 2005 (EDT)
  • document the Ogre and SDL dependency of the CAXInputManager; write a bit more in its class header. write about the CAXInputManager in the doxygen main page text (in the bicycle.h file). update the CAXInputManager UML diagram.
  • rename Joystick to CAXJoystick; update its UML diagram as well
  • stick the houses to the ground by polling the terrain manager; flag when the values are retrieved implement bounding boxes around the houses so the robot can't walk through. (pretty ugly kludge to get this to work though, see if there's a better way to do it) move them up very slightly so that the ground doesn't come through the floor.
  • put camera up/down on the turn stick. this is just one more axis of control in the input manager: cameraUpDown(). give it keyboard controls too.
  • put up some kind of overlay, just to show that overlays are working. then work on getting information displayed there.
  • bike tension smoothed with three-second lookahead to try to get rid of sharp tension changes. a full-scale bike tension smoothing algorithm would be most naturally implemented in the bicycle object. for starters, i could replace all calls in the input manager to setTension(currentSlope) with calls to setSmoothedTension(currentSlope, futureSlope) or similar, where futureSlope is the slope at some point in front of the avatar. tension on standstill should be zero.
  • python code to measure how long the lag really is, and whether it's constant or not (3000 ms for starting the bike, 6000 for stopping)
  • check documentation of constants for input.h, remove getBicycle access from CAXInputManager
  • robot walks faster in high gear; make high gear harder?
  • smooth braking in input manager
  • get animation working in our Ogre models
Will 23:00, 7 Jun 2005 (EDT)

week 16 may

  • actually try out fine-grain thread locking
  • go back to working on OGRE

Subversion tools for mac:

svnx, a fairly complete os x client frontend

scplugin, which aims to be a port of tortoiseSVN

Will 20:57, 18 May 2005 (EDT)

wiki notes

Note to self: move includes out of the header files and into the source files.

I've been reading about how to format wiki pages properly. Wikipedia's page on how to write wiki is here.

Wiki can do tables, among other things (the math looks pretty cool). Here's a link to Wikipedia's page on formatting tables.

This is a pretty cool tool to turn HTML tables into wiki tables, so I used it on the TProtocol page.

Will 21:22, 17 May 2005 (EDT)