TACStrike: weeks of June 29th - July 12th

Published on Monday, 13 July 2015 20:36
Written by snake5

The work done in these two weeks was so varied that it's hard to describe it in a few words. There's also nothing new in terms of character motion and effects so a video won't help much this time. So, let's just dive right into it.

But I do have one gif "video" of the item pickup feature:



HUD Map update & some basic UI for usable item highlighting


The map update consists of showing enemy positions and cones of vision.

As for the item UI - just drawing a circle, line, transparent rectangle and its outline. Or is it just that simple?

Turns out, it isn't so simple if antialiasing has to be used for UI even if 3D doesn't require it.


The way this is achieved is by first generating the polygon that needs to be rendered and adding an outline to it on rendering. There are some differences between line and polygon rendering, and there are limitations (up to 90 degree corners, can only render lines/polygons in one color, polygons must be convex). But it's exactly enough for most designs, and as the designer, I can keep the system's limitations in mind.


Usable items

First I attached the UI to items that can be picked up.


Then I created a new "actionable" entity. Couldn't think of a more appropriate noun at the time for the type name. Also, I forgot to put that into a separate screenshot so it'll just show up later on in this post.


Fixing the lighting, again.

Turns out the previous method was highly "combustible" (didn't work often) even after some redesigns so I finally redesigned it along more mathematically stable lines.


A mathematically (and universally) stable method generally requires no intersection computations of any kind. If a method is not analytical or returns a strict boolean value, it is not stable. Numbers tend to be imprecise with computers and thus these methods are, as well. Protip: any method suggested by crazy mathematicians such as Delaunay triangulation will most likely waste a lot of time while reaching some stability and very few actually stable implementations exist (if any).

Rant aside, my approach this time around was rather simple: BVH (AABB) to gather sample points, do inverse squared distance weighting to combine the light values. If anything goes wrong, sampling radius can be increased (and is always adjustable) and that'll be it. No more complications.

Also, I removed the need to place samples manually by generating them (as seen in the above picture). This should save me some time in the future in case I want to make visibility dependent on lighting.


Blood decals

When they finally get to be fixed, it should be a nice addition to the scene.


Two reasons for brokeness: 1) no lighting = why they're black, and 2) for some reason they are made off of character meshes as well (which not only looks wrong but is a performance issue as well). As soon as those get fixed, we get some cool blood on the walls from shootouts.


The Camera

Just another entity in the game.


This was the model I created in Blender. Nothing too exciting but then again, it'll be rather small from the player's point of view.

When it was time to make it alive, I took the character editor to make it happen.


The specifics of the entity required changes in editor (character selection) so that had to come as well. But since it looks just like mesh selection...


... it's not in the screenshot and what we see is just the preview of the entity.

After that I started implementing the entity in game.


At this point it's moving from side to side with configurable timeouts and has a flare to indicate its state of alertness. I also added the position and view cone in the map, but there's no more behavior implemented for it at this point. Oh and by the way - here's that "actionable" entity - the lamp with some UI connected to it.


Editor upgrade - apply surface texture fitting.

Just something I've been slightly needing for some time.


I can now apply fitting which allows me to avoid messing up texture coordinates while resizing the block.


Objective UI design

This screen shows all mission objectives and all available info about them.



I would like to say that gameplay is coming soon but it's hard to tell if/when I'll get there. There had been growing worries about the possible lack of variety of the available content, which was one of the reasons I started to work on the camera. But it does seem that it's close.

AI is finally getting some design time, which is very good. Soon I should figure out how to build it in a way to make everything work right.


Latest images