Breaking and Raycasting!

So I’m trying to make progress on my level selector and now I need the user input to select the various worlds to propagate the event to pick a level. So I found various examples of how to transfer the camera point to a 3d Ray, then to do the Raycasting in which it should return whether the ray collided with anything. However, I’m getting nada… and as I’m typing this I just realized I don’t have a collider on the target object.

Yup that was totally it!!! Wasted a good two hours mucking around with it. Maybe if I started to blog this earlier I would have figured it out earlier.

I also managed to break my backdrop as I was trying to optimize the game loading time. 15-17 seconds is just too much. I modified all the textures to explicitly be 16bit and next I’m going to try to find a lower poly model to use for the first boss, since the model itself eats up a meg of resources.

Until the next crab time!


So while I’m super pumped on game development I decided to start working on the level selector, from which you could select planets to travel to and from.

I figured I would need to display some sort of textured sphere, have a mechanism that lets you select the planet you want to go to and implement some rule engine on whether or not you can get to one place.

So, things I need to do to make it happen!

1. Draw a textured sphere
2. Draw lines to connecting planets
3. Implement camera logic to float from one planet to another
4. Implement logic on selectable planets
5. Implement logic on input to invoke game levels
6. Implement logic on game levels to return to selectable planets scene again
7. Implement menu navigation to quit the game/options/resume

So I started with generating a sphere in blender, importing it and wasting the next 3 hours trying to get Unity to texture it. I followed about 20 different google posts and various youtube videos where the exact steps seem to work.

Sadly, I was not aware of this UV mapping thing. Apparently creating blender file with just a sphere won’t have any UV mappings so I won’t be able to texture it and I’ll go partially insane on the internet.

Shortly after, I found a component in the asset store that had a bunch of planets and something that I could potentially plagiarize. From there I discovered Unity had default sphere meshes with UV mappings, the exact same texture/material worked and sadly it is now time for bed for this old geezer.

Post Hurricane

It’s been a long while since I’ve updated. Hurricane Sandy came by and really did a number on the area that I live in. Even with that in mind, I have so many fortunate circumstances that while there were a lot of delays, my family and I are safe.

So first update is that Unity 4.0 is officially out. Oddly I had to make a few tweaks before everything would work as it did previously. I’m not 100% sure this build will work as it requires a new web player plug-in and I don’t have my laptop next to validate. However, it’s a bit late for my old geezery self, so I’ll check tomorrow.

The build on the phone is still slightly disappointing as the load times on it are longer than 15-20 seconds.

Regardless, I hope that I can get some stream back into getting my first shooter out there.

Slimming down and navigating around

So, I effectively removed about a meg of junk that was in a bunch of the tutorial code and I also wrote some code to gracefully quit the game. I also refactored the main level base class to be more scriptable. The game seems to take more than 20 seconds to load a level for the first time on my Galaxy Nexus and I have a feeling it’s due to the mono CLR spinning up. I wasted a good deal of code trying to provide more feedback to the user as they would wait forever for the game to load, but I realize. It’s back on to some content.


Well, I was playing around with loading various resources through code instead of having a funky static class factory that held pre-instantiated objects… This did not bode well.

As soon as I attempted to launch it from the web player, nothing was working correctly. Apparently had I just read this documentation ahead of time.

Thus, I’ll will experiment with more.

Doing a little bit of googling, I’ll need to refactor to use this method instead

Update — Unity truly is awesome, I think I spent about 5 minutes moving files around and everything is up and running!

More Ion cannon tweaking!

So I also spend a good portion of tonight messing with WordPress, but I did make a few tweaks to the ion cannon. It doesn’t spam out as much combat text, the damage is tweaked to be slightly higher than the spray gun.

I want to work a little on the story engine next and then a few modes for navigating through levels. Until then, I sleep!