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

Core GameKit! Pooling / Spawning / Combat

Discussion in 'Assets and Asset Store' started by jerotas, Jan 27, 2013.

  1. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Hi Chibwemwn, I've got KW beta 2.7.6 for you to try as soon as you send me your invoice#. It adds 2d collider and 2d trigger support to Killables. As I said I'm not able to test it, but am pretty sure it will work fine.
     
  2. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Okay, I've just PMed you the invoice number. Can't wait to test it out!
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'll need an email address to send the package to. Send me an email to support@darktonic.com please and I'll reply with it.
    Thanks for beta testing!
     
  4. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm currently working to add full Undo support for Unity 4.3 users. It should be done for the next version! And no, this does not mean that we won't support V3.5.7 anymore. Of course we will!
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We've got Chibwemwn's problem fixed after a couple minutes of Skype. Good news, the Killable changes I made indeed work with Unity 4.3 2D colliders, so that's coming in the next version!
     
  6. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Here's something that'll be a little bit of a problem for Unity 2D. The Incremental rotation settings don't support the Z axis. Has anyone else noticed this? I've attached a screen cap, if that helps.
     

    Attached Files:

  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    edit: this has been resolved below. We were confused about what it was.
     
    Last edited: Dec 4, 2013
  8. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    I've used the Z axis to rotate things, and it seems to work fine. But it may be a Unity 2D thing. I don't know yet.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, that's not a 2D thing. Hard to read in the screen shot. The message says "Rotation Z - cannot be used with Random Rotation Z". That's appearing because you have Randomization for Z checked in the Randomization section of the spawner. Since the Z is random, you can't use Incremental settings for Z. It's one or the other. There's a similar warning about X and Y as well, you just haven't randomized them.
     
  10. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Ahhh, I see, okay. Thanks for the heads up! That makes sense.
     
  11. XilenceX

    XilenceX

    Joined:
    Jun 16, 2013
    Posts:
    122
    I've bought Killer Waves today and in general I am impressed with its quality and ease of use.
    However I have three things I would like to do, but can't so far:
    1.Only respawn the number of enemies that the player has NOT killed yet.
    At the start of the game a wave spawns with X monsters. Then the player kills Y monsters, which destroys them via Playmaker, but then he dies. When the player dies all monsters are despawned. Then X-Y monsters should spawn again. This will be something I HAVE to do for my current game project, the other 2 are kinda optional for this one, but would be necessary for the next.

    2. spawn enemies at a larger random range than 100. Is this limit due to technical limitations or can I just change some setting in a script to 300?
    3. Somehow define areas within that random range, where these randomly spawned enemies aren't allowed to spawn... because currently they spawn inside rocks etc. and get stuck inside. So is there a way to make them not spawn inside colliders, or a certain area?
     
    Last edited: Dec 4, 2013
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    For #1, you don't have to despawn all monsters when the player dies. You could just turn them invisible and pause the wave until they continue. Then turn them visible again. This way, there's no need to respawn X-Y or anything weird like that.

    #2, that's an arbitrary number I maxed at 300. I'll make a note to change it to 5,000. Are you using triggered spawners or syncro spawners? I'll let you know the line number to change if you answer that.

    #3, yeah that's not possible, and overly complex to even set up if you ask me. However, I would maybe handle it like this with existing features. Use triggered spawners, and trigger the waves when certain events occur (visible, collision, etc). Each triggered spawner can propagate events to any number of child spawners. So you could position some child spawners in places so that you can set the random ranges for each one such that nothing spawns inside rocks. Video 3 4 in the video series show how to do this sort of thing.

    Let me know if these answers work for you, and thank you for the purchase.
     
  13. XilenceX

    XilenceX

    Joined:
    Jun 16, 2013
    Posts:
    122
    #1 Nah that's no solution for me, because turning their renderer off aka invisible wouldn't stop the AI from doing its calculations, which is what causes the most performance overhead from them. And deactivating them and reactivating them breaks Playmakers collision detection for their character controllers so they would be immortal. heh So they'll probably have to respawn.

    #2 The variable is maxed at just 100 I believe, either way I'm currently using only triggered spawners.

    #3 hmpf yes setting up loads of child spawners, then again that would make the waves almost inevitably less random and more repetitive + more a lot work to set up each of them. So it is a solution, but not really a good one, well for my current project it will definitely do the trick, so I will worry a about this some other time.
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I thought I would give the heads up to new Killer Waves users that BOTH of our plugins are on INSANITY SALE of 80% off right now.
    That means Master Audio - the most advanced audio plugin on the Asset Store - can be yours for only $12 until midnight tonight! Here's a link for those interested: https://www.assetstore.unity3d.com/#/content/5607
     
  15. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    #1, ok then make the game objects disabled instead. That will also halt the Playmaker FMS's. Then re-enable the enemies after the player hits continue. The FSM's will pick up where they left off hopefully.

    #2, attached one with a max of 5000
    View attachment $TriggeredSpawnerInspector.cs

    #3, it doesn't actually take that long to set up once you do it a couple times. If you wanted to define ranges or do raycasts to determine empty areas, as I said that would be not very intuitive I think to use. I will write it down for a future look-at. But the child spawner idea is definitely more flexibile, so I wouldn't dismiss it until you've tried it. It's the solution to all kinds of weird problems.
     
    Last edited: Dec 5, 2013
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves V2.7.6 is submitted to the Asset Store. Changes are:

    • Added 2D collider and 2D trigger support to Killable! It "just works". No extra settings.
    • Added full Undo support for Unity 4.3. Unity 3.5.7 users can still use the package, just no undo.
     
  17. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    I have been working through your app and I would like to suggest that besides the components you can add you might want to make an editor in the editor windows tab to centralize the adjustment of all your components and values ect.

    Making an editor would also make it easy to learn your app by centralizing all our values ect. in one place. Many editors also let you have templates that would add a set of components to a prefab to make a specific behavior.

    Maybe even have templates for the various types of waves.
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds good, might be cool. We will look into that after the next batch of planned features. Thank you for the feedback.
     
  19. eliteslayer

    eliteslayer

    Joined:
    May 12, 2013
    Posts:
    64
    Hey, i've started an fps game with zombies and i am currently trying to add a wave and points system like treyarch's black ops zombies. if i download the killer wave will i be able to use it to spawn zombies or just the prefabs it comes with? and also would the xp and points system work?
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yes, you can use the World Variables for XP, Points and anything else you like. You can use any prefabs you like, any scripts you like on them. However you will probably want a Pooling plugin such as Pool Manager to save on performance, especially if this is for mobile.
     
  21. eliteslayer

    eliteslayer

    Joined:
    May 12, 2013
    Posts:
    64
    Wow great thank you i will get started with it as soon as possible!:D
     
  22. semmerich

    semmerich

    Joined:
    Sep 22, 2012
    Posts:
    5
    Hey jerotas,

    I just bought the killerwaves plugin so far its great! Especially with the sale. Thanks. I have run into a few issues that I was hoping could be cleared up for me.

    1. The ReadMe only noted that to use poolmanager you need to change SpawnUtility.cs. If you want to use the player spawn script you provided with poolmanager. It may need to be updated as well if you keep your player around instead of completely destroying it.

    2. I have made a killable listener to handle the interaction between the player and powerups. (not sure if that is the best way to handle it with this plugin but it seemed good at the time) The listener script is on my player and the player, also, has the refernce to it in his killable script. (Other wise I could not get the powerup object that I collided with)

    It appears to me that if the collision events happen with in a few seconds of each other the listener functions do not get called. For example if the ship hits two powerups one right after the other (maybe one second in between). The second collision will not update the player. I have, also, noticed this just with killables in general. If a collision happens too quickly one of them may not update their hitpoints.

    all of the objects are triggers like in your example scenes.

    I hope that makes sense. If not I will try to rephrase it.

    Any help would be appreciated. Thank you.
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    #1) I don't understand what you mean about the Player Spawner script? That's not from Pool Manager, that's my own script.

    #2) You're saying the Player has a reference to the Killable Listener in the Killable script? Did you modify the Killable script? I don't understand this part. Also, I haven't seen that repeated collisions don't call the Listener. In fact in my demo scene #2, I can register 10 hits to an enemy within one second and they all register. Which Listener method are you having a problem with? I'll take a look if you let me know. I definitely definitely see quick hit points always working. If you could send me a small example project I can pinpoint the problem. Or we can try to Skype if we're both around at the same time. I'm briandhunsaker on Skype.

    Thanks!
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves V2.7.6 is live, grab it to get your full undo support. I have more things I added since and will be submitting another version probably tonight. It will have 2D collider support for everything else :)
     
  25. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    thanks! very nice. happy holidays

    $10 now that's insane!

    [THE FOLLOWING IS A JOKE OK / JUST TRYING TO SAY THEIR PRICES ARE SO LOW / AND FOR PEOPLE NOT TO MISS OUT ON IT]

    and most likely illegal as well. your basically selling below cost... think of your poor competition... cut and dry case of predatory pricing...

    In many countries, including this one, predatory pricing is considered anti-competitive and is illegal under competition laws and predatory pricing practices may result in antitrust claims of monopolization or attempts to monopolize.

    https://en.wikipedia.org/wiki/Predatory_pricing

    so you better raise your prices way high cause $10 is just unfair to yourselves think of all the hardwork you put into this asset to be giving it basically away... think of all the sleepless nights working on a new release, like v2.7.6. its just criminal...

    ;)

    (so everybody, if you have not already done so, pick up a copy before they come to their senses or law enforcement forces them to...)

    [/THE FOLLOWING IS A JOKE OK / JUST TRYING TO SAY THEIR PRICES ARE SO LOW / AND FOR PEOPLE NOT TO MISS OUT ON IT]
     
    Last edited: Dec 10, 2013
  26. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Hi, I was wondering how I'd go about creating a simple combo system. What I have in mind for how it works is that the combo count racks up until the player is hit once. Then it is reset to zero. Quite revolutionary, right? XD
    Is there a way of doing this with world variables?
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sure. Here's one way. :
    1) Create a world variable called "combo_count" or whatever.
    2) Make certain Killables add one to that variable when destroyed.
    3) I guess to reset the value you will need to use a Killable Listener and listen to the Player's Killable. Then reset the variable to zero with:

    InGameWorldVariable.SetCurrentWorldVariableValue(“combo_count”,
    newValue)

    4) Use a listener on I'm not sure what (depends on your game play) to use the combo_count value to modify the score World Variable at a certain point.
     
  28. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ? doesn't sound like joke, but it is... and i thought my best. you didnt read/quote all of it... like all my other posts its a complement and a very stronge endorsement, read it totally. dont call security yet... ill edit it... just itsy bitty misunderstanding... i painted it too well... or better delete your response and ill delete the original post and then ill delete this post and only the drives will know until they are overwritten ;)
     
    Last edited: Dec 10, 2013
  29. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    ok great to hear, you scared me to death... for fear of some giant unfortunate misunderstanding. totally my fault i worked so hard on that post. i thought it would be funny. clearly i did to well and it was way over the top. i left my punch line to the very end. i edit my posts in part. i sort of edit and save. it takes a number of edits for it to sort of all be there. i have in mind with what i wanted to say. i wanted to thank you for the new release and i wanted people to notice the amazing opportunity that is available to them. but i didnt want anyone to get upset... still i hope you dont have any misgivings cause there is nothing but respect for how you'all conduct yourselves and for your works, well until you make a release that sucks and then i'll be nothing but complaining about it.. still til then your constant hardwork and dedicated is an excellent example of what other authors should strive for... you certainly can see my posts when a poor author has but a semi colon too many at the end of a statement and i catch it... so no hard feeling i hope... as you know im always joking in just about every post there is a little joke... (plus all this ruckus bumping thread up, without having to post empty bump)
     
  30. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No, you're the one who scared me im. haha
     
  31. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    well i do sincerely apologize...
     
  32. semmerich

    semmerich

    Joined:
    Sep 22, 2012
    Posts:
    5
    Hey Jerotas,

    Sorry about the confusion. It's hard to explain the issue. I will try to make you a sample scene. It's probably just my lack of knowledge on how to use the plugin.

    #1) What I was trying to say is that to use your script with pool manager you need to change it. Instead of checking if the player is null it should be something like active or enabled. at least that is what worked for me.

    #2) I will be free this weekend if you want to try and skype about this. I think it would be easier to explain that way. What time would be good for you?
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I see what you mean. If you have changed it so it works with your setup, would you mind sharing the script with me? I'll include it the the package in the future if so.
     
  34. semmerich

    semmerich

    Joined:
    Sep 22, 2012
    Posts:
    5
    Sure I will send it to you when we skype. Just let me know a good time for you.
     
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Let's try Wednesday sometime. I believe I'll be around.
     
  36. semmerich

    semmerich

    Joined:
    Sep 22, 2012
    Posts:
    5
    Ok I will send you a contact invite or whatever skype calls it after I get off work on wednesday. I am on the east coast and it will be around the mid-afternoon for you. If the location on here is correct. My skype is steve-emmerich.
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Sounds good, tentatively. See you then.
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    A bug was found. If you are using both Killer Waves Master Audio in the same project, there are 2 duplicate classes named UndoHelper. You can delete one of them, they are identical. I will fix this in the next version. This may be common since both plugins are on 80% off sales right now!
     
  39. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Killer Waves 2.7.7 has been submitted. The following changes are in it:

    • Added 2D collider and 2D trigger support to Triggered Despawner script.
    • Added support for 2d collisions and Triggers to Triggered Spawners. Now everything has 2D support!
    • Added nicer error if LevelSettings not in Scene.
    • Added "Use Global Waves" checkbox in LevelSettings. You can turn this off if you don't need Syncro Spawners and then you don't have to create long fake waves so that Triggered Spawners don't shut off after your Global Waves end. There was always the Game Over Behavior which could get around this, but that's not necessary any longer.
     
  40. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    wow very nice thanks

    here enjoy
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    haha nice video!
     
  42. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    oh so funny video, just small way of saying thanks for getting back to back releases out to us...
     
  43. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Thanks! I'll give this a shot when I get up in the morning. I'm now having trouble with the triggered spawners, though. I'm trying to set up some child spawners, and it doesn't work at all right now. I've set the parent to propagate and the children to receive from the parent. The prefab pools also don't seem to be counting the triggered spawners as using them. How may I fix this?
     
  44. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Do you guys have plans on adding some type of pool manager your selves or support for any of the apps for this?
     
  45. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    I would like to know this as well. I keep seeing the name PoolManager in this thread... if I don't own a separate pool manager product will this product simply instantiate everything at run time? Thanks!
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You have to use the same event in the child and parent spawners to get it to work. In other words, if the parent spawner is triggered by "visible", then the child spawners also must use the visible event. Other mismatched events will do nothing to the children.

    Not sure what you mean about the prefab pool not being "counted"? Can you rephrase that?
     
    Last edited: Dec 10, 2013
  47. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We have built-in support for Pool Manager. We do have plans to add our pooling, but not for awhile. It will probably be at least a couple months. That's not trivial code to write and I still have other features planned ahead of it.
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It will indeed Instantiate. You can see what it does in the small SpawnUtility.cs class. That's the one you modify if you own Pool Manager or similar to use that instead. Sample Pool Manager code is included in the code comments there.
     
  49. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    View attachment 78190 $Screen shot 2013-12-10 at 1.11.05 PM.png $Screen shot 2013-12-10 at 1.11.20 PM.png $Screen shot 2013-12-10 at 1.13.53 PM.png
    Okay, I'll attach some images to show what I mean. I hope this helps.
     
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    It looks like you clicked the "find spawners" button in the Prefab Pool and expected it to find the Triggered Spawners in the Scene right? I don't know if the docs call this out, but only Syncro Spawners are searched, currently. I'll make it search Triggered Spawners too in the next version.