Saturday, 30 August 2014

From Clusterbug Games to Tiny Flame

As some of you may have seen, I am changing the name of my site and blog to Tiny Flame. I felt like a change was needed since I'm spending a lot more time working on my games developement. At 3 a.m the last thing I want to see is the word Bug in any context!

Will post more updates on Salvation as soon as I finish off these fixes!

Thanks for reading,


Friday, 29 August 2014

Salvation - Post Ludum improvements (continued)

Morning people,

Improvement changelist thus far:

  • GUI textures now redraw with aspect ratio/resolution. Basically screen size
  • Fixed annoying panel bug where panels wouldn't close after clicking a new panel
  • Fixed bug caused by closing panels requiring user to double click on the new panel

Potential problems:
GUIText does not draw the same way as a GUITexture, only have a vertex to work with (x,y). Might have to redraw fontsize or pixel.offset depending on screen size. As it stands now the text will always remain the same size. This seems to function properly overall for now so leaving as is to fix other more pressing concerns.

Next bug fixes:

  • Fixing the selection marker
  • Reworking the stats panel to make is function like other panels, currently will throw out nullpointer exceptions as Update is checking for something that may no longer be setActive. Need to add isActive check to BuildingInterface class.

That's it for now, will keep on chugging after work.


Monday, 25 August 2014

Salvation - Post Ludum improvements

I can't stop writing code! It's like a scab I can't stop picking at. Might as well be useful. I'm going to keep on trucking with my Salvation game since I'm pretty happy with it. I'm trying to get a nice PC/Mac build done. Because of this I need to tweak things to be PC friendly.

Improvement number 1:
Found a way to keep aspect ratio consistent with my GUITextures depending on the screens changes. If I swap between 16:9 and 16:10 and even Free Aspect in Unity, my Test GUITexture updates properly. I'm doing this all manually and not via the Unity built in GUI system since I wanna know how these resolution things work. It's something I am aware I am lacking knowledge wise.

This means once I put this in and get it working for all my GUI Textures I can update resolution without worrying about GUI stuff being cut off or looking terrible.

Improvement number 2:
In the future Ill not have to worry about my GUI, but the game objects may still cut out off camera as the resolution is lowered to much. To fix this I do what any RTS game does. I added mouse-camera panning. This currently works by holding down the spacebar key. As long as you hold down space, the camera enters panning mode and you use the mouse to scroll (X,Y axis only). You let go of space and presto - the mouse is free'd up to building stuff again.

The very first thing I'm aiming to fix is my terrible GUI and the GUI logic. As my game updates GUI elements (especially in my building instance class), I need to rework the whole class. I can't simply add .Active=false as I'll get nullpointers because my classes are looking to update values that are now not active. Man I miss the days where I'd just write something like Picture.visible = false :P

I ported everything over from a web platform to PC and now I'm sticking to PC until the end. Oh I did one more thing.

Improvement number 3:
I disabled that Unity pre-game panel. I could edit it and just use that, but as with point 1, I want to have options in my game. I want my game to handle resolution changes and even graphic changes. This is the only way I'll learn.

To break up all the text here's a spaceship......

All for now, night people. :)

Ludum Dare #30 Dev Journal: Salvation - Submission build (Dev build so very not finished yet!)

For those interested, you can play a web version of my game I made for Ludum Dare here.

Please note that this game is still pretty buggy and unbalanced and missing sound :)

Ludum Dare #30 Dev Journal: Salvation – Not quite done but close enough?

I’m all out of time. I was frantically trying to fix some last minute bugs and add in some balancing but no luck. I also unfortunately couldn’t add any audio to my game since I didn’t have enough time to mess around with Audio listeners. I submitted an hour early just to be on the safe side.

BUT! I am still pretty happy with my little game, even if it has balancing issues and isn’t completely done. I did it all in 30 hours, excluding sleep breaks.

The last few things I added were tooltips for things since it’ll be pretty hard to figure out what to build without them. I also added a front end and a splash screen. A little bit of lore in the form of an email. I only submitted a web build for now as I want to add a few fixes before messing around with a PC/Mac build.

Now that the event is all done I can spend some time fixing things :) I’m going to take a break for now though!

Good luck with the odds and ends of your submissions guys!

Ludum Dare #30 Dev Journal: Salvation – Man, I guess this counts as an art style….?

I hate art so hard! But at least it’s all done so I can almost get back to fixing bugs.  Next on the list is Sound / Maybe music / Finding a nice font.

After that bug fixes! :D I am pretty happy with the colours though, super bright! All hand drawn (if you couldn’t tell hahaha).


Ludum Dare #30 Dev Journal: Salvation – Light at the end of the tunnel

I’ve now gotten the game into a state where I can start working on assets. Currently I have 10 hours and 52 minutes left. Originally I wanted to spend 24 hours on the assets but I am confident that 10 hours will be enough to cover all the buildings I have in game since I didn’t add all of them.

My plan now is to make the textures / sound effects and if I have time maybe a sound track. I’ve never made music before so I’m apprehensive but I’m super proud of my game and wanna go all out.
If I finish this with enough time remaining, I plan on spending the rest of my time fixing bugs.
Not all buildings are in and I’d like to make the game more in-depth and add a Save game system but those are on the backburner. I’ll probably add those in my own time after this event.

I have to say, all the other games I’ve made in the past have been little arcade games that I didn’t think were amazing, just standard match three stuff. Or avoiding obstacles stuff. This is the first game I have made that has something to it in terms of depth. It’s amazing what you can do in around 32 hours. This event really made me see what I am capable of. I love city building games/ strategy games so I’m really happy I could churn out an idea I was playing with for a while. It feels like a weight is off my chest. :D

