Category Archives: Work

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.

GSoC 2014 Friday Report #20

Todo list at start of Week

  • Implement the one remaining TODO
  • Debug “file too large” print bug
  • Explore dbus based on-demand starting
  • Create AppArmor profile
  • Create SELinux profile

Completed This Week

  • Implemented the one remaining TODO. Which was trailer support in chunk messages.
  • Fixed “file too large” print bug. Was caused by the libusb timeout.
  • Created AppArmor profile

Todo list at end of week

  • Address issues in system-config-printer which Tim found during review
  • Add a version number

Ya! IPPUSBXD is feature complete and debugged. After optimization the runtime cost has dwindled to 6M instructions for a complete load of the printer’s homepage.

After researching selinux I concluded the syntax is insane. The Apparmor profile syntax is clear and logical; it was easy to understand what Apparmor was restricting. Even large Apparmor profile like CUPSD’s were easy to read. SElinux just appears to be a bundle of abstraction and not something I want to deal with. The abstraction likely makes it easier to write SELinux profiles for experts but not something worthwhile for just one application.

Long term I would like to write a DBUS service for ippusbxd to reduce idle RAM usage.

This marks the end of full-time (or closer to part-time the past few weeks) on ippusbxd and the last time I’ll make a weekly update.

The tasks remaining are:

  1. Give ippusbxd a version number (Till asked for this)
  2. Address issues Tim found when reviewing the system-config-printer patches.

I’ll post a final blog post where I show off the GSoC shirt for this year once those tasks are done.

GSoC 2014 Friday Report #19

Todo list at start of Week

  • Implement the one remaining TODO
  • Fix duplicate queue generation
  • Fix re-start of unplugged then plugged ippusb printers
  • Debug “file too large” print bug
  • Explore dbus based on-demand starting
  • Create AppArmor profile
  • Create SELinux profile

Completed This Week

  • Fixed duplicate queue generation
  • Fixed re-starting of unplugged&plugged printers
  • Sent what should be the final patch against system-config-printer

Todo list at end of week

  • Implement the one remaining TODO
  • Debug “file too large” print bug
  • Explore dbus based on-demand starting
  • Create AppArmor profile
  • Create SELinux profile

The weekly todo lists have been transformed into a large “this is what needs to be done” todo list. Every week the completed tasks are removed and once we hit an empty list I’ll declare the project feature complete and debugged.

In non-ippusb news this week I helped out a friend implement the soon-to-be-standard C++14 memory pool resource class. I wrote the lock-less version.