Wednesday 20 July 2011

Develog: Mid July, 2011

Changes are highlighted.

  • Renderer:
    • Programming interface: updated
    • Documentation: ongoing
    • Perspective projection: done
    • Zoom ability: done
    • Update rotation algorithm: to-do
    • Lighting: ongoing, bug-free basic functionality due 23/7
    • Texturing: to-do, basic functionality due 31/7
  • Game Logic:
    • Main loop (formerly the exit function): done, for now
    • Mouse movement and key detection: done, for now
    • Key mapper: to-do
  • Network:
    • Everything: currently not on schedule
  • Modelling:
    • Simple Wavefront .obj loader: done, for now
    • Everything else: to-do
  • Physics:
    • Everything: currently not on schedule
  • Sound:
    • Everything: currently not on schedule
  • Optimisation:
    • Everything: currently not on schedule
  • Debug:
    • For all components: never ends

Details:

Perspective projection is just matrix multiplication. After setting up the matrix and importing the code that actually does the maths, it's basically done (no, I'm not going to reinvent the wheel here). All left is the tweaking. One of the outcome of tweaking the numbers that go in the matrix is that, you get different zoom effect; so the zoom functionality is a by-product. Nonetheless, this functionality is crucial for navigating in the vast space that I'm going to make.

Currently, the rotation algorithm is based on matrix. Yet, due to how floating point numbers work in computers, errors will accumulate, and rotations will eventually become something more than just rotations. Unwanted transformation and scaling is expected when the programme runs for a long time. Planing to move to quaternion-based algorithm.

Lighting works, if totally flawed:

Not particularly convincing. In fact, it looks awful. Both the per-vertex (directional) and per-fragment [or per-pixel, in Direct3D parlance] (point light) lighting are enabled. Apparently, neither of them function properly. I'm still investigating whether it is the surface normals or the algorithms, or both, that get wrong.

The previous Develog.

No comments:

Post a Comment