Saturday, February 9, 2013

NavTac - Log #5

Well, it's almost 3 in the morning, and I finally have shooting done. After playing with lots of methods to get the shells to follow a certain arching trajectory, both by tweening/lerping and use of physics, I ended up finding a very helpful script someone posted on Unity Answers and was able to tweak it to my needs, implementing it into my overall turret-control script.

For the record, this is the Answers page.

So now the turret is able to track its target and shoot it with the script I've written, which I've made it to allow me to set via the Inspector:

  1. The ammo/shell prefab
  2. Maximum firing range
  3. Reload time
  4. Amount of shots to begin with
  5. Rotation damping factor for the turret
  6. And the maximum and minimum elevation angles for the turret
I think the last thing I need to do now is attempt to calculate the lead for the target. I found a script the other day meant for that purpose, hopefully I'll have luck figuring it out and including it quickly. I'll post a new webplayer with my next log.


Thursday, February 7, 2013

NavTac - Log #4

Oh juggling is not fun. Made some idle animations for animals for another game I'm helping with as animator. And then crammed today for the last day of my Project Management course, finishing reading the book, writing a journal entry for it, taking the final exam, and turning in the final project. Whew!

Back to this game... since the last log I've managed to get the gun tracking in, so the turret swivels to face the target and the cannon pitches based on how far the enemy is in preparation to fire. I think I'm just going to animate/tween the position of the shell as it heads to its target though, so far figuring out the "ballistic trajectory of a projectile" seems more difficult than I'm willing to put time into at this point. Maybe down the road I'll change it, we'll see. So yea, next I'm gonna get the shells flying, and possibly look into Vectrosity for help with rendering the lines since LineRenderer is horribly limited.

Tuesday, February 5, 2013

NavTac - Log #3

Yesterday and this morning I scripted in the camera's movement. It now supports:

  • Touch: Panning using single-touch drag
  • Touch: Zooming using pinch-to-zoom
  • Mouse: Panning using LMB-drag
  • Mouse: Panning using the edges of the screen
  • Mouse: Zooming with the school wheel or +/- keys
Made the script as reusable as possible, so the camera's min/max speed and min/max height can be adjusted in Unity's Inspector, with the speed scaling depending on the camera's current height. Now I'm going to at least start on scripting the turrets, so they at least track their targets... going to have to look into some heavy math possibly to get them to lead properly. /sadface

Sunday, February 3, 2013

NavTac - Log #2

Yesterday and today, the scripts came together that will control ship movement and designating targets for each ship, as well as a simple health script. So now, after dragging a path, the ships will begin to follow them. They do have a limited turning radius though so cannot simply turn in place or on a dime - I will have to implement functionality for the ships to slow down a bit when sharp turns are coming up to follow the path more strictly. Also now, when dragging from a ship, if you let go of the mouse button over an enemy ship, that will set it as the current target (though you will still have to give it movement orders to get there!). The health script currently just managed the amount of health each ship has and its public functions for changing it - not yet sure if I'll need any more than that for this, we'll see.

Next up on the list, I think I'm going to focus on asset production before continuing with scripting, so that I have more to work with. Then I need to touch up the path generation and movements scripts I've already made and make the following corrections/changes:
  1. Increase drag on the ship's velocity based on how sharp upcoming turns are (so they slow down for tighter turns)
  2. Only begin to decelerate when near the "true" end of the path. Currently, it slows down when it is physically near the end of the path, regardless of how far it still has to travel, so I need to base it on path completion as well.
  3. Delete points on the path as they are reached.
  4. Change the style of the marker and snap it over targets when hovering over them.
  5. Make the rays used to plot waypoints ignore terrain.
As for the paths themselves, I may end up looking into Vectrosity or learn to use the Mesh functions in Unity, because the standard Line Renderer available is too limited and won't achieve what I want.

Friday, February 1, 2013

NavTac

Oh my jeebus I made a total of two posts in 2012. Good thing the world didn't end, now I have the chance to make it right!

