Showing posts with label Cameras. Show all posts
Showing posts with label Cameras. Show all posts

Thursday, September 14, 2017

Update 50: Combat and 50!!

5 years and 50 posts later, here we are, still working through the combat mechanics. Amazingly, I'm still making regular progress. I think the keyword here is regular, there have definitely been some large gaps in progress.

However, the combat is proceeding along nicely. I've added projectiles and the destructive terrain back. I've added back the shoulder cam when you are aiming and choosing your target. The enemy and player are now dealing (and receiving) damage. I almost have a quasi game here. 

Here you can see the setup of the level, with the second (shoulder) camera ready



The view from the shoulder cam. The models really look low res here!

Boom!


 Before the shot...

"Missed", that is the end of that wall!


Here you can see the ray-cast passing through the enemy, it was a hit!


Next on the list is basic AI, it's time for the enemy to respond to your actions and try to defeat you. 

Sunday, October 13, 2013

Update 23: Alpha 1.6 - Lots of stuff finally released!

Alpha 1.6 has been released. This represents about 10 months of (part time) development, and is finally a little mini game. Admittedly a game without much depth, but still a game! Included in this release (since Alpha 1.5) are:

  • New cameras
  • Timing fixes all over
  • A very basic AI
  • New character models and animations
  • More dynamic explosions
  • Targeting indicators
  • More advanced stress testing
  • Links to the currently active test levels
  • And lots of little bug fixes


This is all pretty exciting to me, and I've started working on a story/theme for the next step, while I also add in some feature requests and refine some of the mechanics a little.

Try it out for yourself and let me know what you think!



Friday, October 11, 2013

Update 22: Alpha 1.59 - Cameras

I was so close to releasing Alpha 1.6, but at the last moment I had to postpone due to camera issues that forced me to spend an extra week rewriting the camera mechanics. I'm close, the camera now pans, rotates and zooms with just a few issues left on some of the camera position calculations for the AI.




It's all good though, the new characters look great and the AI is also progressing nicely. It's so close to a game now! I'm hoping to release Alpha 1.6 by Monday.





Wednesday, September 4, 2013

Update 16: Alpha 1.4: Throwing

In the last few Alpha releases, I've been focusing on stabilizing the camera and shooting mechanics. I feel much better about how it all looks, especially the camera movement, with all bugs around the camera now addressed.

Although I have a few timing issues with the shooting still to solve, I've moved on to the next type of attack, throwing grenades. I started by working through the physics and showing the trajectory. 

With the help of two very important links:

  1. Some excellent theory from the Castle Story: http://www.sauropodstudio.com/dev-diary-number-eight/
  2. A script to draw the line from Unity3D wiki: http://wiki.unity3d.com/index.php/Trajectory_Simulation

Using this, I was able to calculate the distance to the target, based on a fixed angle of 45 degrees: this meant that I can throw my grenade in a nice parabolic curve towards the target. 

Here are two screen shots showing this in action in my test level, with the red line replaced by a trail of smoke: 

Just before the grenade hits...


Just after the grenade hits...


When my grenade collides against my target, it 'explodes'. At the moment it's just an expanding red sphere - particle effects to come later. I use the Physics.OverlapSphere() function to look for items within a certain radius:

Collider[] hits = Physics.OverlapSphere(myProjectile.transform.position, explosionRadius);


If any of my collider hits are a player, I deal damage, but if it's destructible terrain, I use the AddExplosionForce() function like this:

//If destructible terrain was hit, destroy it
if (hit.collider.tag == "DestructibleTerrain") 
{
    //Add Rigidbody to terrain/wall
    hit.transform.gameObject.AddComponent<Rigidbody>();
    
    //Add explosive force at the point of the projectile impact
    hit.transform.rigidbody.AddExplosionForce(explosionForce, myProjectile.transform.position, explosionRadius);
}

This has two effects: it removes the destructible terrain from the explosion area, and it propels the same terrain across the map, which I think is pretty cool...

You can download version Alpha 1.4 here: http://www.samsmithnz.com/content/tbe/tbe_alpha1.4.zip.

Wednesday, June 26, 2013

Update 12: UnityVS - Adding Productivity

I've purchased my first tool to assist me in my game creation, UnityVS. This productivity tool will really help me with my debugging, enabling me to set breakpoints. With this, I should be able to move forward quickly


Here is a quick video of the camera I've been working on animating, transitioning between different states. 

Wednesday, March 27, 2013

Update 10: Updating the Camera

It became clear to me very quickly that my camera in the isometric view looked a little cheap. Looking at how XCOM implements their camera, I noticed that they did actually use a perspective view, but at an isometric height. Today I switched to a perspective view, which I think really improves things.




I also added a 'killcam', which is a camera directly behind my player. When I shoot at enemies, it now switches to the camera so that you can watch the kill shot and then back again. Pretty simple stuff really, but very effective.