Fran Bugs/To Do List
Last Modified October 23, 1997
The update rate of 3D examples with many differently colored objects decreases with time. In Tutorial, try displayG (spiral3D ()).
GeometryB untilB doesn't remove the old geometry when it adds the new. I don't know what's going wrong.
Text is not inverted when negatively scaled.
Top-level behavior definitions (CAFs) create very nasty space leaks unless one uses simpleSamplerB, which defeats useful memoization and is non-declarative. Moreover, for some examples, e.g., spiral3D, there would have to be a lot of simpleSamplerB annotations. Proposed solution: get the Hugs and GHC garbage collectors fixed to understand some kind of weak pointer notion, and so automatically clear out our caches when appropriate during GC's, as suggested in John Hughes's "Lazy Memo Functions" paper.
If a rendered string is too long, the DirectDraw CreateSurface call dies, taking the process with it. Clipping synthetic images before rendering should fix the problem. (I assume the same problem holds for very tall or wide synthetic images in general.)
I think there's a problem with using afterE on the result of syntheticImage. For instance, polygon takes a list of point behaviors as arguments, and those point behaviors don't get aged, because their hidden inside of a partial application.
I don't think the handling of time transformation is right yet in some situations.
Allow explicit background color selection for imported bitmaps and flipbooks. Currently always chooses upper-left pixel.
More GeometryB: texturing, embedded sounds.
Non-uniform scaling for 2D. Already supported by SpriteLib. Just needs factorization support in Transform2.hs.
Bounding boxes for culling of 2D and 3D display, allowing infinitely recursive ImageB and GeometryB. (But does lazy spritification make sense?)
For synthetic sprites, cropping should be done before rendering!
Suggestion from John Peterson:
Is there going to be a `User' style version of things like `lbp', `rbp' and so on. Many of the examples could really use some form of ==> which returns the User. As in lbp' :: User -> Event User This would make lots of the uNext sort of things go away. I'd be even happier just to change lbp to have this signature. The keypress signature could be keyPress :: User -> Event (Char, User)
- Handle sound sharing gracefully. Sometimes another application, say NetShow, will have grabbed the sound card before Fran could get it it, and Fran doesn't react gracefully. You'll often see the reverse problem: after you've done your first graphics, so that OpenSpriteLib has gotten called, you won't hear anything .wav from your sound card from other applications until you quit Hugs. This is a serious problem, but I think it mostly goes away with DirectX 5, assuming the competing program is using DirectX 5 as well. For robustness sake, I should at least make OpenSpriteLib return some kind of error value to be treated as an IO Error.
- Maybe eliminate afterE in favor of the following
residualB :: GBehavior bv => bv -> Behavior bv
e `afterE` bv = e `snapshot` residualB bv
- Can behaviors as Enum work properly? Right now, they only work for constant behavior arguments. The problem is that the result type must be a list, rather than a list-valued behavior.
- Maybe rename "-=>" to "==>-", and in general use a trailing "-" in operator names just as "_" in alphabetic names.
- Try to be systematic in the names of the set of functions derived from handleE. There should be a predictable pattern.
- filterE remaps event data and removes some occurrences. Replace by a simplified function: Event (Maybe a) -> Event a, to be used in conjunction with ==>.
- Find and fix the bug tickled by the general *$/untilB transformations in Behavior.hs. Probably related to afterE, but I don't know.
- Fix integral to use Runge Kutta 4.
- The userStartTime function is not quite right. It can be off by as much as an update period (roughly 0.1 second). Switch away from needing it.
- Make condB belong to GBehavior. For ImageB, we'll probably have to add a conditional sprite tree.
- Adjust operator precedences so we can chain all of the event modifiers: -=>, ==>, `afterE`, `snapshot`, etc. They need to all be left-associative and of the same precedence. See, e.g., whenSnap. The .|. operator should be of lower precedence.
- Fix memory management of DDraw surfaces. The Release done in SimpleSprite::SetSurface is probably wrong, since a surface can now be shared, thanks to dynamic constant folding.
- Other places marked with "###"
- Re-org the behavior/event modules a bit, renaming "Event.hs" to "EventPart1.hs" and "BehaviorEvent.hs" to "Event.hs", importing and re-exporting all of EventPart1. Then most modules can just import Event.hs.
- Setting of surfaces and of transforms happens too soon. Should happen at t', not t, but there's no interface for it.
- Push dynamic reactive constant folding all the way to display.
- Use malloc pointers for DirectX objects: surfaces, sound buffers, frame hierarchies.
- Put interval analysis back in.
- 2D and 3D picking.
- Use strictness annotations for Vector2, Point2, and Transform2 types.
- Make modules selective about exports. I got lazy.