So since the last post, some pretty good progress was made on that sub game but I ended up abandoning it mostly due to lack of interest. Took too many breaks from working on it and it started feeling like a chore, plus the entirely 2D thing wasn't really lucrative when I'm the one doing the 2D artwork. I've really switch focus from modeling (which eventually I still do want to get better at) to game dev and animation. I'm currently the animator working on an upcoming survival/adventure game called Elyot and the Island of Pongo, doing all the creature animations and the few required human animations.

As far as personal projects go, I'm currently soloing a new one which I WILL FINISH this time no matter what. I'm really interested in this idea I have and want to see it through. It will be a simplified naval strategy game for android to begin with, possibly for iOS and the web as well if it's well-received. The gist of the game is that you will control a fleet of ships charged with either eliminating an enemy fleet or, more commonly, capturing an island by deploying marines onto it. Most missions will involve ship-to-ship combat as well as the necessity to support your autonomous marines on the island with coastal bombardments as they capture control points.

Controls will be simple: drag your finger/mouse to plot a path for each ship to follow, or drag it to an enemy to have them engage it. Visually, there will be mostly solid colors, slightly Tron-like, but not quite holographic. It will look more like a virtual simulation than real textured objects.

Ship with movement path plotted.
As of today I've worked on it for a few days. I've generated some ocean textures, set up a grid overlay, modeled a ship to test with, and tonight nearly finalized the major script which will manage pretty much all of the input and path-waypoint generation for the ships. It's only 234 lines so far but definitely the most complicated script I've written yet in Unity. Next I work on movement and getting the ships to follow those paths.

Monday, May 21, 2012

Another couple months, and yet another project. Skipping from one thing to the next. The top-down action game is on hold pending more people on the team and more importantly more skill from the people currently on it, myself included of course. Last night was a brief discussion that was basically about needing to work on something, anything, regardless of how complete it gets or if we attempt to publish it. After a few concepts we decided on doing a 2D side-scrolling submarine game. In this game, the player will move the submarine to avoid large rocks on the ocean bed and depth charges being dropped by enemy destroyers above, while also firing torpedoes to destroy enemy subs blocking the path.

A day of work on my part has yielded some decent results. I have a concept down for a general idea of what the game may look like, and also a playable version of just the scrolling background and submarine movement, teaching myself to use Javascript to do so :)

We'll first of course be trying to make this for PC/web but if we like it we will definitely try to publish it onto the Android marketplace aka "Google Play" now.


Unfortunately I can't figure out how to link the web player demo onto here so the concept will suffice for now.

Friday, March 2, 2012

Back to Work

Man, 3 months since my last entry! Winter Break, Skyrim, Shogun 2, Bastion... lots of time-killing going on. I did manage to teach myself some more about web design though, and became more acquainted with creating sites solely through code with HTML and CSS, even learned the Joomla content management system and made a test template for it!

Soon I'll have to put up an entry on web design stuff, but for now... it's back to work with 3ds Max and Photoshop, and also now... Unity 3D! I've mustered together a couple friends to work on a super-duper top-secret eyes-only videogame. As its stands its just me for asset modeling and texturing so I'll have my hands full with stuff to practice on now. So far I've made some "Stone Ruines" set pieces, was pretty fun. Got a couple different size walls with damaged versions, archways, bridges, columns, pedestals, decals... the works.
Stone Ruins Assets in Unity 3D


We're still working on the proof of concept stage so we're figuring out an art style but I've become quite fond of the "Cutout" filter in Photoshop. It's almost like a cartoony posterization.

Cutout Filter Before > After
Aside from modeling, the texture work has gotten me reacquainted with the clone stamp tool and the healing brush, for making seamless/tiled textures. I must have done this to 10 images last night but here's one that stands out the most.

Seam Removal Example

Just today I decided to try my hand at concept art for the first time ever. Put some light logic skills that hadn't seen daylight in a while to work. Here's the result, some ideas for health pickups (yea, some of the colors don't go together, was just throwing in variation).
Health Pickup Concepts
So hopefully now that I'll be in max and Photoshop quite often from now on, I'll get around to finishing some other higher-quality models and eventually putting them up here. But at least I'll have stuff to start posting on here again.