My game is not the most amazing thing ever but you know you have a fun game when you lose and go “This is bullshit, I should have been fine, why did my happiness go down like that? stupid leavers!” Or when you build yourself into a corner and realise that the refugees will probably rebel before you can get enough funds from the government to build more living accommodations. If you can get worked up at a game you made then things are probably going pretty good :)

-Improvement ideas-
  • Add background elements (in terms of quads) like asteroids, ships, fleets etc to make things more immersive / war torn.
  • Add a deconstruction tool so I can revert the building to an empty room object and get some money back. This will make it so I don’t build the wrong building and have no way out resulting in a lost game.
  • Add tooltips! Like seriously, loads of tooltips!

Ludum Dare #30 Dev Journal: Salvation – Income Rates and the code for happyness

Man was I feeling bummed out last night – all my complicated stuff was working fine but I had a ton of minor bugs around which was annoying me to no end. Also the way Unity uses its Setactive-ness is beyond annoying in my opinion. Anyhow I decided to spend 5 hours sleeping, overslept by like 2 hours but I still have 14 hours left.

Not started on assets yet, but I’ve decided that I’m done adding features to what I have thus far. It’s now a decision between what my game can do – and how my game looks. So I gotta choose looks as I think it can do a fair bit.

The sleep helped, and I added Income rates into my game. So building a factory won’t just give you flat out money but also an income rate very X amount of time. at the moment this time is every second, but I need to do balancing once I can actually sit and play my game for a bit.

Happiness now also has this. So the happiness rating is working properly now, apart from balancing. I would have liked to have more factors include this happiness functionality. As at the moment it just leaving refugees (-) and security buildings (+) I need to rework the code for happiness, it’s pretty messy at the moment.

- Improvement ideas -
  • Make more use of happiness rating, if I make an events system I should then use it in there as well.
  • Fix how the happiness works, it needs its own class. Perhaps then I can add other factors in easily (such as hunger/sickness etc)
  • Tweak how my income rate is repeated. There’s a more efficient way of doing that…it’s on the tip of my tongue!

Ludum Dare #30 Dev Journal: Salvation – Because I’m happyyyyyy (Adding win conditions, fixing bugs)

Oh my days -facedesk-

Alrighty so I been fixing a bunch of minor bugs, most of them GUI bugs I didnt think of during the early stages. Like what happens if I just spam a button over and over again. Turns out you lose the game terribly, or win the game also terribly. Trying to fix all these click spam issues.
Also busy working on deconstruction, like what happens if I swap one building with another? Now you get a 50% refund and the other building is built. Pretty sure I’m missing a few bugs though which haunt me still D:

Money and population now matters in the game. You cannot build a work-building such as a solar array or factory if you do not have enough of the required population. Only certain refugees from certain worlds can run certain buildings. So the idea is to get a good mixture for what kind of facility you want to run. The idea is to have everyone from different worlds band together and help each other to survive this terrible assault from <INSERT ENEMY NAME HERE>. You also now can’t build anything if you can’t afford it. This money checking method works ok, not perfect but ok for now. You can still go in the negatives.

I’m also starting on the win/lose conditions. The win condition is reach a certain level of population. Meaning rescue X number of refugees. I’m not sure what this number is at the moment. I’ll focus on balancing later as those would only need me to tweak ints here and there. I’m also spawning things super-fast to debug so balancing is not a smart move at the moment I think.

I’ve added a Happiness rating to my game. If you can’t accommodate a certain amount of refugees and they leave on a ship – you have a decrement to your happiness rating (maybe, depending on a % of an int). I’m planning to have it so that if your happiness reaches 0 or less, you have a chance of the refugees rebelling on you and you losing control of the station. Meaning you lose the game.
I also wanted to have a % chance that the rebels would destroy a building based on happiness, had it kinda working but it’s taking to much time and I got around 1-2 hours before I have to start making assets.

My next steps are to add defence, food and healthcare to my game. It might have to be in a basic way for now but they’ll be there. I also need to start and finish the upkeep/transport costs. And the grant income for money. Since at the moment there’s no long term money making in my game. A building gives you + cash flat out and then never again. This doesn’t work well in gameplay so I need to change it.

Code for how my happyness works at the moment:
//Making nice old school comment dividers cause my eyes are getting blurry! 
//Sets the population values per worlds race
public void setPop(int x, string y){
    if(y == “red” && redCap != 0 && redCap >= redPop){
        redPop += x;
        GameObject.Find(“RedCap_Pop”).guiText.text = redPop.ToString();
        if(y == “blue” && blueCap != 0 && blueCap >= bluePop){
            bluePop += x;
            GameObject.Find(“BlueCap_Pop”).guiText.text = bluePop.ToString();
            if(y == “green” && greenCap != 0 && greenCap >= greenPop){
                greenPop += x;
                GameObject.Find(“GreenCap_Pop”).guiText.text = greenPop.ToString();
                if(y == “yellow” && yellowCap != 0 && yellowCap >= yellowPop){
                    yellowPop += x;
                    GameObject.Find(“YellowCap_Pop”).guiText.text = yellowPop.ToString();
                    UnHappy25(); //Because of refugees being forced off the station you bad person you!

//% chance of an unhappy being added to overall happyness
public void UnHappy25(){
    int rndNum;
    rndNum = (Random.Range(0, 40));
    if(rndNum == 1){
        happyRate -= 1;
    GameObject.Find(“hppyVal”).guiText.text = happyRate.ToString();

Oh I also added totals for a nice overview.

Back to it!