Friend me on FacebookFollow me on Twitter! @Caruanas Subscribe to my YouTube channel! Caruanas Follow me on Twitch! Follow me on LinkedIn!

Beware Unity's project Colour Space setting

Last week I was experimenting with some custom shaders and noticed that when I output a hardcoded colour (from C# code or directly in the shader itself) it returns a different colour than expected. For example return float4(0.5f, 0.5f, 0.5f, 1.0f); gave me #BCBCBC instead of #808080 as expected. However, I also noticed that if I define a property (which becomes visible to the inspector) and return its value (untouched/unedited), it results in the correct colour.

Naturally this meant that the issue was somehow related to the fact that Unity was in some way processing the property value such that it is evaluated correctly...which also did not make sense to me since I did not think it needed any alternative evaluation.

After a couple of days of hair-pulling, a post to the Unity support forum pointed me in the right direction. It turns out that somehow my project was set to use linear space lighting instead of the (usual, expected) gamma space. So Unity was properly converting the inspector-selected colour to linear space whereas my hardcoded values were not! (0.5, 0.5, 0.5 is naturally valid in both linear and gamma, but translates to #BCBCBC in the former and #808080 in the latter).

So if you want to work in linear space, you need to convert your values. A quick, although quite inaccurate method (depending on the target platform) of doing this is to raise the RGB values to a power of 2.2

Otherwise do as I did and if you don't specifically need linear lighting (which in 3D environments can offer a more realistic effect), make sure your project is set to gamma space rendering via "Edit -> Project Settings -> Player -> Other Settings"

Note that linear lighting is not supported on all platforms.

More details can be found at

Unity colour space setting

It’s time for another Malta Unity User Group meetup!

Malta Unity User Group logo

It’s time for another Malta Unity User Group meetup!

Date: Wednesday 9th December
Time: 7:00pm – 8:00pm (after the meeting we can stay and have a drink and a chat)
Venue: The Pub, Valletta

This year we’ll be having a number of 10-15 minute microtalks. In no particular order:
  • More fun with shaders: What would Fallout 4 look like on the Game Boy? - Alan Duca (5¼ Games)
  • Geometry Deformations: Model or Shader - Marvin Zammit (Mighty Box)
  • Developing a Unity3D Asset Store Plugin - Michael Camilleri
The event is free, but please help us out and RSVP on the Facebook event page so we can get a better idea of numbers and prepare accordingly.

The Malta Unity User Group is a local group for Unity users and developers to exchange ideas, share experiences and help each other create awesome games using Unity.

The group is open to everyone! You don’t need to be a Unity expert to attend. Whether you are still a beginner or an experienced Unity user, come and join us.

Faction Overlord is now in open development

Originally posted on the Pixie Software website

We've finally taken the plunge. As of right now, Faction Overlord will be available for everyone to download for free all throughout its development. If you'd like to offer monetary support to help us throughout development, you can add a donation within the game download widget. In gratitude, we have some perks for you to enjoy.

Since it's the first time many of you are hearing about Faction Overlord, we've decided to write about the game's current state and our immediate plans for it as we start open development.

This is a very uncomfortable first step for us. We're afraid of being summarily judged on the quality of this first (let's call it) alpha release when we're in fact a long way away from what we want to achieve with this game. But this is the state the game is currently in and if we keep on delaying open development until it's in a semi-decent state then we might as well just wait until it is finished, which would defeat the whole concept of open development.

One of our primary concerns is the visual aspect of the game. We haven't really found a style which properly communicates the feel and quality we want. This is something which we plan to address by the end of the year. In the meantime we're conscious of the fact that temporary squares and circles are too basic and will just cause clutter and confusion. So we decided to create some initial art which passes on the necessary visual information cleanly without focusing too much on concept and quality.

Regarding gameplay, so far we've programmed most of the core functionality involved in setting up and playing the various match challenges and have included a couple of them as an initial sample. We've designed a lot more but will be including them in upcoming updates since we'd like to make sure we've sorted out our fundamentals first. So this first release will help us gather some basic analytical data and see how the foundation holds up on different machines, making sure we've got a solid core before building up on that even further.

In our next update we're hoping to roll out the networked multiplayer gameplay and matchmaking and we'll also be including a few more challenges to start focusing a bit more on gameplay. This also means that we need to make some improvements to the controls and properly design the UI to accommodate more players as well as the different playing styles of the various challenges.

Our targets for the next couple of months:
  • Developing a proper art style and creating the basic visual assets.
  • Designing a robust UI which, besides being visually clean (such as when displaying challenge objectives and scoring), also supports the various gameplay requirements such as player selection and having more than 2 grids on screen.
  • Implementing a decent amount of varied challenges which would allow us to move on to the next phase of development. This will be all about analysing data and feedback received on the existing challenges to help us understand which work and which don't so that we can develop a fine-tuned, more educated set of challenges.
  • Introducing the concept of "elemental" creatures which, in terms of game mechanics, helps us create more robust challenges but also starts linking back to the game's main premise.

So keep in mind that this is not (yet) anywhere close to what the completed game should look and feel like. However if you have any feedback and critique on this, please do send it over our way. It is one of the reasons why we're making our progress public after all.

Progress on the game is not that fast since some of our (small*) team's members can only spend a handful of hours each week working on the game. Nevertheless, we're moving forward steadily and are looking forward to this huge next step!

* The team is small, not its members

Loading video...

Starting a new GameDevElement series

Now Loading is a GameDevElement series providing a brief round up of news and current events happening right now in the game development industry.

Loading playlist...

Community feedback - GameDevElement episode #4

Episode #4 of GameDevElement is up!

This week I talk about building a community around your game with Karel Crombecq.

Hit me up on Twitter and let me know what you think!

Loading video...

Page 2 of 4

Subscribe to my newsletter