Saturday, December 30

A Games/3d oriented lisp

Thoughts about the desirable properties of a Lisp optimised for fast 3d games use.



  1. Generational and/or incremental garbage collection.

  2. Incremental means gc collection can be time-bounded; generational will be more effective in culling short lived, small objects, and give us cache wins. Allocation should be trivial as possible.


  3. Native vector, matrix and quaternion types that map to SIMD

  4. De riguer for fast 3d operations: an inline assembler build into the language, coupled with macro expansion would probably mean that these not be coded


  5. Hashtables

  6. Too useful for lots of things


  7. Property lists

  8. Ditto: perfect for game AI


  9. Simple function call syntax

  10. CL's function call syntax is relatively complicated and makes optimisation harder.


  11. Fast single dimensional arrays

  12. A neccesity.


  13. Unhygenic macros

  14. A big system can be build from a relatively small one via CL-style macro-expansion..


  15. Readtable

  16. Ideal for rolling gustom syntax. CL's readtable has too many characters reserved. We need to keep ours free


  17. Optional compile-time type declarations

  18. Enables an optimiser to do a better job, and keeps more unboxed values arond


  19. Integrated shader compiler

  20. Shaders are just too useful not to have: an embedded lisp style shader with macroexpansion facilities would help a great deal.


  21. Sockets

  22. Needed for multiplayer games, and editors that run alongside the game


  23. Good FFI - to bind to c/c++ libraries

  24. A lot of exisiting code is in C - eg OpenGL


  25. Fast, streamable file I/O library

  26. Streaming in new data as the game runs is very important for large worlds.


  27. Heaps

  28. We will need to allocate hunks of memory for talking to 'C' libraries and just because we can? Not sure about this one


  29. Datatypes /library specifically for geometry - flexible mesh loading/compilation

  30. We will need acres of geometry, as usual..


  31. Datatypes / library specifically for texture and image processing

  32. And acres of texture maps, etc applied to them


  33. Datatypes / library for spatial structures: quadrees, bsp trees, octtrees, r-trees

  34. Good Scene management requires these


  35. Aggressive optimization: register colouring, scheduling, peephole..etc

  36. Goes without saying



That will do for now..;-)

1 comment:

Anonymous said...

When will you be done?