UE4 Blueprints getting a random index of array

The “Random Integer” node in Unreal Engine 4’s Blueprints system behaves exactly like “rand() % Array.Num()” would in C++. Tthis makes it perfect for selecting a random entry of a blueprints array.

The wording in the Blueprint’s tool tip words this as “Returns a uniformly distributed random number between 0 and Max – 1” which I feel is not a clear explanation of what you would use this for. Indeed the node “Random Integer in Range” sounds like it would be more appropriate for getting a random entry of an array yet because the Range’s max is treated inclusive it is inappropriate for task.

TINY METAL is releasing December 21st 2017!

Three years ago I started work on the code which would become TINY METAL. Now we are so very close to release on December 21st of 2017. The time is ticking down quick but I am proud of our work. We’ve worked hard and sacrificed over the years and now we have a game which in our play testing players have enjoyed tremendously.

So I figure now is a good time to show off some screenshots.


B8G8R8A8 instead of DXT1 in Unreal Engine 4

During development of TINY METAL I ran into issues where large textures were only using R8G8R8A8, aka 4 bytes per pixel, instead of DXT1 or another compression format. I wanted these textures to use DXT1 or another compression format to save space so the full 32bits per pixel was un-usable.

In our case the solution was the pad the images outside UE4 to be multiples of 4 pixels. Note that using the in UE4 “Power Of Two Mode” padding offered in the texture settings did not allow the images to use DXT1. Instead I was forced to resize the images outside unreal before importing them.

Happy 2017!

If you are on my site based on my Microsoft posts then I should maybe mention that I now work in the Japanese games industry. Its a pretty cool industry.