Posts RSS Comments RSS Del.icio.us Digg Technorati Blinklist Furl reddit 71 Posts and Comments till now
This wordpress theme is downloaded from wordpress themes website.

Archive for May, 2018 (2018/05)

Body HUD, misc

Another good week of progress (part-time):
* VR: a little more progress
* Move system: refactor / fix / enhance
* Hero Body HUD

With hero Body HUD I ran into a good use for shared_ptr.  At first there was a bug when displaying a dead hero’s health.  When any figure dies (hero or monster), the corresponding HqSpaceOccupant is deleted, which deletes the pointer to the HqFigure (HqHero or HqMonster).  We still had another pointer to the HqHero for the HUD, but it was now pointing a deleted object, so the HUD displayed –35 (instead of 0) Body.  I fixed this by using using shared_ptr.  I suppose a messier way to do it would’ve been to have HqSpaceOccupant dtor conditionally skip deleting its figure when the figure is a hero (HqHero).  The video lets heroes die to show the bug fix.

The video also shows the latest Move system with mouse input and arrow key input.  For debugging, the hero rolls 255, which is why there’s so many red squares (otherwise the game only displays valid Move spaces).

The current turn order system (including the Body HUD) lets you (in code as there’s no UI for it yet) use any order for the heroes.  The HUD assumes four heroes, though I don’t think it would be much work to make it N heroes.

More VR Setup: a third camera

I did some additional basic steps to support VR.  Previously we had two cameras – the main spring-arm camera that follows an invisible pawn, and a fixed birds eye camera (for orthographic projection).  I added a third camera for VR.

With the third camera, we’re able to look around and see the motion controllers…  I think for VR, the camera control code will be separate from the main camera.  No auto camera moving.  Isn’t attached (via spring arm) to an invisible pawn, so panning etc will also be different.

Brass Tactics is one reference for how motion controller camera movement can work.  Hold down (a) grip button(s) to drag the camera/world.

image image image

https://docs.unrealengine.com/en-us/Platforms/Oculus/HowTo/SeatedCamera

https://docs.unrealengine.com/en-us/Platforms/VR/MotionController