Jump to content
Sign in to follow this  
  • entries
    19
  • comments
    41
  • views
    23010

Missile Command, Part 1

Sign in to follow this  
ferrous

812 views

I'll follow this up with a more verbose post with pictures and links, but I figured I'd start things out.

So for the Missile Command challenge, I decided I wanted to try a couple of different things:

1. Drunk Missiles.  You know, those weird randomly spinning anime missiles from Macross / Robotech.

2. Use UniRX some more.

Now, the first one ended up causing lots of other design decisions.  First, to really be able to see a drunk missile, I needed 3D, and to best show off the drunken 3d spin, I decided I need a more cinematically placed camera.  My early experiments with 3d spinning in Unity, I quickly learned that the default spin rate on rigidbodies are incredibly low, and hidden behind a code only property.  I also found any tweaks to missile speed would have them behave rather unpredictably, either doing a very slow spin in a circle, or that my missiles were too drunk, and easily spun off and then back on camera again,  It's not much fun to lose a city because a missile spins off camera and then back on camera at the last moment.

Now, I knew going in, that I might have to scratch missiles as an interception mechanic, as drunk missiles would be too hard to intercept.  But it turns out, even doing a hit-scan raycast was difficult.  Partly because clicking directly on a spinning drunk missile is hard, and partly because, the spirit of missile command is causing chain reaction explosions to catch other missiles.  To that end, I wanted to be able to click anywhere.  and setup an explosion in advance.  But... how do you do that in 3d?  I ended up setting down a 3d Plane in between the missile spawner and the ctiyscape.  But my drunken missiles were so drunk, that there was little guarantee of them even meeting that plane at all.

The solution was to drop my first implementation of drunken missiles.  The second implementation is even hackier than what I had, but also much more predictable.  It involves two game objects.  One is the anchor, that is invisible, and moves right along that 3d Plane, and moves straight towards it's target (A city or a tower).  The second is the missile, which is attached to the anchor via a hingejoint.  It spins around the anchor via the motor property on the hingejoint.  I then play with the anchor distance as it gets closer to the target, eventually becoming zero, so that it converges with the anchor.  Viola -- Drunken missiles stay on the 3dplane, but still spin.  They're still a right pain to click on, but one can still click the plane, and set up chain explosions.

Now, for the interception mechanic, I probably could've settled for straight up clicking, but I've decided to try implementing lasers.  My first thought was a big beam, but I've since rethought it.  I've still got the three towers, and shoot from the nearest tower.  That makes planning where the beam will come from kind of a pain.  So now I'm thinking of the more traditional star wars blaster laser.  It'll still be fairly thick, to help catch drunken missiles in their spin.

