Search Unity

2.5D shmup template

Discussion in 'Assets and Asset Store' started by LuxUnity, May 22, 2017.

  1. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Andreas12345 likes this.
  2. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
  3. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    The new Shmup version (1.1.5) with Bézier Path Creator compatibility is ready in the asset store.

    Let's see if I guess correct: you put a spherical trigger collider (or in alternative a Vector3.Distance check) around the object that want to attract to the player ship, and when the ship enter in the collider, it trigger a move to position with the player as target.
     
    Andreas12345 likes this.
  4. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Thank You!
    i transform the position with the magnet script with Vector3 and the value of range, then it moves to the target(player) with given speed. The rest is in your code to pick it up.
     
  5. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    1 new Problem: When a powerUp spawns or another hidden object is in bullet view the bullet should go through and not collide with it?



    I change my Layers so:
    upload_2020-4-23_22-23-41.png
    Works a bit
     
    Last edited: Apr 23, 2020
  6. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi, the asset support two bonus behaviors: grab it when player ship collide against it and don't block bullets (left in this image), and grab it when you hit it with a shot, so it blocks bullets (right bonus in this image)

    You can select the behavior using a drop list in the bonus prefab
     
    Andreas12345 likes this.
  7. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Ok i understand.
    MayBe i have coded to much myself in :) But the base do a great job!
     
  8. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Once, more...
    When a bullet hit something, there should spawn some sparks, but even in the demo i see no sparks spawning.

    And i find no example for the Bezier Path.
    The Store shows me Version 1.1.5 but i dont get the option to update
     
  9. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    That is a garbage bug, I'll fix it soon.

    Be sure to download it with Unity 2019.3.7f1 or above, otherwise the asset store could give you an older version.
     
    Andreas12345 likes this.
  10. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Sounds Great!
    Ah got it, great improvement! The ship flying perfect and smooth! :) Thank you
     
  11. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Version 1.1.6 with sparks fix is online
     
    Andreas12345 likes this.
  12. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Works Great!
     
  13. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    How is the prewarm working? upload_2020-4-28_17-4-16.png

    I have the problem when i not prewarm 5000 bullets, it shoots in Main Emitters L1 only from emitter b after 1 seconds. The time can increased when set the prewarm extreme, how is it working?
     
  14. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Prewarm mean that, instead of instantiate a bullet when it is shot, the bullets are all instantiate at once at the start of the scene and then just recycle them later; this because instantiate thing is expensive expensive.
    Ideally your prewarm value should be close to the number of the bullets of the same type that you expect to have at on screen at the same time, but not more. If you prewarm too little bullet, it will instantiate more on the fly, but because the fast pacing of the shots, it could happen that the instantiating miss some beat until it have created enough bullets.
    If you need to instantiate really a lot of bullet at the start, maybe you could play some little animation in order to give some time and hide the instancing loop work.
     
  15. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    i dont think thats my problem. My Fire rate is 0.5. thats weird a bit
    I let the prewarm on 5000, looks like it dont drops any fps
     
    Last edited: Apr 28, 2020
  16. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Ok, I find a clue about where the problem is. I'll give you some info when I solve it.
     
  17. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Solved: just after a bonus upgrade the first new shot was reassigning two time the same bullet instead of use two different bullets. Fix will be online soon.
     
    Andreas12345 likes this.
  18. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Great Support!
    Do you think for the future a system is possible to take over weapons, power ups to the next level?
    A system like in sky force.

    *Primary Fire works now how you describe it!
    Thank You
     
    Last edited: Apr 30, 2020
  19. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    In the next version it will be possible setting as "true" the unity event of the start button (CavasMenu > StartMenu > Container > ButtonStart)
     
    Andreas12345 likes this.
  20. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    What i ve done so far with some modifications.
    Need some bug fixing, and improvements, but i am satisfied so far:
     
    LuxUnity likes this.
  21. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  22. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Its me *again :)

    It is possible to get a simple boss? Without animations, or only 1 animation. In my opinion the boss is really complex and hard to replace with a random model
     
  23. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    SOLVED was wrong Layer!

    hmmm. my explosions are not spawning anymore after the last update. I have added an explosions object but its not spawning, but it works before the last update
     
    Last edited: May 8, 2020
  24. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Next update will have a minimal boss example scene.
     
    Andreas12345 likes this.
  25. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Great!
    I see you have in the store a simple mobile menu, is it a bit compatible also for PC? I like to buy it.
     
  26. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Yes, it will work with a mouse input too.
     
  27. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Bought :)
     
  28. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Works great! Thank you!
     
  29. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    When i load a new Level the Time.timeScale = 0; not 1
    Need we to Set in SceneManager:
    Code (CSharp):
    1.  public void LoadSceneWhenWin()
    2.         {
    3.             SceneManager.LoadScene(sceneToLoadWhenWin);
    4.             Time.timeScale = 1;
    5.         }
    ?
     
  30. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    In the original project, the scene start with a menu open, so it start at Time.timeScale = 0;
    If you want to load a new scene that start to move immediately, you can change the code in that way, yes.
     
    Andreas12345 likes this.
  31. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    526
    Ah i understand! Makes sense :)
     
  32. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    hi I was looking for a shmup and came across your framework, was curious if it can support these and I'm looking to make a game for mobile
    - 3D perspective camera.
    I assume these are available
    - Pool manager.
    - Ground targets system.
    - A multiple stage boss system.
    - Screen or time triggers
    and how is the extensibility in case I want to extend by coding it
     
  33. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi,

    1- There is a Ground targets system, but it work only with isometric camera, because otherwise the collider position (that is on the same plane of the spacecraft) don't match the position of the ground target, that is bellow, due to perspective distortion.
    Instead if you don't have ground units, you can use a 3d perspective camera.

    2- Pool manager
    Yes, there is.

    3- A multiple stage boss system.
    If you mean a boss that change behavior when it is damaged, yes, play with the demo:
    https://aureusinteractive.github.io/Demo/shmup/index.html
    Instead if you mean an UI menu to select am unity stage to load and play, no, but stages are self-contained, so create an unity scene with an UI that trigger the load, is easy.

    4- The spawn of the enemy ships is made by time triggers, and the boss arrival by trigger collider

    5- The different enemies are all subclass of the same basic class, so create more enemies shouldn't be too complex.
     
    ash4640 likes this.
  34. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    ok cool thanks will check it
     
  35. Shark_Bowl_Games

    Shark_Bowl_Games

    Joined:
    Aug 3, 2017
    Posts:
    5
    Hi LuxUnity,

    Firstly I'd like to thank you so much for this amazing asset! It has saved us so much dev time! I'll be leaving a 5 star review :)

    I had a question regarding the boss die animation, I think ever since the May 8, 2020 update when the boss dies it gets destroyed and instantiates the dieExplsion effect but, doesn't play the die animation.

    It would be great if you could help us on this one.

    Thanks,
    SB Team :D
     
    LuxUnity likes this.
  36. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    I'm uploading a fix for that right now.
     
    Shark_Bowl_Games likes this.
  37. Shark_Bowl_Games

    Shark_Bowl_Games

    Joined:
    Aug 3, 2017
    Posts:
    5
    That's amazing, thank you!
     
  38. Shark_Bowl_Games

    Shark_Bowl_Games

    Joined:
    Aug 3, 2017
    Posts:
    5
    Hi LuxUnity,

    Did you get a chance to upload the fix?

    Many thanks,
    SB :)
     
  39. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  40. Shark_Bowl_Games

    Shark_Bowl_Games

    Joined:
    Aug 3, 2017
    Posts:
    5
  41. Mike891

    Mike891

    Joined:
    May 18, 2019
    Posts:
    23
    Is 3d version in your plans?
     
  42. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    If you mean something like Wing Commander, no.
     
  43. FachrulFadlyAspan

    FachrulFadlyAspan

    Joined:
    Dec 13, 2019
    Posts:
    3
    Hi,

    I Just bought this package, test it using Unity 2019.4.14f1 and got this error when import asset :

    Assets\shmup\EnemyEmitterBezier\EnemyEmitterBezier.cs(11,5): error CS0246: The type or namespace name 'PathCreation' could not be found (are you missing a using directive or an assembly reference?)

    Assets\shmup\EnemyEmitterBezier\EnemyBezierFollow.cs(20,29): error CS0246: The type or namespace name 'PathCreation' could not be found (are you missing a using directive or an assembly reference?)

    Assets\shmup\EnemyEmitterBezier\EnemyBezierFollow.cs(14,9): error CS0246: The type or namespace name 'PathCreation' could not be found (are you missing a using directive or an assembly reference?)

    Assets\shmup\EnemyEmitterBezier\EnemyBezierFollow.cs(15,9): error CS0246: The type or namespace name 'PathCreation' could not be found (are you missing a using directive or an assembly reference?)

    Any clue to solve this error?

    Thanks Anyway.
     
  44. FachrulFadlyAspan

    FachrulFadlyAspan

    Joined:
    Dec 13, 2019
    Posts:
    3
    Nevermind, after read all comment above i realized this package using Bézier Path Creator and i need to download it separately to avoid that error.
     
  45. FachrulFadlyAspan

    FachrulFadlyAspan

    Joined:
    Dec 13, 2019
    Posts:
    3
    Hi,

    I have another question about enemy bullet. Each enemy bullet hit allways kill player instanly rather than gradually reducing its hp. I try to tweak damage value of Bullet script form 1 into 0.1 or 0.001 (i find it applied in bullets prefabs) but it doesnt work. Did i miss something?
     
  46. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    The player dies as collides with something dangerous. In order to use hp instead, you need to:
    - open PlayerShip.cs
    - go to public void HitMe(), change it in public void HitMe(float damage)
    this will trigger some bugs, that will show you where put the damage to the player
    - and, always in HitMe, just before print("player lose a live") substract the damage from the player hp and add am if condition (hp <= 0) before that part of the code.
    - find all respawnAnimationOn = true, and just after these add the code to restore the full hp (because it is a new live)
     
    Last edited: Jan 2, 2021
  47. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
  48. trbkk

    trbkk

    Joined:
    Feb 7, 2022
    Posts:
    1
    hello,
    Just started to use your template and it is great.
    However I have question related to navigation. I do not want scrolling screen in my game, i'd rather put player in center and let him navigate through the map freely.
    I understand it's not matching idea of template, so i'm not asking to implement this, but can you just point me some directions where i need to move in dev process and things I need to take in consideration

    thanks in advance
     
  49. LuxUnity

    LuxUnity

    Joined:
    Sep 29, 2010
    Posts:
    717
    Hi!

    - Remove Follow Waypoints from SceneManager and MainPath
    This will disable the scrolling
    - adjust topViewBounds to your stage-map size
    - put Main Camera and bullets Camera as child of ship
    (Be sure that both cameras are exactly in the same position, or the render will be wrong)
    - open PlayerController.cs, find rb.velocity =... and change that with some tank-control code
     
  50. leomagomes

    leomagomes

    Joined:
    Sep 20, 2018
    Posts:
    2
    Hi, can you explain how to smooth the path with bezier path creator?