How to polish your game

Hello kids,
I have realized, that I’m spending so much time just playing witch Gelex and doing nothing else, that I’m not sure if I can finish it according to my plan. You know, my productivity declines, I write few lines of code, build it to see the result and after half an hour I’m still running the emulator and playing Gelex even if the new lines of code didn’t work the way I wanted :) I really love the game!

But for today I wanna write what I did with the background. As I mentioned last time, it feels little bit empty. So I had an idea about the main field (the one with squares). I wanted to be animated and it should be changing colors during the play. In OpenGL is quite simple to give image some color tint. So I’ve prepared the field in grayscale (as you could see in the last video) and write a function which gives it a color tint and gradually changes it. The change is quite slow, so it doesn’t disturb you from playing.

But there was a problem with that. I was increasing and decreasing one of RGB component randomly and that quite often leads to the situation, that the image was grayscale without any color or colored with very strange color (not really nice). The algorithm was just not right. I found out, that I could use HSV representation of color point. I got saturation and value set to 1 and I’m changing (increasing or decreasing) only the hue component. Then it's transformed into RGB for OpenGL use. As you can see on image, there won’t be any strange color at all. And it works great.

Everything looked alright, but I wanted more :) So I tried to set different color tint to each vertex of the field and the result amazed me. I think it improved the visuals like hundred percent :) This time I don’t have video of it, but you can see three images of the progress and I can guarantee you, that in motion it looks really fantastic :)

More about other polishes that I’m planning to add into my game will be in the next article.

Granny Marie

Žádné komentáře: