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. :)

No comments:

Post a Comment