Home Blog DVDs Game Nite Blog Web Portfolio
Home

 Latest Blog Entry
Unity Asteroids
09.21.14

I've been (slowly) making my way through the last 3D Buzz Unity tutorial I purchased at some point in the last 2 years. The tutorial goes through and creates a 3rd person space ship shooter where you fly through an ever expanding asteroid field. I'm about halfway through coding the 7+ hour video series, having watched the series once just to make sure I know where all of this is going.

I make little mistakes following along with the videos. I type a wrong character or forget to add a component. So far there hasn't been any problem that's popped up that's taken more than 5 minutes to track down and fix. Part of following along with the video is annoying in that the guy doing the programming has a quirky way of naming his variables. A globally accessible variable is named in UpperCase. That bothers me as normally I would make them camelCase (which he uses for local variables in functions, which I would also do). This can be a little confusing when a variable ends up with the same name as the class, such as:
        public Camera Camera;
Camera is the class, while Camera is the object variable. That just bothers me. I big part of me wants to fix it (Camera camera), but the times I've tried this in previous tutorials I've gotten lost & confused when following along. Instead, I've opted to add lots and lots of comments in my code when pausing the video to try to force myself to explain what is being taught. This makes my tutorial progress slow, almost agonizingly so, but I think I learn more from it in the long run.

Earlier today I ran into my first problem that had nothing to do with actual code. The game has reached the point where my virtual spaceship can fly through the virtual asteroid field. No collision detection is set up yet, so nothing bad happens. Asteroids pop into view based on what can be seen on the monitor - only asteroids in the field of view exist and have movement, nothing (mathematically) is happening behind you or to the sides. My problem was that my monitors would randomly turn off. The computer is on and running, but the video output dies. Once I reboot the computer everything is fine.

Unfortunately I can only guess at what is causing this. My first guess is that the math of keeping up with 400 asteroids moving in 3D space is too much for my 5 year old computer. It shouldn't be, as the 5 year old computer was built for gaming and I don't want to think that I'm making a tutorial game that can break it. There could be a secondary process running interfering with the video - I think at least once I was transferring some video files over the network.

This always happens when I start to pause the game, which thanks to the controller setup means the ship starts looping and, at least in theory, a lot of asteroid position updating is going on. I'm taking a stab at lowering the amount of asteroids that can be viewed before continuing on my merry tutorial way. Maybe it'll work. Maybe not. I'm just guessing.

Tomorrow I get to the video explaining how to blow up asteroids. I'm looking forward to that one.
Link To This Entry
Tags: game dev   programming/interweb   

>>More Blogs

 What We're Playing
What's happening on the Widgey front.


Eschewing the Widgey rankings and standings, Lord Ford deems that we will play games! Jerry leaves the continental United States, and over the course of 3 days we play 8 games.

Last Game: July 4th-ish, 2014: Lord Fords Week of Games



 DVD Latest Additions
To my evergrowing movie collection, I add the following to my online catalog...
 

Brick Mansions

Agents of SHIELD, Season 1
 

Captain America, Winter Soldier

Girls, Seasons 1-2
 

I Could Never Be Your Woman

Draft Day
More DVDs


 Revolver Maps
It's a hit counter. But pretty.
Just a little widget that looked fun to play with from RevolverMaps