Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Shmup Boss Support Thread

Discussion in 'Assets and Asset Store' started by EbalStudios, Dec 31, 2020.

  1. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    This is the support thread for Shmup Boss

    If you are a user of the first version (AKA Shmup Baby), this post also contains information regarding the changes to expect between the two versions.

    What is Shmup Boss
    Shmup Boss is a scrolling shooter template, it has been set up to work horizontally and vertically with both desktop and mobile. It contains many features that you'd expect to have in a scrolling shooter and it would make building and further developing your very own shmup a lot easier than starting from scratch.


    Features
    • Finite/Infinite levels
    • Pooling system
    • Background layering system
    • Behaviours and effects based on events
    • Global difficulty system
    • Main menu with settings and player select option
    • In level UI
    • Pooled bullets/missiles weapon system in addition to particle based weapons system
    • Pooled effects spawned and driven by agent events
    • Drops, pickups, upgrades
    • Multi-phased boss and enemy mines
    • Audio and animated effects library
    • All demos shown in the trailer are included in the pack
    To know the exact features in detail, you can always download and have a look at the documentation (It is attached at the end of this post)

    Please do not assume that a certain feature exists, there are a ton of features that can be potentially added to a template of this genre but our focus has been on creating a solid core for developers to expand upon, watch the video tutorials, read the documentation or ask any questions before making a purchase. Every shmup game has its very own unique perk or feature that distinguishes it from other games and we cannot add all the possible features but we hope this pack will give you a head start.

    Shmup Boss currently uses a 2D orthographic camera and not a 3D perspective camera.

    Video Tutorials
    https://youtube.com/playlist?list=PLh5hgaVhes-hOrN6nLHznnPSp6yLkHlJ-

    Documentation & Resources
    The manual is attached at the end of this post.

    Upgrading from the first version (AKA Shmup Baby)
    You will find attached at the end of this post a PDF ("Transitioning from Shmup Baby.pdf") containing all the changes between the first version (Shmup Baby) and the second version (Shmup Boss). It will help you know what to expect before making an upgrade and what features have changed.
     

    Attached Files:

    Last edited: Sep 20, 2022
  2. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Update
    Just uploaded Version 2.01 which improves the performance by changing the global difficulty system (multiplier), and also fixes a bug in the boss system. It should be online within a day or 2.
     
  3. megaark

    megaark

    Joined:
    Feb 23, 2020
    Posts:
    2
    Will this work with behavior designer ? and its addons ?
     
  4. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Shmup Boss is a complete standalone engine for creating scrolling shooters. It has its own complete pooling system, which means enemies, pickups, background, etc.. need to be spawned using its internal components. For a better idea you can view some of the video tutorials or documentation.

    I have not used Behavior Designer or PlayMaker so I cannot fully comment in what capacity you can use them.

    But to give everyone an idea on what to expect; for example:
    An enemy in Shmup Boss is spawned using a specific component, if you do not use that component and use some other engine's system; The pooling system will not be able to detect where the enemy was spawned from to be able to pool it, and the level completion mechanism might not be able to function properly.

    As with any system, you could probably use other engines, tools, etc.. as long as you are aware of all of the details on how they work.

    I personally do not recommend mixing other engines with Shmup Boss, I tried my best to write and document Shmup Boss' scripts in a way to make them easy to understand and expand upon and to have the core components you need for your scrolling shooter. Supporting compatibility with all the different engines and tools on the asset store is something well beyond my capacity.
     
  5. Heero888

    Heero888

    Joined:
    Jun 18, 2017
    Posts:
    48
    hey Ebal,

    I am still using Shmup baby now and have a simple question on that. I really want to upgrade to Shmup boss but it is hard to roll over my current project.

    I have a question on the Shot FX module. Currently attached it to a missile weapon game object and play a MissileFire audio each time it fires. It seems like the code would play the clip multiple times (without stopping the previous play) if the weapon is shooting too fast.

    Are you using .Play or .PlayOneShot somewhere in the code? The issue is that it generates too many audio counts when a weapon fires too fast and eventually mess up all audio. Is there a solution to this? Please see screen shots attached.

    Ideally the previous missile sound would stop as soon as the new missile sound is being played by the same weapon.

    I looked into ShotFX.cs and LevelAudioManage.cs with no luck.

    Thanks,
    Wai Fung

    Capture.PNG Capture2.PNG
     
  6. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Hi Wai Fung,
    I am not sure if the cool down effect is not what you need, but if you have a short firing clip sound and you use a cool down value of say 0.1, you should pretty much get a good firing sound effect for any high rate missile sound effect.

    Now technically the feature you are asking for is slightly different, you want the sound effect to stop playing once a new one is active instead of each effect playing until it ends or preventing new ones from sounding using the cool down. There are couple of workarounds without coding to do it, and you can do it code but they all involve some work.

    In Shmup Baby, I am using the PlayOneShot (In Shmup Boss I am using a pooled sound system).
    If you want to see how it works or make your own modifications, these are the scripts involved:

    Code (CSharp):
    1. Line 77 in ShotSFX.cs plays the clip using the level audio manager script which holds the shmup audio clip class
    2.  
    3.         private void PlayShot (ShmupEventArgs args)
    4.         {
    5.             if (_inCoolDown)
    6.                 return;
    7.  
    8.             ShotSound.PlayClip(null);
    9.  
    10.             StartCoroutine(CoolingDown());
    11.  
    12.         }
    13.  
    14. Line 40 in LevelAudioManager.cs plays the clip using the instance of the level audio manager:
    15.  
    16.         public void PlayClip(ShmupEventArgs args)
    17.         {
    18.             LevelAudioManager.Instance.PlayShmupClip(this);
    19.         }
    20.  
    21. And finally Line 228 in AudioManager.cs holds the PlayOneShot method
    22.  
    23.         public void PlayShmupClip(ShmupAudioCip clip)
    24.         {
    25.             if (SFXSource == null)
    26.                 return;
    27.  
    28.             if (clip.Clip != null)
    29.                 SFXSource.PlayOneShot(clip.Clip, clip.Volume);
    30.         }
    If you want to change it in code, you will have to make a separate method for playing weapon sound effects, that only plays one sound at a time.

    If without code, you have 2 convoluted workarounds:
    1-You can edit your sound effect to make it very short in any audio software like audacity. and if you want to hear the end of the sound effect, if you are using a player weapon you can use sound FX controller to add a sound effect on "weapon stop fire" event.
    2-Alternatively, in an audio software you can merge the sounds to make them like a machine gunfire sound, and in conjunction with the cool down timer you will get almost the effect you are after.

    But with all honesty, I am not sure if it's worth all the effort, the cool down feature should get you very close, if you must, you can change the sound effect as explained above to something faster. In Shmup Boss I have a feature for limiting sound effects being played at the same time, but it's applied globally and not to a single weapon.

    Just a very small note: for any future Shmup Baby support can we keep the posts at the other board: https://forum.unity.com/threads/shmup-baby.557059/
    Posting on Shmup Boss support thread might confuse any Shmup Boss users or potential customer. Xie Xie Wai Fung
     
  7. Heero888

    Heero888

    Joined:
    Jun 18, 2017
    Posts:
    48
    Capture3.PNG Capture3.PNG

    Thanks for the quick reply my Master. Sorry, i was not able to locate the old thread so i though you took it down. Thanks for the direction, I think i know what to do now. Line 228 in AudioManager.cs is exactly what i needed. I think i would just make 3-4 additional special SFXSources in AudioManger such that each one would play certain weapon and explosion clips exclusively, and then use SFXSources.Play() for these special sources. This should solve my issue I hope.

    Also, would I still need to pay to get Shmup Boss if I own Shmup baby? I see my review on the Shmup Boss page but it say I need to pay. So Shmup Boss is sold as an upgrade to Shmup baby? or it is an entire new product? I am confused.
     
  8. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Shmup Boss is entirely new in regards to the inner code, very few elements remain from Shmup Baby but in a way it still has similar features, to get a better idea you can watch the tutorials or read the documentation located at the first post in this thread to know what is exactly Shmup Boss and what to expect.

    I used the assets store' paid upgrade option. If you have already purchased Shmup Baby you get a 75% discount for the new version instead of paying the full 59$ you only need to purchase the upgrade for 15$

    Please note that none of your projects which were created in Shmup Baby will migrate to Shmup Boss, if you purchase Shmup Boss you will have to recreate your levels and enemies all over again. Make sure you keep backups.

    The reason your review is still there because technically speaking it's an upgrade (version 2.0) so all reviews from the older versions remain, I felt it would be unfair to make people who already had Shmup Baby to pay the full amount for Shmup Boss.
     
  9. Heero888

    Heero888

    Joined:
    Jun 18, 2017
    Posts:
    48
    Ah I see I see. Good man!
     
  10. Kaivian

    Kaivian

    Joined:
    Jan 18, 2018
    Posts:
    35
    Please make a community discord for your assets. Make one channel per asset.

    I just imported and am getting a number of these errors. Unity 2020.3.11f1

    upload_2021-6-29_13-8-59.png
     
  11. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Hi,
    I download the Unity version you are using and imported Shmup Boss to try and get the errors you are getting but could not get any. It is possible I am not getting the error due to any number of random Unity processes or it is possible you are getting it due to using other packs which are conflicting with the helpBox attribute name. This can be tested by trying to import in a new fresh empty project.

    Either way this should be quick to solve and the helpBox attribute will not affect the usage of Shmup Boss in any shape or form. The helpBox attribute is just there for few simple reminder messages and as a quick fix you can just comment out the lines using the helpBox attribute which you are getting the error in.

    I renamed the helpBox attribute for you just in case it was a name conflict and I will send it now via private conversation. You only need to copy the scripts folder I will send you overriding the older files and you should be done.

    If the issue still persists please do let me know, thx.
     
    Last edited: Jun 30, 2021
  12. Kaivian

    Kaivian

    Joined:
    Jan 18, 2018
    Posts:
    35
    Thank you. After posting this, I went through and added @ to all of them which also fixed it. It WAS from a collision, I had imported "Animal Controller" to see if I could use it to handle animations (I have animals in my shmup). Thank you for your assistance.

    Just FYI, I had originally been "messing with" shmup baby on the side past couple years. Then I was testing animal controller. Recently I decided to shift my focus on a shmup, bought shmup boss upgrade and imported it into the animal controller project.
     
    Last edited: Jun 30, 2021
    EbalStudios likes this.
  13. Kaivian

    Kaivian

    Joined:
    Jan 18, 2018
    Posts:
    35
    I have a few requests. The first two I think are big for most users.

    1. Make a single input handler class/component that all code references. This code doesn't reference input directly, but another class for "Input" (old) based off an interface. That way, I (and others) can easily replace this interface class with our own input (for things like new input system or rewired).

    2. Have an option for randomized infinite background tiles.

    3. I would like the option to "lay flat" the game on Z axis, like a normal 3d game/2.5d game. Before I started using the package, I had been making a 2.5d shmup game. A lot of terrain tools and such kind of force this orientation. This is what I mean:

    https://i.ytimg.com/vi/26tK3qjTwTg/maxresdefault.jpg
     
    EbalStudios likes this.
  14. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Thanks for the feedback, will take it into consideration if making any future updates.
     
  15. Mr_squiggle

    Mr_squiggle

    Joined:
    May 11, 2019
    Posts:
    34
    Hi I was wondering if you'll expand the level select screen to offer options like creating an overworld level screen like super mario world at all?

    Also will there be options to play cinematic clips in between levels with the option on when you beat one a cinematic plays and when you start up the game etc.

    Also will options like a shop where you can spend money on items from killing enemies in between levels (like some later schmups) come in at some point?
     
  16. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Thanks for the feedback, no plans at the moment but will certainly take it into consideration whenever working on updates.
     
  17. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    70
    A few questions regarding existing features or if they can be easily implemented:
    1. Is there a save system? For example, save checkpoint(s) in a long level.
    2. Non-linear level / level branching? A maze level for example
    3. In app purchase / rewarded videos within level? A pickup item opens popup to watch video as for an upgrade...
    4. How to create new player and enemy ships. I didn't see it in the documentation...

    If these are not existing functions, will you be able to provide support to help implement the above? Sorry I'm still new at unity....
     
  18. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Hi and thank you for your interest and for checking up with us first.

    No, it only saves if you completed the level, no checkpoints within the level.

    No.

    Maybe these videos can be more of a help, I make a player at around 3 mins and 15 seconds in the first video:

    And an enemy in this video:


    Support is mostly for help with existing features, to explain them better or fix any errors, there is an infinite amount of possible features to add and we cannot help with implementing them. When buying Shmup Boss, or actually any Unity pack for that matter, please only consider and count on the existing features it has.
     
  19. Paliandro

    Paliandro

    Joined:
    Aug 9, 2017
    Posts:
    9
    I hope this question isn't too much of a bother. Going through the scripts, I can't seem to pinpoint where and how shmup boss checks the actual collision of munition with the player, only what happens afterwards. Maybe it's slipped my eye, but I can't seem to find it. Could you point me in the right direction?
     
  20. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    No worries, my pleasure.
    Munition hits are handled inside the "OnTriggerEnter2D" method located in Agent.cs at line 270 (I think is what you are looking for?)
    If the object is a munition it will then pass it to "HitByOpposingFactionMunition" method, 2 different versions are located, one for the player, in Player.cs at line 311 and the other for the enemy, in Enemy.cs at line 213

    This is for the munition weapons system, just incase, please note there is also a particle weapon system, this handles damage from inside the particle weapons collisions, located inside: "WeaponParticlePlayer.cs" line 78 and "WeaponParticleEnemy.cs" line 53
     
    Paliandro likes this.
  21. Juschief

    Juschief

    Joined:
    Apr 17, 2020
    Posts:
    3
    Nice work. One question? How do we change the orientation of how the Missiles are fired. Its seems they're all created for vertical shmups. Im using horizontal(we need more balance on vertical/horizontal..everything vertical). I changed the way its aimed it just goes up or down. Feel like i did it on my own before with a bullet. but now im stumped lol. thanks
     
  22. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    There can be a number of reasons for it and a number of solutions, I know, these rotations can be quite often counter intuitive. You have vertical/horizontal levels local/global rotations and modifiers etc..

    Probable causes and solutions:
    1-To unify munition rotation, I have taken the convention that all munition prefabs should be created in a vertical manner, this means if you have a horizontal level, your missile should still be oriented vertical as if it were in a vertical level, I know this feels like a mistake, but my rationale was, this way you can easily use the same missile for both a vertical and a horizontal level and its rotation will be auto corrected and you do not need two different missile to account for vertical/horizontal.

    2-I have also added the options of:
    -IsUsingNestedRotation
    if that is checked it will allow you to use the local rotation vs global, you can try checking it and rotating the weapon 90 degrees and see if this solves it. (This still takes the level orientation into account)

    -Override Direction: will override the level direction, and you can just put the values you want for the missile to launch for example, if you want it to fire to the right, put X = 1 and Y = 0

    So in short, try rotating the missile prefab, you also have the option of nested rotation and rotating the weapon, and as a last resort you have the override direction.
     
  23. Juschief

    Juschief

    Joined:
    Apr 17, 2020
    Posts:
    3
    Another question...fx pool not set to an instance of an object?
     
  24. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    I am not sure if I can guess that one with so little information, but double check the following:
    -Make sure you have an FXPool component, usually it will be part of the pools object. (make sure you only have one FX pool and not more)
    -Double check all of your player, enemy and weapons FX (your FX Spawner component, that its FXGo is not empty, same with the weapon fire FX). To make it easier, if you have many waves in the scene, reduce them to one, make sure that enemy FX spawner has its FX listed, and that if it has weapons and they have FX, to make sure their effects are not empty. Double check the player.
    -Make sure your FX prefab has its appropriate FX Eliminator.
    -Make sure you do not have any preview FX leftovers inside the scene.
    -Also you should not be using for example an FX Eliminator on an object which is not an effect spawned specifically by an agent.
     
  25. memosky2424

    memosky2424

    Joined:
    Apr 29, 2018
    Posts:
    2
    Hello, good day, I had both versions the Shump Baby and the Shump Boss. I'm on the Shmup Boss version. I have read all the documentation and I have seen all the youtube videos. My doubt or question is how can I add a time or something to change from audio to another. Example I want level 1 to start and when a certain time passes for a boss to start fighting and I want the main music to stop and the boss's music to start. Cheers.
     
  26. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Hi, thank you for your purchase and for getting in touch.

    Actually, this feature is not included in our shmup templates. But if all what you want is for the music to change after time, this will be relatively straightforward to change.

    Open up the LevelAudioManager.cs script:

    Add up a changed music audio clip (the boss warning clip)
    SB_Audio1.jpg

    Then start a coroutine from the initialize method for changing the background music, which will replace your background music with the changed BG music clip after time:
    SB_Audio2.jpg

    Hope this helps, please note that there is a huge number of features to do for any shmup game, Shmup Boss just gives you a foundation to start with. For customizations one needs to be quite handy with scripts.

    All the best and good luck with everything
     
    Last edited: Nov 15, 2021
  27. memosky2424

    memosky2424

    Joined:
    Apr 29, 2018
    Posts:
    2
    Hi Incredible support, I did not expect such a quick response. I just tried it and it works like a charm.
    You are a great person, thank you.
     
    EbalStudios likes this.
  28. Proksenos

    Proksenos

    Joined:
    Dec 9, 2017
    Posts:
    7
    Hi! Bought your asset just a few days ago and I'm currently watching the tutorial vids and reading the manual.IT LOOKS SO GOOD. I have a question though, is there any implementation of "Round Robin" in your sound fx? I'm talking about loading a couple of different audio samples for a specific bullet (and picking them at random) so it doesn't sound exactly the same each time (resulting in the machine gun sound). Or maybe a way to randomly alter the volume just a tiny bit.

    Basically if there's anything in Shmup Boss that helps alleviate the machine gun effect sound (the ta-ta-ta-ta-ta). I'm not sure if I phrased my question properly but I hope you understand!
     
  29. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Thank you for the kind words, you phrased it perfectly. It makes perfect sense to make the sounds vary a bit.

    I didn't actually implement the feature you are asking for, but just opened up the scripts to see if there is an easy way to do what you are asking for.

    Changing the actual sound clips is going to be a bit of a hassle and the changes might span few scripts, if I ever get any quick ideas to do it, I will let you know.

    On the other hand, giving a slight variation for the clips should be relatively quick, but please note that it will apply to ALL played sound effects, not just a single type of clip.

    To implement it, open up the "SfxSource.cs" script
    Go to the PlayClip method in line 39
    Just before line 80, where it says: "source.play();"
    Add these 2 line to be able to change the played sound:
    Code (CSharp):
    1. float RandomPitch = UnityEngine.Random.Range(0.8f, 1.2f);
    2. source.pitch = RandomPitch;
    So the final lines inside the PlayClip method in the SfxSource.cs should look like this:
    Code (CSharp):
    1. source.clip = audioClip;
    2. source.volume = volume;
    3.  
    4. float RandomPitch = UnityEngine.Random.Range(0.8f, 1.2f);
    5. source.pitch = RandomPitch;
    6.  
    7. source.Play();
    And you should be Done! (The 0.8 and 1.2 values are the different pitch values, make smaller or bigger as desired).
    I explained it line by line, instead of sending in the script so that you can see how you can change source sound if you wanted to, you can also change the volume or any other audio source property, the same way I played with the source pitch. If it doesn't work or anything, please let me know.
     
    Last edited: Dec 10, 2021
  30. Proksenos

    Proksenos

    Joined:
    Dec 9, 2017
    Posts:
    7
    Thank you so much. I'll try it tomorrow and I'll make sure to leave a positive review as well.
     
    EbalStudios likes this.
  31. Magic-Thor

    Magic-Thor

    Joined:
    Mar 31, 2020
    Posts:
    15
    1st, thanks, for your great asset! My kids and I loving it!
    2nd, how we can respawn with our last upgrade-levels?

    Best regards Thor and kids :)
     
  32. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Thank you for the kinds words, really glad this pack had brought you joy.

    Please open up the "Player.cs" script, go to the "ResetSettings" method, in lines 286 and 287 you will find:
    Code (CSharp):
    1. CurrentWeaponsUpgradeStage = weaponsUpgradeStage;
    2. CurrentVisualUpgradeStage = visualUpgradeStage;
    Comment those out and your upgrades should stick rather than resetting with every respawn.
    Code (CSharp):
    1. //CurrentWeaponsUpgradeStage = weaponsUpgradeStage;
    2. //CurrentVisualUpgradeStage = visualUpgradeStage;
    Hope this helps.
     
    Magic-Thor likes this.
  33. Magic-Thor

    Magic-Thor

    Joined:
    Mar 31, 2020
    Posts:
    15
    YES! This was 100% the solution! Thanks! :)
     
    EbalStudios likes this.
  34. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    70
    Hello,
    I've purchased the shump boss asset.
    Can I use your "ultimate spaceship creator" asset to make my own custom player and enemy ships? If so, can you provide a tutorial on how to do that? Thanks in advance.
     
  35. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Hi and thank you for your purchase,

    You can use the Ultimate Spaceships Creator or any art pack with Shmup Boss.
    The USC overview better explains the content of the collection and how to design spaceships:

    If you don't want to use the existing examples, just design your own spaceship then create a prefab out of it and use it in your created player or enemy

    Making your own player is explained in the first tutorial of Shmup Boss:

    And creating an enemy is explained in::

    And weapons here:


    Please first give the tutorials a try and let me know if anything is not clear, before purchasing the USC you can first try to make your ships with the free Star Sparrow sample here: https://assetstore.unity.com/packages/3d/vehicles/space/star-sparrow-modular-spaceship-73167
     
    Magic-Thor likes this.
  36. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    70
    Thank you for the response.
    What is the difference between "ultimate spaceship creator" and "polygon spaceship creator" assets?
    I plan to deploy to both desktop/web and mobile versions...
     
  37. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Both represent completely different art styles. It's like apples and oranges.

    Polygon Spaceships Creator is polygon/low poly style. If you do a web search for polygon styled games you are bound to find many (For example, Morphite is one such game). Additionally, on the asset store there are many creators who develop polygon art styles, one of the most famous is Synty Studios of course. The Polygon Spaceships Creator does not use painted textures, only one color atlas texture. It is also a far smaller collection than the Ultimate Collection.

    The Ultimate Spaceships Creator is styled in a somewhat realistic style. Think more akin to Star Craft 2 or Everspace. It uses hand painted textures.

    If you read the description of each of our packs, and compare the provided images you should get a better idea.

    Both should be suitable for desktop/web/mobile. What matters is what style of game are you after.
     
  38. jjdomain

    jjdomain

    Joined:
    Sep 11, 2015
    Posts:
    70
    Thank you for the clarification. I'll get the ultimate spaceship creator to pair with the shump boss..
     
    EbalStudios likes this.
  39. Paliandro

    Paliandro

    Joined:
    Aug 9, 2017
    Posts:
    9
    A question occurred to me: does shmupboss directly support a more traditional "lives" system? As in, you don't have hitpoints, die from one hit, and respawn right then and there?
     
  40. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    You can use a player health value of 1 and enemy bullets damage of anything higher than 1.
     
  41. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    90
    My understanding from what I have seen is that with this system, the camera is stationary.

    Would there be any problem with creating Tilemap terrain, and having a script on the tilemap parent that makes it move past the camera as a way to have terrain like in some shmups like Gradius that have terrain?
     
  42. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Using scrolling tiles in the background as a visual backdrop or decoration is not a problem, you can move them with your own script or if you are willing to do some digging into the scripts by attaching it to the scrolling backgrounds treadmill script.

    Interaction with tilemaps though is a completely different thing, having munition sliding on terrain like in Gradius would not be possible, also you would have to modify the scripts, add a new layer and collision detection if you wanted the player to collide with the terrain. The player uses a kinematic rigidbody which means you can't easily let it stop when it hits a collider (you can perhaps either kill the player if it hits a tilemap collider, or do some scripting to adjust the movement of the player to make it appear as if it stopped which will require some work)

    Please also note that the main enemy spawning system is by time and is not visual (There is a visual system (Ground enemies) where you are able to see where enemies are placed in relation to the background, but it is not as complete as the one which spawns by time.)

    Hope this clarifies things.
     
    brittany likes this.
  43. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    90
    I am just getting started; I have been watching the tutorials and reading the documentation and just having a good time learning the system.

    One issue I ran into was that I wanted to create two waves that were synchronized, one coming from the left and one from the right. I put them as wave 1 and 2 in the spawner and set the time for next wave to 0, thinking it would start the second wave immediately (at the same time as the first wave). What I found was that the second wave was noticeably behind the first wave.

    What I did was create another FiniteWaveSpawner and use it to spawn the second wave (as its first wave). I made my own variation of the FiniteWaveSpawner that uses a boolean value to determine if it should end the level when it has finished its waves and set that to false. Then in the EndLevel method I just return if it is not supposed to end the level. I used this for the second FiniteWaveSpawner. Now the second wave seems to match the first wave.

    I think that works ok, but I was wondering why with one FiniteWaveSpawner the second wave started a little bit after the first wave even though time for next wave was 0.
     
  44. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Good question! I am actually asking myself the same one at the moment and can't figure it out completely!
    All I can guess for now, is that it has to do with how coroutines are implemented internally in Unity, a call to WaitForSeconds or two consecutive coroutines seem to mess with Unity somehow and you get punished with a delay.

    Now, I really do not know if I could handle such a big change as creating 2 spawners!! It's almost heretical! if you solved the issue of ending the level, you would still bump into pooling the enemies and bullets (You might not have noticed this issue if you have the same enemy in both spawners) but still, the spawner handles few more things and it can be risky adding another one.

    For the moment I figured out 2 quick solutions:
    1-Go to around line 88 in the FiniteSpawner.cs script and add an if statement exception that would skip the "Wait for seconds" statement incase you are spawning 2 waves consecutively:
    Code (CSharp):
    1. // Line 88 FiniteSpawner.cs          
    2. StartCoroutine(SpawnWavesByType(waveData));
    3.  
    4. // Add this if statement block.
    5. if(Waves[i].TimeForNextWave < 0.1f && (i+1) < Waves.Length)
    6. {
    7.      i++;
    8.      StartCoroutine(SpawnWavesByType(Waves[i].waveData));
    9. }
    10.  
    11. yield return new WaitForSeconds(Waves[i].TimeForNextWave);
    In my tests it seems to make two consecutive waves spawns concurrently without any delay, if you want 3 waves or more you can add more if statement or a while loop, it's not elegant but works for now.

    2-Just to mention for the sake of, a gimmick which you have probably figured out already and which may or may not work accurately because I do not understand the cause of the coroutine delay and if it changes with every build or according to hardware etc.. would be: :D
    If you are using a curve wave or a waypoint wave, just move the first point of whatever starts sooner a little further away or add another point which effectively slows down one wave.
    If you are spawning from sides, just increase the offset value to slow down the wave which starts first.
     
    Last edited: Apr 15, 2022
    brittany likes this.
  45. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    90
    Thank you! I'm very glad I asked the question. I removed the 2nd spawner and did some more testing.

    Well, I did notice something that is interesting.

    Without any changes to the FiniteSpawner script, if I do something like this:
    Element 0 Wave 1, Time for next wave 0
    Element 1 Wave 2, Time for next wave 1

    And then repeat that:
    Element 2 Wave 1, Time for next wave 0
    Element 3 Wave 2, Time for next wave 1

    Element 4 Wave 1, Time for next wave 0
    Element 5 Wave 2, Time for next wave 1

    (wave 1 and 2 at same time, then wait a second, then wave 1 and 2 at the same time again, and so on)

    Only element 1 (the 2nd wave) will be unexpectedly delayed. When we do these same two waves again a second later, they will be synchronized and so will the other waves that follow after that (at least when using the same waves again, I didn't yet test it with a different set of synchronized waves with different enemies and so on).

    Further, when the level is over, if I click the replay button to play the same level again, the 2nd wave won't be unexpectedly delayed at all (they will all be synchronized just fine).

    I tried your code and it seems to work for having no delay with the 2nd wave but after all the waves are done, the level doesn't end anymore.
     
  46. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Curious results, would need to do few more tests on my own, to see a suitable solution or not run into the same issue in the future. Not sure also If the game is built, if it will behave just like the editor or if it will run differently.

    That's quite an inconvenient side effect!
    When I ran my test the level seems to end, in my tests it only didn't end in the case when the last 2 waves are concurrent. as in:
    Element Before Final Wave Before Final, Time for next wave 0
    Element Final Wave Final, Time for next wave 1

    Making the level end, with 2 concurrent waves as above, might require me to re-write a good portion of the code which is not exactly practical.

    Just to confirm, does the level not end on your side even when the last wave is not concurrent? As in:

    Element Before Final Wave Before, Time for next wave 5
    Element Final Wave Final, Time for next wave 1
     
    brittany likes this.
  47. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    90
    Yeah it is curious; I will be interested to read what you have learned or figure out after you do more testing.

    I tested what you said about the level not ending, and I got the same result as you. With the new code, the level will end as long as the last 2 waves are not concurrent. That is not really a big deal but it is something to know. I was just testing things but typically a level will end with a boss fight so this shouldn't be a problem normally anyway.

    Thanks again; I appreciate all the support!
     
    EbalStudios likes this.
  48. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    372
    Just thought I'd share my latest test, I think I verified that the timing issue is caused by the way coroutines work.
    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3.  
    4. public class CocoTest : MonoBehaviour
    5. {
    6.     void Start()
    7.     {
    8.         StartCoroutine(FirstCoco());
    9.     }
    10.  
    11.     private void Update()
    12.     {
    13.         if (Input.GetKeyDown("space"))
    14.         {
    15.             StartCoroutine(FirstCoco());
    16.         }
    17.     }
    18.  
    19.     private IEnumerator FirstCoco()
    20.     {
    21.         for (int i = 0; i < 2; i++)
    22.         {
    23.             Debug.Log("First Coco i: " + i + "Time: " + Time.time);
    24.             StartCoroutine(SecondCoco(i));
    25.             yield return new WaitForSeconds(0.0f);
    26.         }
    27.     }
    28.  
    29.     private IEnumerator SecondCoco(int index)
    30.     {
    31.         yield return new WaitForSeconds(0.0f);
    32.  
    33.         for (int i = 0; i < 3; i++)
    34.         {
    35.             Debug.Log("index: " + index + "  Second Coco i: " + i + "Time: " + Time.time);
    36.             yield return new WaitForSeconds(2.0f);
    37.         }    
    38.     }
    39. }
    yield return new WaitForSeconds(0.0f) will cause a delay and is not near instant when it's the first time used.
    In the first loop you would assume the time difference between the 2 debugs is nearly zero, but it's 0.02 second which is not too bad, but when another WaitForSeconds(0.0f) is used it causes a 0.3 second delay which is quite noticeable.

    Now, if you let the loops run their due course. And later hit spacebar to start them again from update, surprisingly there is no time delay!!! And this time they work fine.

    This must be an issue with how Unity loads its first coroutine, starts its asynchronous operation or something to do with the IL2CPP all which are beyond my knowledge. If you are still curious, I bet one of the highly technical guys in the forums or Unity's staff must have a good answer to it.
     
    brittany likes this.
  49. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    90
    Interesting! Well, it is easy enough to work around and I will be curious what your guidance will be.
    As long as the first wave is an independent wave (not meant to be synchronized with the second wave), then there won't be any problem and the waves after that, that are meant to be concurrent, won't have any problems.

    Or if you want the first wave to be concurrent, you can use the code you supplied earlier, and you just have to remember not to end with concurrent waves.

    Maybe I could just immediately do a WaitForSeconds(0.0f) at the start of each level and that should also prime things so that when the waves start there is no issue.

    It seems there are a lot of ways around this minor issue with Unity.
     
    EbalStudios likes this.
  50. Xiverio

    Xiverio

    Joined:
    Aug 30, 2020
    Posts:
    28
    is there an implementation for switching between different weapons in this template? (ie: you have 4 weapons but can only use one at the same time so you switch between them with a button)

    Maybe could be interesting use this for my project.