C++11 rvalue references usage

Rvalue references are one of the biggest feature introduced to the c++11, but I found it rather difficult to understand and to find a usage for them. It was the issue which was very similar to the understanding c++ traits I had. Now, I’d like to write down all what I’ve learned, in order to remember it better and to share the way I understand it the best. This article is a very quick introduce to why we need rvalue references and why they are awesome!

C++ Traits explained

Traits in C++ is a concept of using templates in order to implement different behaviour for the same class/function depending on the types that are used inside of them.

Ok, so why am I writing about this again?

There are many readings about traits, but for some reason I had trouble with understanding them, probably because of lack of life examples. I finaly got it when I had to use them on my own. So I decided to tell about my work, so maybe it will help someone to understand what it is and what cool stuff can be done with it.

Simple protection against memory hacking – part 2

Last time I was writing about how cheating with leaderboards is possible in mobile games. There are applications that allow cheater to search memory for the interesting value and change it during the game runtime. This is obvious that those values can’t be stored in memory as themselves. How to encrypt them and in the same time make the whole mechanism easy to use?

Simple protection against memory hacking – part 1

While playing video games with leaderboards you might notice that sometimes there are players with enormous, impossible scores.


Impossible scores!

As you probably guess those ones weren’t scored by playing a game the fair way.
There are three (known to me) ways to do such a terrible thing:

Billboards with geometry shader

Billboards in video games are the 2D planes in 3D scene that are always pointed perpendicularly at the camera. They can be used to draw distance objects that doesn’t require much details, to draw particles or they can be used as a part of the editor interface. Normally the plane is rotated by transforming metrices so it face the camera, but there is another, easier way – by using the goods of geometry shader.

Billboard Heart

The 2D heart rendered in 3D scene.

Simple hex picker

Using hexes instead of square fields gives strategy games more depth and variety in creating interesting, tactical situations. But, because of its shape, it is slightly more challenging to implement them. This article will show how to nicely pick the proper hex tile using a mouse.

First of all, let’s look at the interesting properies of the hexagon.


GPU particles

Modern graphic cards are the source of the enormous computing power that can be used not only for rendering. How about updating over million of particles with a realtime changing enviroment or emitter position?

One milion particles running on GPU

One milion particles running on GPU

Light shafts

Light shafts, light scattering, god rays – many names but they represent the same awesome effect that can be noticed during foggy day or in a dusty room.
In games they make levels more moody and atmospheric, but how are they made?


The final effect might look like that.