Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 10:18:51 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsStranger on the 103rd Floor
Pages: 1 ... 4 5 [6]
Print
Author Topic: Stranger on the 103rd Floor  (Read 17516 times)
Paul
Level 1
*


View Profile
« Reply #100 on: July 18, 2015, 02:32:08 AM »

I've been a bit all over the place the last few weeks, redoing the enemy AI, getting back into drawing, and playing around with some of the visual effects in the game

I'll do a proper post on the AI another time, but I was working on their routine paths; giving them more movement while still keeping it simple. As the floor is destructible they have to dynamically set their own paths based on the platforms around them. They can now go down and up a tile if they see the opportunity, or jump over existing gaps



I also had a little play around with the shaders I was using on the smoke



Finally, I got into digital art, using my little brothers tablet. It's a work in progress, but this is the main character concept

« Last Edit: October 19, 2015, 05:10:52 AM by Paul » Logged
Satori4
Level 2
**



View Profile WWW
« Reply #101 on: July 18, 2015, 03:17:40 AM »

really good work! tracking!

the smoke looks way better with the new shader Hand Thumbs Up Right
Logged

@satori4
Paul
Level 1
*


View Profile
« Reply #102 on: July 20, 2015, 02:33:45 AM »

@Satori4 Thanks!

I actually created a tutorial on how to create that smoke effect. It's much simpler than it looks, so if you're interested in the full version (with better formatting  Smiley) you can find it here, but below is a slightly abridged version:

Software used: Unity & Blender, Assets: Toony Colours Pro

Blender

Firstly I created a a simple cloud model in Blender. I did this by creating some low poly spheres and rearranging and sizing them until I found a shape I liked. If you’re new to Blender, you may find this task a bit awkward as it’s not the most beginner friendly program but here are some steps to help

First open Blender, where you should be presented with the basic cube, lamp and camera. We’ll need to delete these, so select each of them and press X, then delete


Next add an ico sphere. The number of subdivisions can be changed in the left hand side menu depending on the detail you want in the smoke clouds. The sphere can be moved around the screen using the x/y/z axis arrows or freehand (I like to use the arrows as it gives me more control). Pressing Ctrl-Alt-Q will split the screen into orthographic views which I find super helpful for positioning as it’s easier to see multiple objects relative to each other


For this particular smoke effect, I created multiple ico spheres and grouped them into a cluster similar to the one below. Multiple objects can be joined together into one by highlighting the objects and pressing Ctrl-J (this is optional in this example). Also depending on what style you’re going for you can apply smooth shading to the ico spheres so their surface appears rounded rather than flat. To do this highlight all the vertices while in edit mode, press W and select “Shade Smooth”. Then save the smoke as a .blend file and you’re done!


Unity

The resulting .blend file can then be dropped into your Unity project. Create a new material and add it to the Blender model before applying Toony Colours Pro shaders. There’s tonnes of different ways you can shade the object but I chose a very simple no shadow set-up with an outline to achieve my affect. I’d advise you to experiment and come up with something unique as it’s easy to do and can make a big difference to the look.


Below are my settings for the shader, keeping it super simple (As I’m not using the full potential of Toony Colours Pro here, you could probably write your own shader to do the same, but I’m no shader expert and using the asset worked perfectly for me)


Now that the model is done, we move onto the scripting needed to create that billowing effect. First create a script which instantiates a new smoke particle at a fixed interval of time called “Emitter” and attached it to a game object. It’s a super simple timer based emitter, but I created this first so it’s easier to test and see the effects of the smoke particle behaviour later. A low time interval is needed to create a thick smoke effect

Code:
using UnityEngine;
using System.Collections;
 
public class Emitter : MonoBehaviour
{
   public GameObject Emitted;
 
   [Range(0.0f, 10.0f)]
   public float TimeDelay;
   float Count;
 
   void Update ()
   {
      Count -= Time.deltaTime;
 
      if (Count <= 0) {
         GameObject _emit = Instantiate (Emitted, transform.position, transform.rotation) as GameObject;
         Count = TimeDelay;
      }
   }
}

Next I created the “SmokeParticleBehaviour” script, which is where all the work is done. This script is attached to a game object containing a Rigidbody2D and the Smoke Particle model, created earlier (In my case the model is a child object of the Smoke_Particle).


