[Sigma Tau] Dev Log 03 - Movement

I got some video this time… see the bottom.

I have been working on physics.  As I stated in a separate post I am developing custom physics with Sigma Tau.  The logic and reasoning for why, is in that other post.

(Skip this paragraph if you do not care about the physics implementation.)  I have been developing the broadphase.  The broadphase has some distinct differences to the common patterns of other physics engines.  The algorithm I have developed uses a sort of souped up sweep & prune.  The broadphase is actually continuous (in the future, if it is faster, I might add a more coarse step first before the continuous test).  Before you freak out about it being continuous, it does not check intervals like standard continuous implementations, it uses circles and calculates the time of impact, with an equation.  It uses a brilliant little equation that calculates based on the movement vector, it is not a basic line overlap, it takes into account the movement.  I have yet to optimize the implementation or do actual speed tests on it, but it is actually a quite short function.  (It is called `collisionTime` here, if you are curious.) There are a number of implications of this test, which effect other parts of the engine.

I currently do not have a finephase collisions test, and the collision response is to just 0 the velocities.

Alright enough about physics...

After I got movement working, I got flying your own ship to work.  I updated the development rendering to show the collision circle around the ships, and another collision circle for what the ships position will be at the end of the next tick.

I gave the ship 3 thruster inputs, forward/back, rotate, and strafe.  I made graphical sliders that can be dragged, and also keyboard input.  The user interface is coded in a highly configurable way.  There are classes to create elements, which can be added to the HTML DOM and positioned like any other HTML page.

In the video I also spawn some other ships with debug controls. I mostly use keyboard input, but you can see the sliders reacting to my press. (note. I am failing at flying, I seem to be better at 3D Newtonian physics... Simpler input methods will come later...)


  • This is a just a small update, and overlapping, so I figured I would post it here.

    More video!

    There are two ways of looking at an entity: from the physical-world perspective and relative to another entity (typically your own ship). The former uses the `Entity` class, the latter uses EntityView which is just a struct of the entity and a "root" entity. I have been working on the interface, and proofing the code.

    I updated the view so that is uses the entity view (relative) positions, causing a radar lock (both position and rotation locked to the center and upward).

    Here you can see me playing with it:

    Sorry, no thruster animations, so it is hard to see what I am doing (note, the other entities never change velocity). I start of by strafing right to match velocity with the other ships, and then rotate around to say hi.

Sign In or Register to comment.