header_icons_cpp_unreal_engine

hardx blog

Bitmasks, bitwise operations, bit logic

Hey, I created new tutorial on YouTube presenting how to define and use Bitmasks in Unreal Engine 4. Showing how useful can be and how to mix them in order to define extra properties and relations 1 to N. Start using bit flags (masks) instead of many booleans which can be harder to setup if project is growing.

https://www.geeksforgeeks.org/bitwise-operators-in-c-cpp/

1000 free vector graphics, glyphs & icons

If you ever wondered if Unreal Engine is capable of showing Glyphs or any type of popular HTML vector graphics, answer is yes.
Because of lossless quality any size can be used without worries about resolution etc.
Simply there is no easier way of prototyping or even creating game with simplistic UI than just using Vector Graphics.
Even Epic Games havily rely on Glyphs usage. You may want to check EditorFontGlyphs.h  in the Engine.

class EDITORSTYLE_API FEditorFontGlyphs
{
public:

// http://fortawesome.github.io/Font-Awesome/icon/500px/
static FText _500Px;

// (contrast) http://fortawesome.github.io/Font-Awesome/icon/adjust/
static FText Adjust;

// http://fortawesome.github.io/Font-Awesome/icon/adn/
static FText Adn;

// (middle, text) http://fortawesome.github.io/Font-Awesome/icon/align-center/
static FText Align_Center;

...

In the following tutorial I am showing how you can simply use many types of popular glyphs in your game for free!

Cheatsheet which can be used in your game:
https://fontawesome.com/cheatsheet

If you want a simpler way of using vector graphics in your game instead of using unicode value or glyph itself, no worries.

I am preparing a big update for TemplatesUMG where new type of widget is just using Glyph icons which can be selected from the list of 1000 icons!!

Stay tuned!

Mission & Objectives in Marketplace

Hey! Finally after a very long approval process, plugin which provides simple and powerful tool for designing missions is in the Marketplace.
It extends to the limits UE4 Editor redefining all nodes and visuals for Graph and also providing new types of assets.

Marketplace link
https://www.unrealengine.com/marketplace/mission-objectives

Directional gravity

Free project and plugin download link on the bottom

In the following article you will find out how to override gravity from default Unreal Engine 4 Character. After this change it will be possible any time in the game define gravity vector so character uses it instead of original behavior.

Default Unreal Engine 4 gravity has no directional vector. Gravity points always towards ground FVector = (0,0,-1). Component responsible for updating character in World is CharacterMovementComponent which is attached to the Character. To change default class object Super call from constructor can be used:

AGravityCharacter::AGravityCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass(
ACharacter::CharacterMovementComponentName))
{
}

To custom your own directional gravity necessary is to override bunch of virtual UCharacterMovementComponent methods:

Public methods:

  • FVector CalcAnimRootMotionVelocity
  • void StartFalling
  • void PhysFalling
  • FVector GetFallingLateralAcceleration
  • FVector NewFallVelocity
  • void UpdateBasedMovement
  • bool DoJump
  • FVector GetImpartedMovementBaseVelocity
  • void JumpOff
  • void FindFloor
  • void UpdateBasedRotation
  • bool FloorSweepTest
  • bool IsValidLandingSpot
  • bool ShouldCheckForValidLandingSpot
  • bool ShouldComputePerchResult
  • bool ComputePerchResult
  • bool CanStepUp
  • bool StepUp
  • void SetMovementMode
  • void SetDefaultMovementMode
  • void AdjustFloorHeight
  • bool CheckLedgeDirection
  • FVector GetLedgeMove
  • void StartNewPhysics
  • void CalcVelocity
  • void ApplyAccumulatedForces
  • bool IsWalkable
  • void ComputeFloorDist
  • bool IsWithinEdgeTolerance

Protected methods:

  • void PhysFlying
  • float BoostAirControl
  • void OnMovementModeChanged
  • void PerformMovement
  • void HandleImpact
  • void ProcessLanded
  • void MaintainHorizontalGroundVelocity
  • float SlideAlongSurface
  • void SetPostLandedPhysics
  • void PhysWalking
  • FVector ComputeGroundMovementDelta
  • void MoveAlongFloor
  • void SimulateMovement
  • FVector ConstrainInputAcceleration
  • FVector ScaleInputAcceleration

