How to simply replace text values with variables


With the following method you only have to write the code for replacement once and can change the text in the Editor without digging into the source code again!

  1. Add a new text object:
  2. Create and attach a new script to the text object, something like “ReplaceValueBehavior”:
  3. In the Start() method of ReplaceValueBehavior.cs, set this code (and include UnityEngine.UI for Text):
     var myValue = "world";
     var txtObject = GetComponent<Text> ();
     txtObject.text = string.Format (txtObject.text, myValue);

    Like this:

  4. Now set the text value of the text object to your output string and include a placeholder {0} for your variable:
  5. When the scene starts, the placeholder will be replaced by your value:

Done! 🙂



How to build a very simple health bar in Unity

  1. Add a new UI > Image  to your project
  2. Pick an existing sprite for the new imagepick-sprite
  3. Set Image Type = Filled and Fill Method Horizontal
  4. Moving the Fill Amount slider gives a preview on how the progress bar will work
  5. Now all we have to do is to set the Fill Amount value in code to whatever we like
    GetComponent<Image>().fillAmount = myHealthValue;

Done! 🙂

Free Programs To Use For Game Development

Hi folks,

there is a plethora of free programs you can use for your mobile app game development, and this list is far from complete (it’s not even a list really, only two programs). Access to game tools in general and free ones in particular has never been greater. It seems weird that we only use two such tools, when there is so many to choose from.

But that – I guess – comes with the fact that our first game DIGGER is designed to be simplistic and minimalistic…


Unity is a tool specifically designed for game development – and oh boy it is good! It takes a bit to get into it but once the switch flips you’re in. 🙂 As yBYTE (our coder) has a lot of experience in C# programming the development part is fairly easy for him.

This tool comes with a passionate and very helpful community. Don’t forget to follow them on Twitter or Facebook to keep up with all the upgrades. We also use Unity for the animation of our characters.

Animation controller screenshot for DIGGER.
Animation controller screenshot for DIGGER.


For our first game DIGGER we use Inkscape to design and create vector graphics. (Oh the secret is out, DIGGER is 2D!). We just started using Inkscape, and if you never have used similar programs before it can be a bit intimidating. But there are so many free tutorials out there and with a bit of practice everyone gets into it.

Screen Shot 2015-07-19 at 9.45.30 am
(These are some prototypes for our game DIGGER – a bone, an earth tile, a ruby, a cloud and a… a… one of those boom boom hammer thingys)


Other programs we might use for future games include Qubicle (a program to design 3D elements) and Harmony (software for drawing and animating characters). Those programs are not for free, and that’s why we decided against it for now. DIGGER is a leisure time project and not designed to make a lot of money. If it does however, we might buy these goodies in the future.

Have a great day everyone!


From programmer to game developer

Hi folks!

The second half of 42BYTES on the keyboard here – yBYTE. This is my very first blog post (ever!) and I want to tell you guys a bit about myself – let’s see if someone will read this at all. 🙂

Schneider cpc464I am 34 (sounds pretty old) and have been interested in computers all my life. Wrote my first computer game when I was 12 (on a Schneider system if anyone knows what that is) in Basic if I remember that correctly. To edit a single line I had to type “EDIT: 10” and then work on that line and save it. Took me weeks to write a 10kb program… (it was a fishing game where one could select a spot at a lake and some bait and then wait… let’s say it wasn’t really that exiting.)

I chose and proceeded in a career in IT, focused nearly exclusively on  web based technology. Learned HTML, CSS, PHP, JavaScript and C#. Especially C# is the most stable language to write enterprise applications (IMHO).

Every now and then I started building a game but never really pushed through and published it. Which is a bit sad as I think (as we all do) that I have great ideas – and could never give you all the opportunity to play  one of the incredible games I could make :D.

Now I teamed up with xBYTE and founded 42BYTES with her to change exactly that. She will be responsible for Marketing and Graphic Design while I am the Hacker and Game Designer – but she’ll tell you more about her part another day. The most important goal for us is to actually publish games – not just doodling around. So stay tuned for updates and follow us on our social media profiles.

At the moment we are busy setting up everything and getting used to all the tools we use, Unity and Inkscape for example, setting up Facebook, Twitter, Email Accounts, etc. etc. We are also working hard on the prototype for our first game which we will show you as soon as we can.

Thanks for reading and keep building awesome games folks!


Anybody out there?

We can’t believe it, our very own blog! Shall we jump up and down excitedly or play it cool? Whichever one – it will be authentic, and it will be US!

Because that’s what our work is all about: We are a start-up young team from Perth, Australia, working on 42BYTES in our free time. Out goal is to bring you awesome new FREE mini games for your mobiles.

We aren’t after the big bucks (although we won’t deny it – earning some money on the side sounds nice), but we want to give you flawless, REAL games, simple but well-developed. We also decided to start sharing our journey now, from the very start; And not when we already have our logos, design etc. “Life is a journey, not a destination.” (Ralph Waldo Emerson)

We will release some information around our very first game SOON, including some goodies and bonuses for our first followers.

Let’s hope this idea stays alive out there – it certainly has been in our heads for a while… Follow us and our journey on Twitter and Facebook to stay in touch!

Cya soon, mates!

Marc and Carolin

42… no…. 2 BYTES hard at work