Rioki's Corner

Rioki's Corner

Programming and other nonsense.

Axis Double Tap (Unreal Engine 4)

gamedev ue4 ut2014

13 Apr 2014

As I am working on implementing Unreal Tournament 2004 style movement for my little UT2014 challenge, I found a tricky bit to implement: capturing double tap on axis inputs.

The template projects in the Unreal Engine 4 use axis inputs for movement. This is done so that you can use a gamepad’s analogue stick for movement. The tricky bit, in comparison to input actions, is that the axis fires each frame and you need to read out the value. The execution needs to trigger on the value rising over a threshold and not the execution tick.

How to hookup the Axis Double Tap selector.

This is about how you would integrate the AxisDoubleTap. Since we want to preserve “normal” movement the sequence splits out to the AddMovementInput on the one side and the AxisDoubleTap selector on the other. The value AxisThreshold (0.75) and DogeTimeout (0.4) are variables that are exposed on the Character, so that they can easily be tweaked later on.

As you can see, I have not yet implemented the doge, so for now we will just print “Doge Left” and “Doge Right”.

read more

A Critique of the Entity Component Model

gamedev engineering

27 Mar 2014

The entity component model is all the rave for the last decade. But if you look at the design it opens more issues than it solves.

Broadly speaking the entity component model can be summarized as the following: An entity is composed of components who each serve a unique purpose. The entity does not contain any logic of it’s own but is empowered bay said components.

Overviews are boring.

But what does the entity component model try to solve?

read more

Unreal Engine 4: C++ vs. Blueprints

gamedev ue4 ut2014

25 Mar 2014

For my UT2014 Challenge I had the first hard decision to make:

Should I use C++ or Blueprints to drive the game logic?

Disclaimer: In case you stumble over this and try to make a decision to either use C++ or Blueprints for your project, keep in mind that I only had a good hard look at the issue for a few hours.

Looking at the C++ code for the FPS sample, it becomes quite clear that you find all the bits that used to be in U-Script in UE2 and UE3. You have the Pawn, Character, Controller, GameMode and Game classes, just this time in C++. So if you know your way around the older version of the engine you are quickly at home here.

read more