Tuesday, 9 September 2014

Salvation Update - More GUI bug Fixes

Unfortunately no concept art for the minute as my lady is a perfectionist who doesn't let me post things unless she is happy with them :x They look super awesome though, I am hoping my code skills can do her models justice once we reach that stage.

But I have a boring bug update for everyone! :D

I added/fixed the Room Selection GUI feature. Well I say feature, it's pretty necessary. The ability to see what you have selected in your station is pretty freakin' important. At the minute this is highlighted by a halo. This works in a really neat way, now when you click on a building it'll have a little aura around it so show that it is selected. Doesn't sound complicated or that impressive but I'm super proud of getting this working in the way I wanted.

All room objects are stored in a list. When the user selected a building or room, this list is searched through for the room that's selected. This rooms halo is then set to active. All other rooms in the list have their halos hidden. What I think is pretty nifty is this list will only be as big as the initial rooms, because I recycle the lists elements. In my current level there are 16 elements in the list and that will never grow. Even if I add building upgrades, buildings, rooms etc.

If the user builds a new building, the emptyRoom object gets destroyed, which means that the list now has a null value. So rather than simply append the list with the new building, I now make sure to update it. All null values are now replaced by other buildings.

A mechanic I want to have in my game is building space. I want the player to have to remain conscious about the fact that they only have a set amount of room to build. So I don't really foresee there being a case where I have a greater number of buildings than the initial ones. And if I somehow do end up with that scenario, I'll just add more emptyRoom objects or an object based off of the emptyRoom class.

With this part of the framework in place I can now add building upgrades, building overwrites etc. And the list will never grow larger than the original set of room sizes. This took me two days to implement and fix. Which is a tad long. But now I can move ahead.

That's all for now, I won't bore you with code this time :P

Thanks for reading!

No comments:

Post a Comment