As you can see there are quite few methods which needs to be implemented according to implement directional gravity which works well with newly custom gravity vector. I will do walk through all methods in the second part but for now I just explain how plugin works so you can download it and try on your own!

Starting point for analyse is StartNewPhysics() because our movement is physic based. It always needs to update it before performing movement. You can check that every frame it is updated with new PhysMode. Depends on circumstances character may walk, fly, swim, fall etc.

Available movement phys modes:

  • MOVE_Walking – PhysWalking
  • MOVE_NavWalking – PhysNavWalking
  • MOVE_Falling – PhysFalling
  • MOVE_Flying – PhysFlying
  • MOVE_Swimming – PhysSwimming
  • MOVE_Custom – PhysCustom

which are resolved by one on function with similar name. So for example starting new physics with mode MOVE_Walking is resolved by PhysWalking function.
It calculates new velocity and performs walking movement.

Simple blueprint methods:

To make life easier some setting methods were expose to blueprints like

  • GetGravityDirection()
  • SetGravityDirection()

which can be used to compute and update gravity direction for characters.

Free project and plugin:

In the free project below you can find different examples showing how gravity works and how affects not only our Pawn but also StaticGravityCharacter (Cows, boxes).

PlanetsExample
Planet gravity example
Planet gravity example

The map shows how planet gravity works.

SimpleGravityExample
Custom gravity example
Custom gravity example

The map shows simple gravity vector changes, rapid navigation changes.

Download:

Simple and practival even if it requires overriding several methods from CharacterMovementComponent.


Free Directional Gravity Project

Welcome UE4 devs!

Hello fellow Unreal Engine 4 programmers!
I have very good news for all of you! I am starting blog where I will share tips from programming & development process. If you don’t know who am I, you may want to start from this short introduction about me.
Still after few years I am strictly involved with Unreal community, writing plugins and extensions for Unreal Engine. I work in the industry and spend my free time on expanding my programming horizons.

If you don’t know where to start you can simply check my youtube channel, there are multiple tutorials and guides.
For example this tutorial about basic physics in UE4 and setting character to interact with world objects.

this i just one example of hundreds  videos about UE4 I have recorded in past four years.

Please enjoy exploring programming and games creation.
If you have any concerns about working prototypes or you want to ask something don’t hesitate and use Contact form.

About me

Hello everyone! Hello World!
I am Lukasz “Tefel” Czarnecki programmer from Poland with a Computer Science Master degree.

Programming

I started to work with Unreal Engine 4  when the first version came out (2014)!  Since then I created a lot of Blueprint prototypes while working in AAA studios for more than 5 years. Currently, I am Astro Colony solo developer!

[2018-2019] Splash Damage in London (United Kingdom)

Splash Damage

Halo MCC

I worked on a few AAA projects, but the most memorable was Halo MCC! I was extremely proud that I can help to bring this iconic title to PC!
Before I was working also with Unreal Engine 4 but in completely different place:

[2016-2018] Aesir Interactive in Munich (Germany)

Aesir Interactive Munich
I wonder if you can find me on this photo 😀

Starcraft 2

That’s sounds a little ridiculous, but I was a professional Starcraft 2 player and Team Dignitas member.
There were so many tournaments online and offline where I participated. If you want to find out more, you can just check liquipedia page.

I remember my first big Starcraft 2 event in New York city in 2012!

MLG Pro Circut
MLG Pro Circut
Gamers Assembly in Paris
Gamers Assembly in Paris
Intel Extreme Masters - Katowice
Intel Extreme Masters – Katowice

Because people know me as Tefel I am use this nickname even if I am game developer.

Creating games is my passion and I cannot imagine my life without it! (yes, I also like Blueprints!).
I hope you liked my short story! Now I let you check more programming stuff on this blog!

Cheers, good luck and have fun in your programming adventure!

Newsletter

smutty ass drilling with sextoy.redtube