Saturday, October 18, 2014

Confused Development Musings: OMG A GUN

I've added a gun.

The model isn't final, it's just a placeholder.  Although for a first attempt at modeling a gun by someone who isn't very good at blender, I'd say it isn't half bad.  Right?  Right?  Ehh...

It sounds kind of silly, but as a big FPS fan, it was really gratifying to start the game up and see a gun model on my screen having dynamic shadows cast on it, like I've seen in countless other games.  Except now, it's in MY game!  I know, it seems like a silly thing...

It took me a long time to actually get all issues associated with the gun sorted out, though.  As alluded to above, I immediately had my heart set on seeing dynamic shadows on the gun.  However, it turns out that Unity doesn't allow shadows to be cast on different layers, and unless the gun is rendered by a different camera on a different layer, it will clip through other objects in a most unprofessional way.  Rather than giving up the dynamic shadows, I decided to code a system to hide the gun whenever it encountered a solid object.  This seemed simple enough, but turned out to be quite the can of worms, as the player object kept colliding with the gun itself, causing all sorts of issues.

Currently, the aiming is a little unusual, in that the gun actually moves faster than the camera.  I really like how this feels.  It gives you the sense that you're actually moving the gun around, but it isn't nearly as clunky as the free gun movement seen in games like Operation Flashpoint.

So... why is there a gun in this game?  Well, because I usually start building games based on vague, nebulous ideas, and the vague nebulous idea for this game involves exploring a remote woodland area with a firearm :P. 

I think the new art style would really lend itself well to abstractly terrifying enemy designs, as well.  Part of the reason I decided to go with this art style is that it leaves a lot of the visuals to the imagination, and can make otherwise normal objects look strange and incomprehensible.  I love the idea of enemies that are basically just visual impressions of something or another.  Which is probably good, since I have no experience animating, and (as mentioned above) very little Blender skill.

Don't take this to mean that it's going to be an action game.  Shooting is probably just going to be a small part of the game, and enemy will be treated as setpieces rather than filler.