One of the most important aspects of the script is the animation curve. Animation curves allow you to manually define a curve in the inspector, and evaluate the y-axis according to the x-axis input. For example, for this application, the x-axis will be the time the smoke particle has been active, and the y-axis will be the scale of the object, so once it’s instantiated,  as the x axis value gets higher, the scale (which is based on the y-axis), will grow larger and smaller according to the curve we create. Keyframes can be added to give you more control over the shape of the curve by right clicking and selecting “Add Key”


If you’re not familiar with animation curves there is a more in depth tutorial on them here.

First a number of variables need to be declared. These include:
ScaleSize: public animation curve which can be manually set
LifeTime: public float to say how long the the smoke particle will stay active for before being destroyed
Counter: float to count how long the smoke particle has been active
RB: The Rigidbody2D component of the object

In the Start method, the rigidbody which is attached is found and some of the variables are set with a random element so the particles aren’t too uniform. The scale is also set 0.

In the Update method, the Counter records how long the smoke particle has been active for. As our animation curves x-axis is set to between 0 and 1, by dividing the Counter value by the LifeTime variable we can get the relative position on the x-axis of the ScaleSize graph. Then by using ScaleSize.Evaluate, we can get the related position on the y-axis and use it as the new scale for the smoke particle.

Finally, once the Counter reaches the LifeTime length that was previously set, the gameobject destroys itself

Below is this simplified version of the script

Code:
using UnityEngine;
using System.Collections;
 
public class SmokeParticleBehaviour : MonoBehaviour
{
   public AnimationCurve ScaleSize;
   public float LifeTime = 2.6f;
   float Counter = 0;
   Rigidbody2D RB;
 
   void Start()
   {
      RB = GetComponent<Rigidbody2D>();
      RB.gravityScale = Random.Range(-.5f, -.6f);
      RB.AddForce(Vector2.right * Random.Range(-10, 10));
      transform.localScale = new Vector2(0,0);
   }
 
   void Update()
   {
      Counter += Time.deltaTime;
      float Scale = ScaleSize.Evaluate(Counter / LifeTime);
      transform.localScale = new Vector3(Scale, Scale, Scale);
 
      if (Counter >= LifeTime)
         Destroy(gameObject);
 
   }
}

I’ve left out a few details from the script for simplicity but they should be easy to fill in. This includes rotation of the gameobject as it rises (this can be done as a constant rotation or with another animation curve) and also a slight offset to the left and the right as it rises to make it seem more natural (this is done above with a small addForce to either the left or the right on starting but can be changed to another method  or applied as it rises). How you want to do this and how much randomness you put in each function is up to you
Logged
Satori4
Level 2
**



View Profile WWW
« Reply #103 on: July 20, 2015, 01:21:07 PM »

thanks for the tutorial! I suspected it was mesh-based smoke, because of the solid outline around the edges, but it works so good in orthographic perspective as if it was a hand-drown 2d sprite
Logged

@satori4
arrebeat
Level 0
**


Game Designer/Composer/Sound Designer


View Profile WWW
« Reply #104 on: July 20, 2015, 08:24:23 PM »

Great to have you back! And the new smoke is looking sick!
Logged

I make the stuff you hear when playing games! Shazam!

YouTube
SoundCloud
Tumblr
Paul
Level 1
*


View Profile
« Reply #105 on: October 19, 2015, 05:09:57 AM »

Long time since my last post on here! I've been working on the game slowly but steadily over the past few months. Time has been spent mainly reworking some of the systems to make them tighter and more reliable, as well as interact with each other more.

As it's a stealth game with heavy focus on gadgets, and in particular, the customizing of gadgets to suit the situation, I've been creating level sections to take full advantage of this. Below is a simple example of this type of gameplay. The player customises a stun grenade and a EMP, with a timer and sticky (The objects now stick to walls and only detonate when the timer reaches zero). Using the linking tool, the player can make these items dependent on each other, so the EMP will only work once the stun grenade has detonated. This allows the player to create a chain reaction type event and time the EMP to go off once the enemy is stunned. The effects of both the stun and the EMP are just a few seconds, meaning you have to act fast once it starts. At the minute the timer starts to run straight away, but I might adjust this so that the timer only runs when the Link tool has been disabled



A clearer example of how it works:


(Just noticed that weird bug in his legs at the end!)


While I'm still not decided on the look of the game, I've been playing around with different things on the visual side, and changed the enemy model completely and added some new explosion effects





« Last Edit: October 19, 2015, 05:16:49 AM by Paul » Logged
Xonatron
Level 4
****


