Search Unity

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
    I seem to remember that older Unity5 versions had terrible plugin updating where it would basically make a copy of DLL's and sometimes other files instead of overwriting an existing version. I'm betting that's what you have going on. I wonder why you don't update to Unity 5.4 where they have fixed this?

    Anyway, check for stuff like RelationsInspector.dll and RelationsInspector (1).dll in the same folder. Probably need to scan everything in Assets/Plugins/RelationsInspector and Assets/Plugins/Editor/RelationsInspector for duplicate files.
     
  2. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Try deleting your project's Library file. Pretty sure this should cause Unity to reset the mapping / GUIDs.
     
  3. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Pretty sure he has actual duplicate files, in which case this wouldn't work. I remember back when I was using Bolt (networking) and upgrading always involved finding and deleting the duplicate files. Besides Unity 5 upgrading plugin functionality was basically broken. I think he's on an older version of 5 that still has that problem...
     
    hopeful likes this.
  4. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    That problem is caused when the GUID of the meta file of the dll is different to the one you're importing. This started in Unity 5 when importing dll files became more sensitive. This no longer happens with Bolt.
     
  5. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Yep. Good that Bolt has fixed it for their plugin.
    For us, we have the same files in 2 different plugins and they're duplicate files (2 repositories) so probably the GUID is different. However when I imported both plugins in Unity 5.4, it compiled file but there were GUID warnings, which is fine because it doesn't break anything.
     
  6. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Its a strange error message the guy above got, it looks like there are duplicate dll files.
     
  7. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    There are. As I was saying, on the old version of Unity I remember upgrading Bolt and getting duplicate files every time. New Unity does not have this problem.
     
  8. 76bigfoot

    76bigfoot

    Joined:
    Oct 14, 2015
    Posts:
    7
    Thanks Jerotas,

    I'm sure you are correct. I wasn't aware of the bug in Unity. I'll port my game over to a new version and see if that fixes it. Thanks for the info.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Not so much a bug as just a terrible way to upgrade plugins for a few versions there. It did cause compilation errors for many many people. Bolt even had a step by step "how to upgrade Bolt on Unity 5" section on their website at the time that entailed going in the folders with DLL's and deleting every other file. You could do the same to rectify your situation as well, but it's definitely a pain and I remember hating doing that all the time until Unity got rid of the problem.

    Note however that simply upgrading to Unity 5.4 with this compilation error existing beforehand will not go in and delete the duplicate files for you. You'll still need to delete both plugins and re-import them after upgrading.
     
    Last edited: Sep 20, 2016
  10. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Pretty big update. V 3.2.6.8 is live in 20 minutes! Changelog:

    • Added ChangeTimerDelay method to TimedDespawner.
    • Can now see Global Wave name when the wave is collapsed in the Inspector.
    • Added Level name field for Global Waves. You can see it even when the level is collapsed.
    • Renamed "Level Waves" to "Levels & Waves" in the LevelSettings Inspector.
    • Killables can now send Knockback Damage regardless of gravity setting on their Rigidbody. They only can't receive Knockback damage if not gravity.
    • Killables with a CharacterController now can receive Knockback Damage. It's an instant knockback though since there's no physics force to apply.
    • Added PoolBoss.NextPoolItemToSpawn method to get you the next item that will spawn for a Pool Item.
    • Documentation fix for Knockback on Killables.
    • Refactored Knockback code to be more understandable.
    • Fixed UI of Inspector for Triggered Despawner. It now shows a checkbox for each trigger you enable instead of making you "expand" them to denote active, which was really inintuitive.
    • Added new API method: LevelSettings.RestartGame() - it will set IsGameOver to false and go to level 1, wave 1 if you have Global Waves enabled.
    • Added new API method: LevelSettings.ContinueGame() - it will set IsGameOver to false and continue from where you died.
    • Added button to "Restart Game" to Level Settings Inspector when game is over. Will also reset any World Variables marked as "Reset To Starting Value" back to that value.
    • Added button to "Continue Game" to Level Settings Inspector when game is over. Will also reset any World Variables marked as "Reset To Starting Value" back to that value.
    • Renamed MechanimCustomEvent to MechanimStateCoreCustomEvents so it wasn't so close to the Master Audio script of MechanimCustomEvents. Please delete the old named file before upgrading.
    • Added "Collapse All Sections" button to LevelSettings.
    • Added "Collapse All Sections" button to Killable.
    • Added "Collapse All Events" button to Triggered Spawner.
    • Added "Fire!" button to Triggered Spawner Inspector during runtime, to activate the preconfigured wave for any event so you don't have to wait for it to happen.
    • Added "Spawn Position" dropdown for Death Prefabs in Killables. Choices are Death Position (default) and Respawn position. If you never set Respawn position via code, then it is the original spawn position, which lets you spawn death prefabs from the original spawn position if you choose.
    • Added LevelStarted method to LevelSettingsListener!
    • Fixed compilation errors for Windows Phone 8 platform.
    • Fixed bug where WaveEnded and WaveEndedEarly methods on LevelSettingsListener passed out the wrong wave info.
    • Added random rotation options to Killable's Death Prefab.
    • Category active item counts in PoolBoss are now clickable to select all items in the category that are active.
    • Added Text Item Filter textbox for filtering out what you see in Pool Boss. Helps a ton when you have a lot of prefabs pooled.
    • Added RefillPool method to WavePrefabPool class, so you can refill the pool at any time, taking into account any weights or World Variable values that have changed since the last fill.
    • Added "Deal 1 Damage To All" buttons to Pool Boss item, category and "all" so you can deal damage to test things at any time (runtime only).
    • Changed Damage / Despawn / Kill buttons in Pool Boss to icons.
    • Now only show Damage / Despawn / Kill icons in Pool Boss for the item if there is at least 1 of it spawned. Otherwise they wouldn't do anything.
     
    Last edited: Oct 1, 2016
  11. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Hello all. I created a video showing Core Game Kit spawning Tactical Shooter AI. I have a link to my website where I have all the changes needed for the Tactical Shooter AI to work with spawning.


     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    That's awesome! Could you please post this on our forum? http://darktonic.freeforums.net/
     
  13. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Hi,

    I've seen your asset for a long time now, and I know you provide great support. I'm not a coder, but I'm a decent Playmaker user, so here is my secret hope that I might be able to use your asset with a bit more freedom than other assets I purchased for my gameplay. To be more prcise, I have a few tower defense gameplay assets, they are great, but if I want something a little different it's a real struggle.
    My question. Is it possible to create a tower defense game play with your asset, and have some freedom where to spawn, how many spawning points, maybe one or multiple targets for the creeps, single or multiple paths in the same scene/level?
    If the answer is yes, what other assets would you recommend or see mandatory for such a 3D tower defense gameplay/game mechanics. Maybe something like Simple Waypoint System? How would I handle variables for life, armor, resources, etc? Can I do all these with your kit?
    Thanks in advance for your answer
     
  14. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Variables that are numbers you can do with World Variables, yes. Anything else you'd need to use Global Playmaker variables. As far as seeking targets for the enemies, we have nothing to help with movement, so I'd recommend perhaps Behavior Designer (no scripting needed generally) or other AI plugin. However I'm not sure if that one has any support for waypoints. You can ask Opsive and he always responds quickly.

    Yes you have freedom on where to spawn and number of spawning points.
     
  15. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I see. To control the movement of the creeps I would rather use something less intense computing, something like Simple Waypoint System. I would rather not involve any AI/Behavior solutions, just to keep things simple. What would I need to do to make it work with Simple Waypoint System?
    I'm going to ask the same question on SWS thread, because I have the feeling these 2 assets are a good complement to each other. Both assets looks solid and highly regarded by the users.
    Again, thanks for your input.
     
  16. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I've never used that plugin so I don't know. Most likely it will work simply (ha!) but you will probably need to move some code from Awake/OnEnable/Start events in SYS into OnSpawned so that state re-initialization happens each time the prefabs are respawned. The author of SYS can point you to where / which code to move or perhaps move it for you.
     
  17. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Yes, his answer was along those lines, I suppose. I'm not a coder. :)
    Are there any tower defense demo scene examples coming with the package?
    Thanks!
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Nope, sorry. Not really any example scenes coming at all.
     
  19. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    :(
    I was hoping for an example scene.
    Few more questions:
    1. Lets suppose I will animate/move the creeps in straight line from A to B. Is it possible without any programming to create towers/turrets and creeps just by assigning scripts to objects?
    2. What are World Variables? Can I use them with Playmaker without the need for Global Variables?
    3. Can I send/receive events with your Playmaker integration actions?
    Thanks!
     
  20. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    To make an example Scene I'd need to create all those scripts that you need Simple Waypoint System for. Which is not in the vision of this product.

    Anyway:

    1) Your turrets and creeps will just be prefabs, you will add scripts to them for movement purposes (which could just be some SWS thing and/or Playmaker FSM), and add Killable to it from Core GameKit so they can die.
    2) World Variables are things like score / health / experience points. They are numbers and built into Core GameKit. Several of the tutorial videos show them. There's a section in Killable to automatically add X score or whatever you want to do when the Killable dies.
    3) There are no Playmaker events in our Custom Actions - they do things to CoreGameKit, not FSM's. Like PauseWave, Despawn prefab, etc. However the Playmaker Listeners we have can call Playmaker events I believe, from a dropdown in the Inspector.
     
  21. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Sounds cool.
    One other strong reason that points me to Core GameKit is you other asset, Master Audio, which I suppose it might have been built in such a manner to favor a friendlier connection with Core GameKit. Am I right?
    Thank you so much for taking the time to answer my noobish questions!
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Well there is no "integration" between the two, but there are many similaries in the way the UI was built for the two, so that helps a great deal. For example the Inspectors of Triggered Spawner events look pretty much like EventSounds events. You'd still need to add both to a game object if you wanted to spawn stuff AND make a sound from the same event though (like BecameInvisible).
     
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Core GameKit V 3.2.6.9 is live! Changelog:

    • Fixed compile error for Unity 5.5
    • Fixed max qty mismatch in Pool Boss Inspector.
    • Fixed Pool Boss lookup prefab name error.
    • Fixed bug in PoolBossDespawn Playmaker Custom Action that would not despawn 2 different objects if the property changed.
     
  24. Yawarshah

    Yawarshah

    Joined:
    Nov 2, 2015
    Posts:
    13
    Hi jerotas,

    I would like to thank you for such a great plugin :) .. Its such a time saver.

    Regards,
     
    Last edited: Feb 7, 2017
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you! Let us know if you get stuck on anything.
     
  26. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @jerotas ,

    Looking at this Asset. Couple of questions:-

    - is there any inbuilt functionality to save/load World/other variables, default and then as changed in runtime?

    - prefabs - changes to components and field values in components - any functionality to save/load changes (changed components, changes to components, changes to fields within components) with instantiated prefabs (GOs) in runtime?
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    No to both. You can code any additions like that that you want. Everything is easily extensible and can be subclassed to change default behavior.

    I can't think of a way that this could be handled for you without requiring coding. It's been asked before.

    However, the 2nd question - kind of...
    you can use the value of a World Variable for every Inspector field that's a number (instead of typing a number there), so if your World Variable changes value or persists from the previous game, then it would automatically load those changes.
     
  28. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @jerotas ,

    Thanks for such a speedy response. The big boon then in your Asset is all the functionality surrounding pooling, spawning, killing etc.
     
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'd agree with that. Not just killing but all the other massive functionality in the Killable script (damaged / deal damage / vanish prefab, knockback, etc).
     
  30. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    Yeah - integrating it with Playmaker and other Assets it will be v useful to me, time to save up, again ;)
     
    jerotas likes this.
  31. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Core GameKit (and all other Dark Tonic plugins including the unique Master Audio Multiplayer) are now 30% for a limited time!
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 3.2.7 will be live in a few minutes. Changelog:
    • Add an option for spawners to "Spawn Outside Pool", meaning with no parent Game Object instead of under Pool Boss. Default is still under Pool Boss.
    • Added OnSameGameObject, OnChildGameObject & OnParentGameObject custom event Send To Receiver modes.
    • Breaking change: FireCustomEvent now takes a Transform instead of Vector 3. You must change any code that was calling it.
    • Updated Playmaker optional package to fix compile errors due to the above change.
    • Fixed bug where reloading a Scene would log errors for Custom Event Listeners in the Scene.
    • Fixed compile errors for Unity 2017 beta.
     
  33. UsernameZero

    UsernameZero

    Joined:
    Feb 19, 2015
    Posts:
    29
    Loving the update, was wondering how adding Unet support was coming along? :)
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Photon will be first. Haven't really made much progress on it though. Have been busy with other features for a bit (mostly for our audio plugins).
     
  35. Flynn_Prime

    Flynn_Prime

    Joined:
    Apr 26, 2017
    Posts:
    387
    Bought this yesterday and it is absolutely brilliant. Still not quite got my head around the ins and outs, but I love the functionality.

    I am just wondering, is there anyway to make it so that enemies spawn anywhere (on the navMesh) that is off-camera? I saw there is an option for distance away from player, so maybe there is a way to change that to cameras field of view?

    Also, are your killable functions compatible with mobile platforms?
     
    Last edited: May 16, 2017
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Things can spawn off camera just fine, although you will need to place your spawners on the navMesh accordingly. If you do though, there's a couple settings on Killable (if your spawns use it) that you will need to check so they don't immediately depsawn after spawning though.

    In the Despawn & Death Triggers section, Despawn Triggers header, there's:
    1) Not Visible Too Long. Make sure that's not checked.
    2) Invisible Event. Probably turn that off as well in case something went barely on screen and then back off.

    The entire plugin works great on mobile.
     
  37. Flynn_Prime

    Flynn_Prime

    Joined:
    Apr 26, 2017
    Posts:
    387
    Sorry, I worded my question badly. What I meant was, is there a way to have it so that enemies cannot spawn in the camera's field of view? So as the player walls around, enemies are randomly spawning in front of him
     
  38. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Can't spawn in field of view? Well as long as your spawners are far enough away from the player and/or obstructed, then it would work. You may need to add scripts to keep the spawners moving around, or a certain distance away from player and behind his head, etc.
     
  39. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    @jerotas
    I get these two errors when i try to use your TextMesh Pro integration for the Core Gamekit:

    Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableListener.cs(3,7): error CS0246: The type or namespace name `TMPro' could not be found. Are you missing an assembly reference?

    Assets/Plugins/DarkTonic/CoreGameKit/Scripts/WorldVariables/WorldVariableListener.cs(23,17): error CS0246: The type or namespace name `TextMeshProUGUI' could not be found. Are you missing an assembly reference?

    Can you please help?
    I use the TextMesh Pro source code version, maybe thias is importand.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I'm only seeing one version of TextMeshPro on the Asset Store right now, and it's free. Is that the one you're using? If not, please provide a link to where I can get the one you're using.

    Side note: Any assets that are not installed in the Plugins folder (where CGK is installed) will not compile if CGK is to integrate with them. That goes for the rest of our plugins as well. If TMP is installed anywhere else, you will need to move it into Plugins folder. Let me know if that's the case. This is where all assets should be installed really, as it eliminates the need to recompile all code in the Plugins folder unless something there is changed.
     
  41. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    The one in the asset store ist the free one (without the source code) now.

    I have bought it long before it went free and we are getting updates over the forum from the developer if we provide him (or the system) our invoice number. If you do that you will get the latest one with the source code.
     
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Ok, we also bought it before it was free. Did you check where the code is for TMP (Plugins folder or not)?
     
  43. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    It is not in the plugins folder
     
  44. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Then move it to the plugins folder. I already said that in my first response if you missed it. Impossible for it to compile if it's not there. Actually all assets really should be in the plugins folder as it reduces compile time. We do follow that guideline. Unfortunately not everyone does.
     
  45. UsernameZero

    UsernameZero

    Joined:
    Feb 19, 2015
    Posts:
    29
    Thanks for the update, can't wait for some kind of multiplayer support really. :)
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    We now have a sale on Multiplayer Master Audio. $60 instead of $99.99 gets you full multiplayer-ready Master Audio with either UNET or Photon!

    Upgrade price from Master Audio is now only $30 as well!
    If you're enjoying Core GameKit and haven't picked up Master Audio yet, give it a shot (or the multiplayer version)!
     
  47. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    When using the SyncroSpawners how do I get it to start spawning instantly rather than a delay based on the total time?
     
  48. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    You can't. That's how it works.

    It's on the roadmap to add a checkbox to change that though.
     
  49. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Ok thanks.
     
    jerotas likes this.
  50. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    V 3.2.7.1 changelog:
    • Breaking change: Valid Qty field for Custom Events (used for Closest or Random X Receivers option) has been changed to be able to select a World Variable value as well as entering a number. If you were using / want to use Random/Closest X, then you will need to delete existing Custom Events and create them again.
    • Added an Awake method to Killable Listener. That will be called when Spawned is not, that is, when a Killable starts already in the Scene and is not spawned the first time.
    • Added the new method to Killable's Playmaker Listener too.
    • Added Global wave shift up/down buttons.
    • Added a pop up prompt to make sure you want to delete / add / shift up / down Global waves because it can't be undone.
    • Fixed some Garbage Collection in Pool Boss.
    • Increased Group H.P. for Damage Prefab to max of 100,000 instead of 5,000. If you find it does not let you increase past 5,000 you will need to remove and re-add the Killable component.
    • Bug fix: PoolBoss.NextPoolItemToSpawn returned null even when Allow Instantiate More is checked.
    • Added Wave Description field for Global waves.