• About
  • Gallery of Images
  • Archives
  • Categories
  •   Hour 13 – annoying bug gone!

    29/09/10 - 20:13

    Hey there, been a nice and productive hour 🙂

    Graphically, I’ve added a black background image, and added a texture to the plane at the back of the play field. I think this helps a lot in giving the impression you are actually in a crater 🙂

    Most of the time was actually spent addressing a bug which had been annoying me for a while. When you fire the laser, and hits something, two objects are created, a light and a cube which deforms the terrain.  This is all good, but as I am running this in an Update() loop, it meant holding down the mouse for a second sometimes results into hundreds of items being created.  D’oh!  So after some reading, I discovered I could grab the number of objects of a certain type.  So by placing an if around the object creation section, it was very simple to cap the items.  The video shows you how to tag an object (which I will be uploading just after this).  The code used looks something like this :

    var meltingObjects : int = GameObject.FindGameObjectsWithTag("meltingObject").Length;
    if ( meltingObjects < 5 )
    {
    var MeltyCube = Instantiate ( MeltyCube , hit.point, transform.rotation );
    var evilgreenglow = Instantiate ( evilgreenglow , hit.point, transform.rotation );
    }

    Pretty simple and incredibly helpful, now I can blast away at rock for hours without having to worry about a million item sitting there 🙂  Oh, which reminds me, I’ve also been playing around with creating the ore in bands, with some overlap, I forgot to show that in the video, so will just add a quick screenshot now :

    It’s a rough model of the system I want, but gives you the idea of how I want the ores spread around the asteroid. In that screenshot they are floating 100 units above the terrain which is why it looks like they are out of the mine 🙂

    One last thing, I’ve encoded with the ffdshow codec.  Hopefully you get a better frame rate now 🙂  Will start uploading the video now, tune in tomorrow for another hour 🙂

    Edit : Youtube vid here : ( hopefully this one works! )

    lamentconfig
    Share

      Hour 12 – Lots of new things added !

    28/09/10 - 20:05

    Been a very very busy hour, but thankfully everything fell into place pretty quickly. I’ve added the Limar model into the game now, and made it huge to give a nice sense of scale. Added a plain to the side of the terrain and ‘welded’ ( i.e. matched levels ) them together. Turning the fog on now gives a pretty damn cool looking background.

    Also ( and failed to mention this in the video ) I’ve tweaked the texture on the terrain to make it seem much more rock like. It repeats a lot more now, and makes it feel a lot more, well, rocky 🙂 I want to replace it soon with some homebrew textures, as the current one is just a standard unity asset.

    Also, been playing around with the Unity GUI functions, found some pretty cool code here, which helped me implement the two status bars you can see.  I changed the code a bit however, as my texture wasn’t stretching across the entire bar.  Basically, replacing :

    GUI.Box (Rect (0,0, size.x, size.y),progressBarFull);

    with :

    GUI.DrawTexture (Rect (0,0, size.x, size.y),progressBarFull);

    Achieved the look I wanted. These two status bars are pretty huge bits of functionality for SpaceOreMiner. The red one shows how much fuel you have left. Once it hits zero, its game over :). The second one shows how much energy you have left for the mining laser. Once its gone, no more mining for you! Of course, the game would be pretty short if they couldn’t be refilled. This is something which will happen tomorrow 🙂 When you head back to the Limar, there will be an energy field or something which when you collide with it, your fuel and energy get re-filled. Pretty sweet eh? Definitely feeling a lot more like a game now!

    So that is about it for tonight 🙂 will start uploading the Youtube video now – frame rate still sucks, but as no one is watching these, I’m not going worry to much about it! hehe.

    lamentconfig
    Share

      Some images

    28/09/10 - 17:39

    As the videos are a bit low res and yucky, I thought I would just quickly post some images before I start the next hour later tonight.


    The Mole descending the shaft ( run in full screen )


    I spy silver! ( run in full screen )


    Green tyronic crystal? oO ( run in full screen )


    Copper at the bottom of a shaft ( run in full screen )


    The game running inside a browser!

    lamentconfig
    Share

      Hour 11 – Presenting Uber Mining Laser and Gravity in Unity3d

    27/09/10 - 20:15

    Very, very pleased with this hour. I now have a very cool looking green laser, which illuminates the area around it with green light. Also I’ve modified the FPSWalker script to account for my unique type of gravity ( not down, but to one side ) and improved the mole movement a lot.

    The laser itself has four frames of animation, all set with the LineRenderer. Each frame of animation gradually increases the thickness of the beam, after it has reached frame 4, it reverses itself, which when played super fast, gives a really cool looking pulse effect. Pretty happy with that.

    The lighting effect of the beam was pretty simple to do – I’m just spawning a light prefab at the end of the laser, which lives for a couple of frames before killing itself.

    The other thing that I have played with is the movement, it feels much more natural now. I want to simulate the gravity a bit better, actually accelerating the mole as it falls, but as it stands I’m pretty happy as is. The upward movement is slow, which is intentional, at some point you will have some form of engine blowing fire out the bottom of the mole to make it look like a booster. I think that will look pretty cool 🙂

    I just noticed as I was coming to the end of an hour that Unity have released a new version – Unity3. They couldn’t have waited till Saturday, damn them! 🙂 I’m making such progress with this game as is, I shan’t be upgrading yet. Learning as I go in timed challenge is pretty tricky as is … re-learning a new version could seriously impede my progress. So I will wait till after the 19 hours, and maybe reward myself with the indie version of Unity3 if I actually have a game written.

    Well that is it for now folks, just going to record the YouTube vid and call it a night 🙂

    Edit :

    

    I noticed the mining laser didn’t show in its full glory, so have recorded a high speed version which I am just uploading now.

    Edit 2 :

    lamentconfig
    Share

      Hours 6 – 10 : More thoughts on SpaceOreMiner

    27/09/10 - 17:11

    Very pleased with how things have gone so far. I now have pretty much all the major game play components – deformable terrian, player movement, ore spawns and the laser. The most annoying thing to be completely honest during these hours had nothing to do with the game itself, the biggest problem was the bottleneck YouTube presented.

    Aside from that niggle, everything went pretty smoothly. Definitely getting better at moving the scene camera around inside Unity. It was pretty frustating at first, but its very much something that you just need to get the hang of. As for scripting, I’ve been producing both c# and js code, mixing and matching them purely to see how it all works, and it all works pretty damn well. It’s a very different approach to development to what I am used to but it really seems to work pretty well.

    Very happy with where I am in the development process. Just over half way through my assigned time limit, and I have everything I want. Now its just a case of turning what I have into an actual game.

    For the rest of the week ( i.e. Monday to Friday ) my time is pretty limited, so I am planning to just do an hour a night of coding. YouTube/blog posts will come after this hour of time. Then on Saturday do a four hour session, and hopefully have a game at the end of it 🙂

    Some things that I need to address in the next few hours :

    1.Laser beam. Need to make it look like a huge freakin’ rock blasting mining laser from hell.
    2.Movement. Currently when I’m moving the mole around, I am very aware I’m just moving forward/backward/left and right. I need to change that, and change how gravity works so the movement falls into the way I want it to be moved.
    3.Inventory. Currently ores are just destroyed on collision with the mole. This needs to change so that the mole actually stores up to 10 different ores.
    4.Actual game play mechanics. Both movement up and firing the laser should use some form of energy, returning to surface ( where the Limar will be ) will recharge this energy. Also at this point the ores stored in the mole should be removed, and points/credits/score/dollarpounds should be added.
    5.Lighting. Currently everything looks really bland. I need to add some light sources in to improve how things look.

    Five points, and five hours till Saturday, hmmm, maybe that is a sign of the state the game will be in on Saturday. I can but hope 🙂

    tl:dr; everything going better than I had hoped – and youtube sucks

    lamentconfig
    Share