UnityGadgets BloggerGadget

Friday, February 28, 2014

SiXty-FIVE: progress?

I have a space survey on "hold" as it is at the moment, and I have a buggy gamestub up and running on the blog to scare any real people visiting the hell out of here.

According to my calculations at this rate I will be able to get enough money from selling lame annoying games I develop in Unity to pay for a ticket to the moon in around 73935 years + or - 10000 years.

I need to do a lot of work on that stub to make it into something less annoying and maybe even somewhat entertaining.

I am still optimistic though, FSS FTW!!!

p.s.: play around with mouse clicks, mouse scroll, wasdr, and if you feel adventurous throw in a couple q and e here and there. Enjoy the bugs.

6 comments:

  1. Controls for the less adventurous:
    w: thrust forward /the top, the flat side opposite the side with the legs/
    a: rotate left
    s: kill rotation
    d: rotate right

    q: face prograde /direction of velocity vector/
    e: face retrograde /opposite direction of velocity vector/

    r: respawn /technically just puts lander to starting position and kills rotation if any/

    x + mouseclick: spawn in an "asteroid" with a preset velocity
    c + mouseclick: change focus of camera to clicked object

    Major Bugs /conditions might not be accurate, haven't spent much time testing them/:
    Jittery rotation when retrograde or prograde is on and lander lands, or lander's velocity is near 0
    Camera Toggle stops working after a few asteroids are added, can only switch between asteroids.

    Just finished adding the camera toggle option, I just wanted a camera that follows the player around, but added the function to change it when something is clicked. It took me nearly 3.5 hours to combine what I could find on unify wiki, Unity Answers forum, and unity scripting reference. I am so slow. :D

    Next project is to draw orbits of objects that are being followed by the camera.
    Then debugify. :D

    ReplyDelete
  2. F1 focus camera on planet
    F2 focus camera on player

    Had to add these because the click focus doesn't work properly

    Looked into drawing lines and found a great asset called Vectrosity on unity store but it's 30 dollars. It's going on my wishlist of assets I wouldn't mind getting eventually. I am going to try and write up something "simple".

    ReplyDelete
  3. Oh and the camera follow on moving objects isn't smooth enough.

    I also made the lander larger so it's easier to see.

    ReplyDelete
    Replies
    1. And finally added some "orbit" drawing. However it isn't what I wanted to do with proper scripting. I am going away for work for a week so I just added a "trail renderer" component to my objects that draws trails behind them as you can see. It works to some extent. :)

      The funny part is that it took me a while to find where they hid the component in the options because they changed it around, since the tutorials I have seen and instead of being smart and looking through all the sub options, I assumed they got rid of it or something. :D :) NOOB!!!

      Anyway, the good news is I think I will be able to use line renderer and the parametric equations for circles and elippses and orbital mechanics to calculate and properly draw the orbits of objects.

      Fingers crossed, but while looking at various scripts all day I realised I have barely did a couple of steps and there is lightyears to cross untill I can write something serious.

      I could just fork out 30 bucks for Vectrosity and learn how to use that tool, but that would be too easy and efficient. For some reason I like doing things the wrong way.

      Delete
    2. It seems I am being consistent with the speed at which I can handle issues. I spent several hours if not a whole day all up in the past 2-3 weeks looking at unity forums and unify wiki for a camera follow scripts. I found heaps, none worked properly for me, then found something that worked after I threw out sections of it that I didn't need but it was jittery.

      Then after several hours of reading and doing exactly the opposite of what other people did to get rid of jittery action, the 4 line code finaly works as it should....

      So yeah, slow as hell.

      Anyway, I am happy with the follow script now.

      There seems to be an issue with the center of my sprite, it isn't exactly at center of the object so when it rotates the orbit drawn by the trail renderer is a spiral. But this is just a minor flaw.

      Still haven't fixed the issue with the prograde/retrograde script when velocity is small or while landed, probably that is my next project.

      I am also thinking about other objects, and interesting behaviors for them. Stuff happening while they collide, like exploding or merging. Or making the player be able to pick up objects, or destroy them.

      I also need a better spawn script for the asteroid, something similar to what other similar "games" have, where with the mouse one can control the direction and magnitude of the velocity added to the newly created object.


      Delete
    3. I changed the prograde/retrograde function so that it only makes the lander face toward the chosen direction but it doesn't hold it there. This eliminates the problem of low velocities and landing, also can be used to upright lander while on planet...

      Delete