Monday, February 18, 2013

Short Break from NavTac, nDo and dDo

Well as the title states, I have been and am taking a short break from working on NavTac to put some time back into rigging and animation (my major which I'm currently wrapping up in school with this newly-started semester). Watching some Digital Tutors videos while practicing for projects I'll be doing this semester in school. Sometime this week I will probably start working on NavTac again though. I've far from lost interest in it, it's just the second priority right now.

Two days ago I did manage to try out the beta for dDo, from the guys who made the awesome normal-creation tools nDo and nDo2. dDO is more of a diffuse-texturing solution which lets you use color maps to quickly add lots of detail to your models. By color map I mean, you just make a diffuse texture for your model of straight solid colors, each color denoting a different material that your model should have, then you can use those as a sort of selective filter to add loads of customizable details and effects. Nothing someone can't do with Photoshop alone, but it does immensely speed up the process.

Tuesday, February 12, 2013

NavTac - Log #6

Well, I didn't post two days ago since I was having comp issues but I managed to get the target leading working appropriately, and also made a small block that will randomly determine where around the target the shot will land - or basically how inaccurate it is, a measurement that gets larger with more distance between the shooter and target.

Unfortunately 2 days ago my comp decided it had enough of this world, or at least parts of it did. And those parts happen to be the ones that matter - very sure either my motherboard or RAM went out... probably the motherboard, considering I tried each piece of ram individually and it still wouldn't even boot up to BIOS at least. So I went out and bought a new cpu/mobo/ram, just now reinstalling Unity as I type this up. Haven't worked on NavTac in a few days and I'd like to keep steady progress on this one, so maybe tonight I'll get around to doing some more... probably start figuring out how to achieve want I want to do with the islands in the game.

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.