Be yourself.


View Profile WWW
« Reply #106 on: October 19, 2015, 06:33:11 AM »

Has a retro Mission Impossible feel to it. I like it.
Logged

Matthew Doucette, Xona Games
- devlogs: xona.com/tigsource
Paul
Level 1
*


View Profile
« Reply #107 on: October 22, 2015, 08:31:02 AM »

Has a retro Mission Impossible feel to it. I like it.
Cool, I do love old heist/spy movies!

Great to have you back! And the new smoke is looking sick!
Thanks! Still playing with new ideas, but I'm much happier with the game now than to a few months ago

thanks for the tutorial! I suspected it was mesh-based smoke, because of the solid outline around the edges, but it works so good in orthographic perspective as if it was a hand-drown 2d sprite
No problem, I'll try write more when I have something interesting to share!
Logged
Nathan (@nathanenglert)
Level 0
***


twitter.com/nathanenglert


View Profile WWW
« Reply #108 on: October 22, 2015, 08:59:18 AM »

Those explosions and smoke effects are so awesome.. nice work.
Logged

Mixer
Level 1
*


I've never really known what to put here.


View Profile WWW
« Reply #109 on: November 02, 2015, 02:38:42 PM »

I am loving the direction this is going with graphics, the explosions, models, everything, it looks really consistent and solid.  Gentleman
Logged

My twitter is @5Mixer.
I'm currently making a dungeon game, check it out :D
https://forums.tigsource.com/index.php?topic=59139.0
wirelessbrain55
Level 0
**


View Profile
« Reply #110 on: December 30, 2015, 06:32:59 PM »

Are you still working on it?
Logged
Christian
Level 10
*****



View Profile WWW
« Reply #111 on: December 30, 2015, 06:56:00 PM »

Are you still working on it?
He is

From November/December
https://pbs.twimg.com/tweet_video/CWsG0ELWUAAfDnM.mp4
https://pbs.twimg.com/tweet_video/CU5S6jRWwAExhcn.mp4
Logged

Visit Indie Game Enthusiast or follow me @IG_Enthusiast to learn about the best new and upcoming indie games!
mirrorfish
Level 1
*


?!?! ... It's just a box.


View Profile WWW
« Reply #112 on: December 30, 2015, 07:27:40 PM »

Man, dripping with style dude, and I love the combinatorial mechanics. I'm sure that will lead to some really interesting emergent stuff. Great work.
Logged

Paul
Level 1
*


View Profile
« Reply #113 on: December 31, 2015, 10:19:14 AM »

Thanks for the comments all! Sorry if progress seems quite slow, I'm amazed at how fast some people on this forum can work! This is my first game so there is a lot of iterating the mechanics to see what works and how to best implement the ideas. Because of this, I've been neglecting the visual side of development until I get the gameplay at a more solid level, hence the lack of images and gifs! So far I've solidified the AI and items, added environmental features (Steam from pipes, electrical wires and alarms), created a grapple hook and a new radial menu. For the immediate future I'm going to focus on fixing up some remaining bugs, then onto level creation and gameplay balancing, before finally going back to the visuals

Below is a gif of the effects of a few of the items on the enemy, some of the animations and particle effects are incomplete at the minute so consider it a WIP!

Logged
wirelessbrain55
Level 0
**


View Profile
« Reply #114 on: December 31, 2015, 04:18:24 PM »

Do you have a Time frame in which you think you might be able to release a demo and the whole game because I really like the concept and it looks very good.
Logged
Paul
Level 1
*


View Profile
« Reply #115 on: December 31, 2015, 04:38:37 PM »

Do you have a Time frame in which you think you might be able to release a demo and the whole game because I really like the concept and it looks very good.

I don't have a very concrete timeframe, but I'm hoping to have it completed by next June/July, and have a demo out for playtesting by February. I want the demo to be relatively substantial so I can get a lot of feedback from it, and improve upon the game as much as possible in the months after that. Hope that helps!
Logged
bitbeast
Level 0
**


View Profile WWW
« Reply #116 on: January 01, 2016, 04:59:37 AM »

I just discovered this, it is looking great. Really an inspiration since I'm new to Unity and working on my first project, too. I like the style and what you can do so far, espacially the ropes and this cone of sight are very neat.

Keep up the good work!
Logged

Pages: 1 ... 4 5 [6]
Print
Jump to:  

Theme orange-lt created by panic