(I'm still tempted to have all shots come from a single point, and the towers to just act like ammo containers.)

 

And I'm digging UniRX for it's event handling.  I'm not utilizing it to it's fullest though, and hacky code abounds as I don't have as much time as I'd like to polish things, but oh well.

Sign in to follow this  


1 Comment


Recommended Comments

Okay, I lied, life happened, not sure I'll make the January deadline (not that it matters all that much, I suppose).  I'll still try to get a link and some screenshots up when I get a chance.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By Rio Lloyd
      Hey all!
      we are a team of 3 looking for more members, 
      we are making an isometrical Survival RPG.
      we are looking For Members who can make low poly 3D artists who can do character models, environments, tools and more.
       
      if interested and want to know more email me at rioishere14@gmail.com
    • By nxrighthere
      BenchmarkNet is a console application for testing the reliable UDP networking solutions.
      Features:
      Asynchronous simulation of a large number of clients Stable under high loads Simple and flexible simulation setup Detailed session information Multi-process instances Supported networking libraries:
      ENet UNet LiteNetLib Lidgren MiniUDP Hazel Photon Neutrino DarkRift More information and source code on GitHub.
      You can find the latest benchmark results on the wiki page.
       
    • By trapazza
      I'm trying to add some details like grass, rocks, trees, etc. to my little procedurally-generated planet. The meshes for the terrain are created from a spherified cube which is split in chunks (chunked LOD).
      To do this I've wrote a geometry shader that takes a mesh as input and uses its vertex positions as locations where the patches of grass will be placed (as textured quads).
      For an infinite flat world (not spherical) I'd use the terrain mesh as input to the geometry shader, but I've found that this won't work well on a sphere, since the vertex density is not homogeneous across the surface.
      So the main question would be: How to create a point cloud for each terrain chunk whose points were equally distributed across the chunk?
      Note: I've seen some examples where these points are calculated from intersecting a massive rain of totally random perpendicular rays from above... but I found this solution overkill, to say the least.
      Another related question would be: Is there something better/faster than the geometry shader approach, maybe using compute shaders and instancing?
    • By FedGuard
      Hello all,
       
      I would like to start off with thanking you all for this community. Without fora like these to assist people the already hard journey to making an own game would be exponentially more difficult. Next I would like to apologize for the long post, in advance...
      I am contemplating making a game. There, now that's out of the way, maybe some further details might be handy.
      I am not some youngster (no offence) with dreams of breaking into the industry, I am 38, have a full-time job, a wife, kid and dog so I think I am not even considered indie? However I recently found myself with additional time on my hands and decided I would try my hand at making a game.Why? Well mostly because I would like to contribute something, also because I think I have a project worth making (and of course some extra income wouldn't hurt either to be honest). The first thing I realized was, I have absolutely no relevant skill or experience. Hmm; ok, never mind, we can overcome that, right?
      I have spent a few months "researching",meaning looking at YouTube channels, reading articles and fora. Needless to say, I am more confused now than when I started. I also bought some courses (Blender, Unity, C#) and set out to make my ideas more concrete.
      I quickly discovered, I am definitely not an artist... So I decided, though I do plan to continue learning the art side eventually, I would focus on the design and development phase first. The idea being, if it takes me a year or more solely learning stuff and taking courses without actually working on my game, I would become demoralized and the risk of quitting would increase.
      So I thought I would:
      1: Keep following the courses Unity and C# while starting on the actual game development as the courses and my knowledge progress.
      2: Acquire some artwork to help me get a connection with the game and main character, and have something to helm keep me motivated. (I already did some contacting and realized this will not be cheap...). Also try to have the main character model so I can use it to start testing the initial character and game mechanics. For this I have my first concrete question. I already learned that outsourcing this will easily run up in the high hundreds or thousands of dollars... (lowest offer so far being 220 USD) I am therefore playing with the idea of purchasing https://assetstore.unity.com/packages/3d/animations/medieval-animations-mega-pack-12141 with the intention of then have an artist alter and/or add to the animations (it is for a Roman character so some shield animations are not going to work the same way.). This way I could start  with the basic character mechanics. Is this a good idea, waste of money,...? Any suggestions? I then have a related but separate question. Is it a good idea to buy Playmaker (or some other similar software I haven't yet heard of like RPGAIO), and using this for initial build, then changing/adding code as the need arises?
      3.Get a playable initial level ready as a rough demo and then starting to look for artist for level design and character/prop creation.
      ...
       
      I would really appreciate some input from more experienced people, and especially answers to my questions. Of course any advice is extremely welcome.
    • By GameTop
      Dirt Bike Extreme - another game made with Unity. Took about 2 months to complete.
      Take part in extreme motorcycle races across the dangerous and challenging tracks. Dirt Bike Extreme is easy to pick up but hard to master. Race, jump and crash your way and other mad rivals through the amazing tracks as you master the skills and physics of motocross in this high-speed racing adventure. Conquer challenging routes on 23 different runs, discover new bikes and become the best of the best! Over 257K downloads already!
      Windows Version:
      https://www.gametop.com/download-free-games/dirt-bike-extreme/

      Mac Version:
      https://www.macstop.com/games/dirt-bike-extreme/
       

       


×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!