Thursday, May 21, 2015

Week 14, Day 13: Big Red Button

Well I reorganized the way that the game is laid out so that everything looks better. The game was a little cramped in the screen so the camera view was adjusted and so the various components of the game had to have their sizes changed as well. I had to change the sizes of all of the planets and I also moved the tourist so that the planets can have more room. Aside from that though the button had its model attached to it as well as the script that tells it to change color when it is hovered over. I also changed all of the basic text from basic to GUI text so now it can be edited while the game is running. That was a little time consuming but I got through it. I also had to relocate all of the text because it needed to be moved once the screen was re-sized. Overall I would say that I'm in a good position to start scripting the parts that keep track of game actions because next class I can start on the buttons that can tick up or down the number of resources that will be collected in a turn.

Tuesday, May 19, 2015

Week 14, Day 12: Intergalactic Interface

Today I got a whole lot done, but unfortunately a large amount of what I did isn't really usable. You see I did all of that lovely text over there in normal text instead of GUI text so now I can't edit it at run time. Fortunately however all that needs to happen is that the text be changed from normal to GUI so the coordinates of the text can stay the same. That was what took the most time out of the day anyway. After I fix that though I can keep working on the script that will keep track of the values of all of the numbers on the screen so hopefully soon there will be some kind of playable game. At least I did finish the layout though and I also laid out where the buttons will go so that will save some time moving forward. I also got the final background on the game because the prior one was low quality.

Monday, May 18, 2015

Week 13, Day 11: They Appear!

I have a script now that makes the planets able to be visible while the game is running. So now I can change if a planet is visible or not at will during the game. As you can see from the picture to the right I've created a little pattern to show that it can be done. Along with that I have also set about creating the interface that keeps track of the resources that the player has at their disposal and again there is a picture of this to the right. Once I pop numbers into the columns then all I need to do is write a script that keeps track of the amount of each and then that will be done. Now all that I have to do after that Is finish attaching all of the models to the objects in-game and set about writing a script to keep track of all of the variables that I've created across the game objects. Once that is done the game in theory should run all by itself. Should. One more thing that needs to get done is some kind of interface that lets the player take temporary resources into their inventory. Also there needs to be some way of the player acquiring the planets as well. Well, there appears to be quite a bit of work set before me.

Wednesday, May 13, 2015

Week 13, Day 10: The Invisible Planets

 The goal for today was to get the planets that needed to be blacked out blacked out while still having access to their original textures. How to do this? First I created a Boolean to keep track of weather the planet was visible or not. That was simple enough, but I ran into problems when I attempted to change the textures based on this variable. I tried several ineffective and weird things like attempting to put references to each and every texture within every planet and only using the applicable ones. This would have required me to put 21 references within each prefab so that would have taken a very long time. Every planet only would need two references so I just decided to use two general names. As you can see by the picture to the right I've created a reference to the texture "none" as well as a reference to a texture "norm". For each planet none is always the file blackbox.jpeg  but the reference within norm does vary. The reason for this is so that none can be used when the planet is supposed to be blacked out and "norm" can be used when the planet is its normal color. So far this seems to be working so I shall continue down this route. In other news I also fixed a slight error I didn't know that the game had. Apparently my spawner script was creating six times as many planets and tourists as it needed within the hierarchy so I adjusted the spawn function accordingly. Next class the plan is to (hopefully) attach all the models to the planets and the tourists as well as starting some way of keeping track of the planets that the player owns.

Monday, May 11, 2015

Week 13, Day 9: Randomization and Spawning are Done

 Today I've finally removed all of the planets and the tourists from the hierarchy and all of them prefabs. Because of this I had to change the references within all of my arrays from the Game Objects in the hierarchy to the newly created prefabs in their respective folders. These folders were organized in the same way that I originally had the planets organized in the hierarchy as to maintain some normalcy. I also started to attach models to the grade four planets but I only have five of the fifteen models from my assets department so that is as far as I have gotten. Similarly with the tourists I have attached the needed tools to render them for when the models are handed over so that they can just be attached once they are ready. That's why some of the objects on the right are pink they are missing models so the default makes them pink. As you can see however the randomization of the planets works well since these two images are of consecutive tests of the game. Also my assets manager found a better background image so I put that in as well. As for next class hopefully I will be able to finish putting all of the models together and start making this a playable game. 

Thursday, May 7, 2015

Week 12, Day 8: The Prefabination of the Solar System

Today my partner handed off the models for the planets so I went about attaching them to each of the planets that they needed to. I also decided that it would be easier to work with if all of the planets were just prefabs so I made all of them prefabs and organized them in a similar way to how they were in the hierarchy originally. The rotate script was also attached to the planets today as well so now instead of having ugly plain white planets I now have colorful, correctly lighted and rotating planets. All in all a good days work and now that I have this done writing the spawning algorithm should be far easier than it was before.

Tuesday, May 5, 2015

Week 12, Day 7: Interplanetary Shuffling


Today was spent learning how to shuffle game objects within an array upon the game starting. This was so that the objects would go back to their original and organized state when the game was not getting played. Needless to say there were several problems mainly when I was referencing the given variables because the algorithm itself was sound. Once I was done with this however I was able to apply this function to all of the arrays that needed it so essentially the "decks" of the grade one through four planets. This was also applied to the tourists for the same reasons. I also started working on a way of spawning the planets within the game but stumbled upon a few problems. One of which was weather to remove all of the planets from the hierarchy and make them all prefabs so that they could be created and destroyed more easily or weather to keep them as part of the hierarchy. I am still unsure of how to move the planets into their correct positions based on the spawn points that I have created however so that will need to be fixed the next time that I work on this. That I presume will take the entire class to get all of the spawns working for the grade one through four planets along with the tourists.