Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Games WIP Small Works Game / Programming Thread

Discussion in 'Projects In Progress' started by Tim-C, Aug 6, 2012.

  1. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    WIP Combat Vehicle AI

    fire_aim3.PNG
     
    the_Bad_Brad and Antypodish like this.
  2. iamvideep

    iamvideep

    Joined:
    Oct 27, 2017
    Posts:
    118
    Hello everyone, I just started with writing geometry shaders. The concept is to create enhanced hair sim shaders going further which would be open to contributions. My approach is to go step by step. Here in this post I would like to display a shader which adds spikes during run time. Latest update is that I have added shadows. Please view the image attached as a reference.

    Anyone with a github account can feel free to contribute here:
    https://github.com/theMaxscriptGuy/Unity_Dev-BasicGeometryShaders

    Next Up:
    1) Adding lighting module
    2) Adding support for physics simulations
    3) optimizations

    Please do comment on this post!
    Cheers!
     

    Attached Files:

  3. Enixoid_v2

    Enixoid_v2

    Joined:
    Mar 11, 2014
    Posts:
    49
    D.O.C. tps gameplay:



     
    Last edited: Nov 25, 2018
  4. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Tank Track Physics! (WIP)

     
    mgsvevo likes this.
  5. Ordnas006

    Ordnas006

    Joined:
    Jun 5, 2016
    Posts:
    53
    My last prototype is now playable (link in the video description):

     
    TylerCode_ and RavenOfCode like this.
  6. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    My next RTS game start to be really cool to play, and I am still using only 1 cpu core for all movements and Unity5.
    I am learning how to use job system in Unity 2018, I hope to reach 2000 Vs 2000 units on Mobile.

     
    nothingAD, John3D, TylerCode_ and 5 others like this.
  7. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    I started a small side project that I will be working on now and then to get my mind of my main project.
    This game is an Alien Invasion Game, but where you are the alien.

    world.PNG

    Video of me destroying the planet:
     
    Last edited: Dec 31, 2018
  8. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Deploying Space Minions

     
  9. dreg_master

    dreg_master

    Joined:
    Jan 4, 2016
    Posts:
    44
    Nice, I like the style.
     
    Vanamerax likes this.
  10. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Tank Treadmill Physics Test 1 - Tank Drop

     
    John3D and Antypodish like this.
  11. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Hey everybody! I recently created a (very) simple FPS game and published a free demo, I'd love some feedback on the game, bug reports and other things like that! If you would be willing to download the (free) demo and send me a review via e-mail or the unity forums it would be greatly appreciated!
    Thanks, Phantom Programming

    Demo link: https://gamejolt.com/games/TitanCore/388189
     
    Last edited: Jan 16, 2019
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,744
    I really suggest you take away your email, or you say welcome to spam bots ;)
     
  13. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Just thought about that. :p
    Are you interested in testing my game out or no? Either way is fine, no pressure. ;)
     
  14. TylerCode_

    TylerCode_

    Joined:
    Sep 8, 2010
    Posts:
    221
    I tried it out, made it to Forest II (which I feel is nearly unplayable).

    Overall it's good for something simple.

    The Good:
    - There are more than just one enemy type
    - Bullets are projectiles so you can bounce them off stuff (especially rocks, which made some funny moments, like me killing myself)
    - Variety in levels
    - Consistent Styling

    The Bad:
    - The forest levels are entirely too dark (which I know is the point, but) they need some ambient light in order to be playable. I made it through the first forest level by abusing some things below but II was far too hard with the bobcats
    - The collection distance of the chips, sometimes I would run past one and it wouldn't count even though I was sure I touched it.
    - Self damage (It really only screwed me in the small chip room on hanger because there would be a small pool of bullets on the floor that would touch me and kill me)

    The Ugly (Bugs or other things I broke):
    - Try and make collisions or collision geometry thicker. I was able to abuse the heck out of that and phase through almost every wall if I tried hard enough. (Village is a piece of cake if you do that) It also lets you stick the gun through a wall (especially on hanger) and just shoot everything through the wall even if they can't get you.
    - With the collision stuff, try to make the player's rigidbody set to continuous. Another thing I abused was pushing myself into other objects and just flinging myself into the air. It's how I got through the forest I, I just shot myself into the air and landed on the various chips.
     
  15. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Thanks a bunch for the review!
    Okay, so the player's rigidbody being set to continuous would help?
    Also, how would I make the collision thicker?
     
    TylerCode_ likes this.
  16. TylerCode_

    TylerCode_

    Joined:
    Sep 8, 2010
    Posts:
    221
    Not sure if this is the thread to go into further detail so I'll PM you as well but just real quick for anyone that sees it; setting collision to Continuous on the player should help both problems. If you're on 2018.3, Continuous Speculative was added as well so you could try that.
     
  17. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,744
    Pure ECS Octree WIP testing.

     
  18. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,744
    I don't know, but I always somehow was fascinated, with tank tracks how they work ;)

    Why wont you create your own WIP thread, if you don't have yet? You could collect your feedback there. Would be easier to find such for yourself later. And keep updated.
     
    SkyYurt and TylerCode_ like this.
  19. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
  20. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,744
  21. KrzysztofBidzinski

    KrzysztofBidzinski

    Joined:
    Mar 23, 2017
    Posts:
    51
    Just started it few days ago. I think everybody knows what it's it :)



    ... and some more....

     
    Last edited: Jan 26, 2019
    tylerguitar75 and eaque like this.
  22. KrzysztofBidzinski

    KrzysztofBidzinski

    Joined:
    Mar 23, 2017
    Posts:
    51
    use perlin noise.
     
  23. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    That looks nice!
    The fps looks iffy, maybe that's just the video though.
     
  24. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Any thoughts on this?

     
    RavenOfCode likes this.
  25. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    It looks interesting, but it seems to lack any juiciness. I personally believe the core of any action game is the feel. You want to make the player enjoy simply shooting their gun or swinging their sword, regardless if there is anything there to hit or not. While this game looks like it has a lot of mechanics (enemies, levels, etc.) it seems to lack that juicy feeling in the players actions (things like recoil animations, screenshake, sounds fx, etc.).

    It has potential but definitely needs some polish!
     
    Slaghton likes this.
  26. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61

    Thanks for your thoughts!
    I added a screen shake to a boss fight later in the game, the recoil is a good idea.
     
    RavenOfCode likes this.
  27. Dag-Tholander

    Dag-Tholander

    Joined:
    Jul 16, 2014
    Posts:
    90
    upload_2019-1-30_16-45-8.png
    (WIP) Screenshot from my infinite minecraft-style terrain, generated by layering perlin noise. Supports caves, overhangs etc.
     
    RavenOfCode likes this.
  28. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    [WIP]
    As I've said earlier I'm working on a battle simulator and I'm wondering if there's a way to optimize my game to support more AI agents. Any thoughts?

    Here's the link to test out the game if needed:
    https://gamejolt.com/games/BattleSimulatorBeta/391319

    Here's the AI locate code:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.AI;
    5.  
    6.  
    7.  
    8. public class AILocate : MonoBehaviour
    9. {
    10.  
    11.  
    12.     public LayerMask detectionLayer;
    13.     private Transform myTransfom;
    14.     public NavMeshAgent myagent;
    15.     private Collider[] hitColliders;
    16.     private float checkRate;
    17.     private float nextCheck;
    18.     public float detectionRadius = 180;
    19.     public bool moving = false;
    20.     public float extraRotationSpeed;
    21.  
    22.  
    23.  
    24.  
    25.  
    26.     // Start is called before the first frame update
    27.     void Start()
    28.     {
    29.         myagent.enabled = true;
    30.         sir();
    31.     }
    32.    
    33.  
    34.  
    35.  
    36.     // Update is called once per frame
    37.     void Update()
    38.     {
    39.             CheckIfInRange();
    40.             //extraRotation();
    41.  
    42.     }
    43.  
    44.     void extraRotation()
    45.     {
    46.         Vector3 lookrotation = myagent.steeringTarget - transform.position;
    47.         transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(lookrotation), extraRotationSpeed * Time.deltaTime);
    48.  
    49.     }
    50.  
    51.     void sir()
    52.         {
    53.             myTransfom = transform;
    54.             myagent = GetComponent<NavMeshAgent>();
    55.             checkRate = Random.Range(1.2f, 10.2f);
    56.         }
    57.  
    58.         void CheckIfInRange()
    59.         {
    60.             if (Time.time > nextCheck && myagent.enabled == true)
    61.             {
    62.                 nextCheck = Time.time + checkRate;
    63.  
    64.  
    65.                 hitColliders = Physics.OverlapSphere(myTransfom.position, detectionRadius, detectionLayer);
    66.                
    67.  
    68.             if (hitColliders.Length > 0)
    69.                 {
    70.                 myagent.SetDestination(hitColliders[Random.Range(0, hitColliders.Length - 1)].transform.position);
    71.                     moving = true;
    72.  
    73.             }
    74.             else { moving = false; }
    75.  
    76.             }
    77.         }
    78.  
    79.  
    80. }
    81.  
     
  29. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    You check the range only 1.2-10.2 seconds :eek:
    It's already very slow.

    In my game Clash on the Moon RTS, I can handle 2000 vs 2000 units .
    You have to stop to use Physics components, and calculate the distance in a separate Thread, or use the new ECS system
     
  30. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Sorry I changed that line back to 0.2 - 1.8

    How would I go about that?
     
  31. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    Google it.
     
  32. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    @RavenOfCode
    I've done that a bunch, that's why I posted here.
    I even asked a game developer, he said to use LODS, which I'm trying now, is there a way to tell how far the camera is from an object?
     
  33. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    First google result about LOD's in Unity.

    Also LODs are only going to improve graphical performance, which is probably not the only issue with large scale AI agents. ECS would be useful in helping if you want massive numbers of units.

    We're all game developers here bud lol
     
  34. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    @RavenOfCode

    Sorry, by game developer I meant somebody who published a game with the same type of AI.
    I'll look into the ECS, thanks!
     
    RavenOfCode likes this.
  35. Deleted User

    Deleted User

    Guest

    Ace?..Me Too! Ace F-22 Dogfighter.
    we are on the exact same path,I will be using weather maker clouds..and working on new materials and terrains, maps, missions, and new flight physics.

    Your in the beginning of a long journey..good luck!
     
    RavenOfCode likes this.
  36. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    313
    RavenOfCode likes this.
  37. Dag-Tholander

    Dag-Tholander

    Joined:
    Jul 16, 2014
    Posts:
    90
    Working on a procedural terrain system. Right now it uses marching cubes and 2d/3d perlin noise to generate the terrain. I'm currently trying to find ways to optimize it and after that I'm gonna add vegetation, rocks, etc.
    current.png goal.png
    The pictures show how it looks currently and how I want it to look eventually.
     
    the_Bad_Brad likes this.
  38. Dag-Tholander

    Dag-Tholander

    Joined:
    Jul 16, 2014
    Posts:
    90
    If anyone's interested, I could upload a demo of it.
     
    dan_wipf likes this.
  39. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    313
    you’re making mesh terrain?
     
  40. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    Here's a couple of pictures from my medieval battle simulator, any thoughts or game name ideas?
    BSBR.PNG
    BSBR3.PNG
     

    Attached Files:

    RavenOfCode likes this.
  41. Dag-Tholander

    Dag-Tholander

    Joined:
    Jul 16, 2014
    Posts:
    90
    Correct. I generate terrain meshes in realtime on demand and then use triplanar texturing to texture them.
     
    dan_wipf likes this.
  42. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    313
    whats the plan with performance? a custom render engine? lik vegetation studio?
     
  43. Dag-Tholander

    Dag-Tholander

    Joined:
    Jul 16, 2014
    Posts:
    90
    I haven't thought about a custom render engine. For now I will focus on making the noise functions more optimized and hopefully I'll find some clever way to implement lods by using octrees or something.
     
    dan_wipf likes this.
  44. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Demonstrating how to make simple soldier AI in unity using the FSM (Finite-State Machine) technique.

     
    dan_wipf likes this.
  45. nothingAD

    nothingAD

    Joined:
    Dec 29, 2016
    Posts:
    18

    Awesome dude! RTS needs a revival! And maybe some ECS power ;) Great job.. looking forward to see more of your game.
     
  46. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    How did you manage this with high FPS? I have 500 AI agents in a scene and only crawl above 25FPS.
     
  47. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    313
    @Ph4nt0m8
    have a look here: it’s about having 10000 ai’s pathfinding


    might you have a look into unity jobs system => it’s a significant boost to most every mathematical calculation, comparison i’m just getting started for my Fence System with it. and it’s kind of amazing.

    short example => i do for one call about 10k / 20k vector3 distance comparisons and more...

    without jobs, i had to reduce the accuracy of the equations.

    With jobs i have up to 5 Times faster Results and no lags at all :)

    if intrested in a simple, quick reading tutorial about jobs, this is what i relied on: https://jacksondunstan.com/articles/4796
     
    ClaudiaTheDev likes this.
  48. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61
    I've seen that video, the jobs thing sounds interesting, I'll read that.
     
  49. PhantomProgramming

    PhantomProgramming

    Joined:
    Jan 16, 2019
    Posts:
    61

    Looks interesting, but super confusing. How would I implement that into this tracking code?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.AI;
    5.  
    6.  
    7.  
    8. public class AILocate : MonoBehaviour
    9. {
    10.  
    11.  
    12.     public LayerMask detectionLayer;
    13.     private Transform myTransfom;
    14.     public NavMeshAgent myagent;
    15.     private Collider[] hitColliders;
    16.     private float checkRate;
    17.     private float nextCheck;
    18.     public float detectionRadius = 180;
    19.     public bool moving = false;
    20.     public float extraRotationSpeed;
    21.     public float AI_Delay = 0.5f;
    22.  
    23.  
    24.  
    25.  
    26.  
    27.     // Start is called before the first frame update
    28.     void Start()
    29.     {
    30.         myagent.enabled = true;
    31.         sir();
    32.     }
    33.    
    34.  
    35.  
    36.  
    37.     // Update is called once per frame
    38.     void Update()
    39.     {
    40.            
    41.            
    42.  
    43.     }
    44.     void FixedUpdate()
    45.     {
    46.      
    47.         StartCoroutine("DelayEnemy");
    48.        
    49.         //CheckIfInRange();
    50.         myagent.enabled = true;
    51.      
    52.      
    53.     }
    54.  
    55.  
    56.     void sir()
    57.     {
    58.        myTransfom = transform;
    59.        myagent = GetComponent<NavMeshAgent>();
    60.        checkRate = Random.Range(0.2f, 0.5f);
    61.     }
    62.  
    63.     public IEnumerator DelayEnemy() {
    64.  
    65.         yield return new WaitForSeconds(Random.value * AI_Delay);
    66.         if (Time.time > nextCheck && myagent.enabled && myagent.pathPending == false)
    67.         {
    68.             nextCheck = Time.time + checkRate;
    69.  
    70.  
    71.             hitColliders = Physics.OverlapSphere(myTransfom.position, detectionRadius, detectionLayer);
    72.  
    73.  
    74.             if (hitColliders.Length > 0 && myagent.pathPending == false)
    75.             {
    76.                 myagent.destination = hitColliders[Random.Range(0, hitColliders.Length - 1)].transform.position;
    77.                 //myagent.SetDestination(hitColliders[Random.Range(0, hitColliders.Length - 1)].transform.position);
    78.                 moving = true;
    79.  
    80.             }
    81.             else { moving = false; }
    82.  
    83.  
    84.  
    85.  
    86.  
    87.  
    88.         }
    89.  
    90.     }
    91.  
    92. }
    93.  
     
  50. the_Bad_Brad

    the_Bad_Brad

    Joined:
    Nov 2, 2014
    Posts:
    278
    Solar Warden WIP
    A space shooter Android/iOS game inspired by Star Citizen. I am currently gathering ideas for the story. It features planetary and on-foot combat too on some missions when the player visits different bases on Mars to the floating cloud base on Jupiter.

     
    RavenOfCode likes this.