Documentation Home

Test Apps

The following are small Apps created while developing SolastJS during feature implementation, testing or bug fixing. Each is only a simple example usually dealing with a specific topic but may contain code or ideas that are useful either for integration/regression testing, as a reference with regards to working with SolastJS, or perhaps as an example of a certain technique or implementation.

  • Render Math (previously 'Silly Pyramid, The')
    • Test of the math involved in rendering (for example, projection matrices) and the rendering pipeline.

    • A simple 4-sided Pyramid with basic diffuse lighting and simple transform-based animation which can be rotated and spun freely (within constraints). The projection matrix can be swapped between an orthographic or perspective projection, but should maintain consistency between both with regards to current translation, rotation, and scale (achieved by also manipulating the view matrix via 2D and 3D camera objects). Also includes mouse/touch input handling, basic UI rendering, and mouse-picking via 2D mask projection.

      • Hold Mouse Left or Touch on Pyramid to Grab the Pyramid
        • (When Grabbed) Move Cursor or Drag to Spin the Pyramid
        • (On Release) Pyramid should maintain current rotational velocity
      • Mouse Left or Touch UI button to Toggle between perspective and orthographic projections, or enable/disable debug
  • Dialogue (previously 'Deep Conversation, A')
    • Testing an implementation of a dialogue system built on top of the RenderString class.

    • A basic three-dimensional scene rendered using a VertexBatch and Axis-Aligned Billboards showcasing a custom dialogue engine that allows for a typewriter style text animation, special control characters to change text style (weight and colour) and to add custom animations, and which responds properly to a change in textbox width/height.

    • Also demonstrates a simple game script system, mouse picking via pixel colour (utilising Framebuffer and a custom Shader), a responsive layout for smaller canvas widths by unprojecting screen coordinates and checking plane collisions, and texture manipulation with ImageArrays.

      • Mouse Left or Touch “Super Batman” to initiate conversation
        • Mouse Left or Touch anywhere to advance text
      • Mouse Left or Touch UI button to toggle between fullscreen, enable/disable debug, or zoom camera in/out