Search Unity

[RELEASED] Coop Action Game Kit - With Procedural Level Generation & up to 4p Local Coop

Discussion in 'Assets and Asset Store' started by DanielSnd, Jul 29, 2014.

  1. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382


    Alright, so I started making this Coop Action Shooter and I enjoyed the result so much that I decided to turn it into a Game Kit to sell on the asset store. It's quite modular and I exposed a lot of the behavior to variables, so you'd be able to change a lot of the behavior of the game just by tweaking values :) You can check some of the variables you can change on the "Cheating Area" of the demo.

    Some interesting features:
    • Procedural Level Generation - I included a tweaked version of my old Procedural Level Generation, it's generating some quite interesting levels for this kind of game :D You can play on them by clicking on "Adventure" on the demo or you can fiddle around with the generator variables by clicking on Level Generation. It also accepts Seeds :D
    • Coop - It supports up to 4 players local coop, Players can choose preferred method of input for each player, be it a Keyboard + Mouse, 2 Players haring same Keyboard, or Gamepads.
    • Weighted Loot Drop - Set what the enemies can drop, with the chance of each item to drop. Make stronger weapons appear more rarely.
    • Pickup new weapons - Make new weapons by tweaking the values or extending from the parent weapon classes, then Drop the Prefab into the Loot Spawners and your players will be able to find them on their adventures :D
    • Melee/Ranged/Exploder Enemies - It comes with a modular Enemy AI that can be tweaked on inspector. There are 3 Attack types ready to be plugged into it, Melee attack, Ranged attack and Self-destruct explosion attack.
    Well, if that sounds interesting, please give the Webplayer Demo a go :D



    http://u3d.as/content/daniel-snd/coop-action-game-kit

    * DISCLAIMER: Procedural Level Generator will not generate levels optimized for mobile (Levels generated will have thousands of drawcalls), however you can make levels by hand optimizing to keep drawcalls at a minimum, you can find a mobile example of hand-made optimized scene here (APK). Or watch me playing it on my iPhone here (Youtube) *
     
    Last edited: Aug 12, 2014
    TheRealFuzz and Besus like this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Looks awesome! What's the initial price buddy? I might want to crank something quick and dirty out with this.
     
  3. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Do you have plant to support mobile ?
     
  4. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Looks great! The zoom on the Level Generator was very difficult to master using a magic mouse (OSX), could you make this less sensitive? I couldnt actually get back to see the level!
     
  5. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Thanks :D Right now I'm thinking of starting at $25 as a introductory offer, but I'll most definetly bring the price up in the future :)

    I tried it on mobile, it's quite laggy and the controls I implemented didn't work so well, so probably not. I do not recommend this for mobile.

    Will do, thanks for pointing it out XD
     
    Last edited: Aug 10, 2014
  6. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Definitely looking forward to this! If the base/demo gameplay and generated levels are this fun, I can only imagine how awesome something based on this kit will be!
     
  7. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    On the Asset Store yet? Looks great!
     
  8. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Thanks :D Making it fun to play was a priority! XD

    Still Pending review :( Hope it goes up soon.
     
  9. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Hopefully it gets approved soon. Looking forward to buying it!

    So excited to buy it and give it a good go. Are you planning to add more features along the way or is it pretty much as is?

    I also have some ideas if you're taking them.
     
    Last edited: Aug 4, 2014
    DanielSnd likes this.
  10. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Me too :( It's taking a while

    I do plan to add some more futures, but now exactly sure on when.

    I plan on improving the enemy AI, finishing up the Stun state and the Evade State. And maybe make some extra attack types.

    I already made a Melee weapon extension for the player, but I didn't make an example for it, so I'll make an example of the Melee Weapon.

    I also want to make a Wave Spawner for a Arena game mode with enemy waves.

    What are your ideas? :D
     
  11. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Awesome! I was hoping for all of those :) Would love an arena mode.

    Some other ideas I had were some different weapon types like a laser and grenade launcher and being able to pick up an armour or shield upgrade. Being able to revive players would be interesting too.
     
  12. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Oh those are good! Added them to my to-do list!

    Grenade launcher is already kind of possible as you can make a projectile that spawns Explosion prefab on Death and tweak the weapon variables so it only shoots 1 at a time with a higher cooldown. The only thing it wouldn't do is fall on the ground, for that I'd have to write a component that brings it down over time and kills the projectile once it hits the ground, but that'd be quite simple to do.
     
  13. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Glad you like them, I've got a few more, too. :)

    A tractor beam or magnet pick up that draws coins quickly and accurately towards the player. I know you can already jump, which is cool, but being able to roll or dash out of the way with a cool down would be cool.

    Being able to have 2 weapons at a time and switch between them would also mix gameplay up a fair bit.

    I'll post again if I think of more, if you'd like. Just so excited to get my hands on it!
     
  14. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Roll/dash is easy to implement :D I'll probably add that to the list.

    To have 2 weapons at a time would require a new button to change weapons and a bunch of changes to the weapon system, so I don't know about that... Maybe in a distant future? Certainly not a priority right now XD

    The coin magnet at this time rests on the coin, so the one that controls the velocity of the coin magnet is the coin instead of the player... I'd have to redo the way the magnet works to have a variable on the player control it instead, so It won't go into the list, at least for now.

    In other news...

     
  15. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Awesome! Buying now :)

    Loving it so far! I know you mentioned you made it so players can melee enemies and obviously it's not in this version, or an example of it anyway, but how does it work? Does the player just kick or hit the enemy or do they use another weapon, such as a knife?
     
    Last edited: Aug 7, 2014
  16. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    There's actually a Melee Weapon hidden inside the weapon holder from when I was implementing it, it's hidden. The reason there is no example is because I didn't make a model for a melee weapon. If you unhide the Melee Weapon and you link it in the "Current Weapon" field of your character you should be good to use it. (It's another weapon.)

    I'm going to start making Tutorials about the kit on my Youtube Channel ( https://www.youtube.com/user/danielsndgamevideos ), will cover creating new weapons, including melee :)

    Btw, If you enjoyed it I'd really appreciate a rating/review on the asset store ^^ those really help.
     
  17. TheRealFuzz

    TheRealFuzz

    Joined:
    Jul 17, 2012
    Posts:
    308
    Awesome, I'll have a look for the melee weapon and I'll be sure to check out your channel!

    I'll rate it now :)
     
  18. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Great work so far! I took a look and noticed that on the Asset Store it says it requires Unity 4.5.2. It will definitely help your sales if you don't require the absolute latest Unity all the time. Unfortunately the only way to do that is to install a lower version of Unity when you submit your package to the store. That will become the minimum Unity version.

    Hopefully they fix this someday. I still keep around v3.5.7 for when I submit my assets.
     
  19. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I do it by CTRL+C it while playing -> CTRL+V it after finishing the play. But I probably should probably look into including a Generate button in a later update to make that process easier.
     
  20. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    im interested

    but i have couple questions

    any plans to have camera follow player as they turn so its always behind him and player never runs towards the camera

    also i would be interested in dual weapon support or at least weapon with dual mode

    i would also be interested in melee weapon support for players

    i also would be interested in support for explosives that player can throw at enemy

    what about armor that you can pickup or at least replentish

    also would be interest to have inventory system where players can store items that you pickup and select what items in their inventory they can use. that way there could be multiple weapons but only one in use

    also are there any plans to add support for additional number of players

    any plans on adding support for coop with master server and some sort of matchmaking and/or game brower
     
  21. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Whoa whoa whoa, that's a lot of features man.

    If anything, I would request the following in the next build, which I think are more reasonable:
    • Export level capability from the editor.
    • Procedurally generate water, since I felt that lack of water felt odd. 2 kinds of water should ideally be generated: shallow and deep water. Player can walk on shallow water but can't on deep water. Think of those GBA games where there's a beach and shallow water, but if you walk out too far, you hit deep water and can't go any farther. I know this is kinda complicated, so maybe just shallow water for the next update. Lack of water in the procedural generation does seem odd to me though.
    • Pause game capability. This shouldn't be too difficult, and this can even be expanded later on for semi-realtime actions like pause game to switch to a different weapon, etc.
    Eventually this could become a full-blown kit. I already like how modular it is and will probably be using its camera script for some other projects of mine. If the procedural generation had a bit more features, I would probably use it more. I do think you have something awesome with the procedural generator, and I would recommend expanding on this if you can.
     
  22. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Hm, not hard to do for the singleplayer, but that kind of camera wouldn't work on Coop, since each player could be facing a different direction. I could include it though, for when players are playing singleplayer.

    Scripting-wise, would be easy to do, but would require a lot more animations, so i won't be including it in the kit.

    It's actually already in the kit, there's just no example of it available. I'll make an example for next update :) I just need to model a katana or something.

    I can make an example of explosive weapon like a grenade launcher and ship it with the next update, but to actually have the players carry and throw things would require too much (Extra animations, extra buttons to be used). So: No carrying and throwing things, Yes grenade launcher.

    Too complex, I thought about adding those but I decided to keep the kit simpler and more modular for people to be able to add the functionality they desired.

    It's easy enough to add more, I could make a tutorial on it, but I don't know how many people actually have more than 4 gamepads laying around, so I thought it wouldn't be needed o_O

    Definetly not, this is LOCAL COOP (Same machine), I know nothing about networking.


    I never messed with custom editors, but will try and see what I can do with it to add the "Generate outside runtime" button xD.

    It would be too complicated D: The floor is literally a plane, I couldn't really carve anything out of it for water.

    Oh, Pause is pretty easy, will add in for next update.

    Awesome :D Thanks.
     
  23. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Exeneva said:
    • Procedurally generate water, since I felt that lack of water felt odd. 2 kinds of water should ideally be generated: shallow and deep water. Player can walk on shallow water but can't on deep water. Think of those GBA games where there's a beach and shallow water, but if you walk out too far, you hit deep water and can't go any farther. I know this is kinda complicated, so maybe just shallow water for the next update. Lack of water in the procedural generation does seem odd to me though.
    It would be too complicated D: The floor is literally a plane, I couldn't really carve anything out of it for water.

    So no possibility of adding water at all? :(

    Instead of a plane, could you just use a flat terrain?
     
  24. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I didn't say it's impossible, I can think of a few ways of doing it, I just think it's too complicated for something that's not really necessary, so not planning on doing it.
     
  25. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Good to hear! The world needs more games where you can get together with friends, eat pizza, and steal each others' kills in person. :) Just bought it!
     
  26. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I am curious though - why use a flat plane over flat terrain?
     
  27. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    thanks :D

    With a plane it's easy to adjust size on runtime based on the desired variable input on Procedural Generator and Tile the texture based on it as well.
     
  28. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Alright, so I fiddled with the Profiler and figured out what was causing the mobile laggyness.... So... Next update will have a mobile scene example :D (Will still require you to follow the instructions on the documentation to add mobile controls though)



    Also updated the APK example: https://dl.dropboxusercontent.com/u/10197361/MobileCAGK.apk

    So, this is what will be coming with version 1.1:

    • Melee Weapon Example (+ Simple Katana model)
    • Pause screen (Press Esc to pause, or pause button on controller)
    • Mobile scene example (FIXED! Not laggy on my nexus 7 and my iPhone5 :D, Obviously not using Procedural Level Generator though, that one will never be good for mobile because of the drawcalls.)
    • Pickup Object code rewrite for better performance (That's what was messing up performance on mobile)
    • Procedural Level Generator "Generate level button" to generate levels out of run-time.
    • Weapon Inventory System. Now you'll be able to carry more than 1 weapon at a time, and swap weapons at will.
    With the update, it'll also come the end of the introductory price of $25. So if you still haven't got the kit, now is the time XD

    I have other features in my list, but those will have to wait until the next version.
     
    Last edited: Aug 12, 2014
    Exeneva likes this.
  29. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    nice, especially with the mobile updates to come... purchased
     
    DanielSnd likes this.
  30. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Alright, the update was submitted to the Asset Store last night :) Should be up in about 5 days.

    I also added that to the update :D Now the player can have a weapon inventory. You can control how many weapons he can carry at a time by changing a Max Inventory variable on the new Weapon Manager component. By default it's 3 (Default weapon + 2 others). There is a button to swap weapon and a button to drop weapon.
     
  31. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hi Daniel! I just bought this kit and it is really cool so far. I do have a question about the mobile controls though.

    Right now whenever I touch the "AttackJoystick" the player seems to start shooting in a particular direction; in my case, toward the left.

    If I stop touching the AttackJoystick while the character is facing and shooting in some other direction, say, the right, and then I press the AttackJoystick again, the character will swivel and start shooting to the left again.

    I would like the behavior to be: wherever the player is facing at the time the AttackJoystick is pressed, the character will start shooting in that direction.

    In other words, I don't want the player to always start shooting to the left every time, even if he is, say, facing to the right before shooting.

    I hope this post makes sense. I will try to clarify further if you don't know what I mean. Thanks!
     
  32. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Hi there, are you pulling the joystick towards the direction you want the player to shoot? Because that's how it should be working, he shouldn't be shooting towards a specific direction, but towards the direction the joystick is being pulled. One thing that might be happening is that if you have the SinglePlayerMouse controls active, it might be actually trying to shoot towards the place you're touching because of the mouse shooting controls, but that would be your right, not your left, so I'm not sure what the problem is.
     
  33. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Hi DanielSnd,

    i like your new asset so far but i want to know if i should make a game level by hand for mobiles, can i then use different hights. I read here that this can not be made because of the automatic level creation but if i made my level by hand, can the player use this kit then with hills and valleys?
    I have bought another asset like this (also it have no multiplayer solution) and there i only can play on a plane i think mainly because of the shooting but i want something more in my game. Then i can also make this kind of water that i read some lines above.
     
  34. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Hm, I can see no problem in having them walking or jumping up and down on Y, the only problem I can imagine is that hte shooting is always on the height of the gun, so he wouldn't be able to shoot down or up a hill, but he would be able to shoot at different heights. So as long as the battle happens in a plane, everything should be good. If you want I can make an example level with Terrain and you can try playing it and see how it feels, what do you think? Let me know and I can throw something together quickly :)

    - Edit -
    Seems fine to me, except for what I already mentioned, that the Shots will go straight Y from the Gun position, as long as you account that into your enemy positioning, you should be fine.

    Gif Top-down view:
    http://gfycat.com/IdealisticPeacefulFirefly

    Gif Alternative Closer to character view:
    http://gfycat.com/GrayCrispJuliabutterfly
     
    Last edited: Aug 14, 2014
  35. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Could you verify that the same thing is happening in your case as it is for me? Watching your example mobile video, it seemed to be happening for you too, but it was hard to see because your character was mainly moving toward the left.

    I will give you the exact details of what is happening in my case.

    I have set the right joystick as the AttackJoystick. The problem is when I simply touch down my right thumb without purposefully dragging in a certain direction (because I want to fire the weapon but not change the facing direction), there is usually a tiny bit of drag to the left in my case. The joystick doesn't have a deadspot, so even the tiniest movement is registered as a full drag, and the player always spins to face left before starting to shoot.

    The desired behavior upon touchdown would be to start shooting in whatever direction the character is currently facing (disregarding any tiny drag). Only upon dragging the mouse a significant distance in a desired direction should the player should rotate toward that direction.

    Basically, the joystick needs to have a deadspot setting that disregards tiny drags as unintentional.

    HOWEVER, the player also needs to start firing the weapon (in whatever direction the player is currently facing), even if the finger is within the deadspot.

    In other words, the player's rotation should ignore any touch movement if it is within the deadspot. However, the weapon should start firing even if the touch movement is within the deadspot.

    Look at the UAGK+Control Freak asset on the asset Store, or the Gun Bros 2 game on GooglePlay for other possible ways to handle this issue. Their shooting/control mechanics are nearly the same as your asset.

    Hope this clarifies the issue. Please give me your thoughts. Thanks!
     
  36. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I see :D It does clarifies the issue.

    Over here if I just touch the joystick without pulling it won't shoot, however if I'm moving the move joystick while touching the attack joystick in the deadspot it'll shoot to the left, I imagine It's counting the left touch on the move joystick for the attack one somehow.

    So here's what I did, first just in case I took the numbers on Move and Attack joysticks TapZone to W 5 and H 5.
    Then I went into PlayerInput.cs and added:

    Code (csharp):
    1.  
    2. public void TryAttackZero() {
    3.         Vector3 attackDir = pC.cM.body.transform.forward;
    4.         TryAttack(attackDir.x,attackDir.z);
    5.     }
    This will get the current body rotation and pass it as a position to the attack function.

    In PlayerInputMobile.cs the update function right before:
    attackTweakedLastFrame = false;

    Add:
    Code (csharp):
    1.  
    2.     if(totalAttack==Vector3.zero && attackTweakedLastFrame)
    3.             pI.TryAttackZero();
    With this I can now shoot towards the place I was moving when I started shooting if I don't pul the joystick.

    If you own ControlFreak you can use it instead of the free Joystick solution I suggested, it's probably not hard to implement it into PlayerMobileInput.cs, and it does probably have a way better deadspot.
     
  37. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Thanks Daniel, that is very helpful.

    I also put in a crude deadspot fix that will work with any joystick. This seems to work, but I don't understand all the rest of your code, so I'm sure you can improve on this idea and put in a better, more elegant fix:

    In PlayerInputMobile.cs in the AttackJoystickMovedEventHandler(Vector3 dragVector) method, I added the lines:

    if (Mathf.Abs(movement.x) < .1f)
    movement.x = 0f;
    if (Mathf.Abs(movement.z) < .1f)
    movement.z = 0f;

    right before this statement:
    movement.Normalize();

    This means the AttackJoystick no longer registers a direction unless the joystick is pulled a certain amount (0.1f in this case). Maybe you could add an variable option for a deadspot amount.

    P.S. Whatever code fixes you suggest, could you please add them to your code and release them in the next version? I don't like modifying code of assets because then it's a hassle to update assets when new versions are released. Thanks Daniel!
     
  38. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Already did, also added the code you just gave :D thanks!

    The next version is going to take a while to be done, I want to add some more of the features that were requested here and some others I had planned (At least the Enemy Wave manager, for arena game-mode and the Player Dodge.)

    Oh, and if you're enjoying the kit, and you can spare a moment to rate it, that would help a lot :D

    Thanks again \o
    Dan.
     
  39. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    I just added a review. You get five stars sir :) Cool, can't wait to see more updates. Enemy waves and Arena sounds awesome.

    Can you possible send me a melee example scene if you have one?

    And for the next version, maybe add more enemy types, such as humanoid enemies that walk around?

    Thanks, I'm having lots of fun with this kit!!
     
  40. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    The new update already has a melee weapon example, Just drop a Katana (Resources\Weapons\) in front of you and Pick it up :D Or put it in the Default Weapon slot on the player prefab. I think I have all the weapons on the ground in the TestScene scene.

    I can make a different texture with the same hero model to use as a humanoid enemy for sure :) The programming would be the same.
     
  41. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Nice! The katana works like a charm.

    Any way to get a random melee animation to play? So he's not always doing the same katana motion over and over.

    If the humanoid enemy isn't that hard, is it possible to write quick instructions on how to do it? Maybe I don't have to wait til your next update then, and I can use my own humanoid enemy characters.

    Thanks!!
     
  42. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Well for having random melee animations... This is not a elegant solution, but will do:
    Go into MeleeWeapon line 30 and change:
    Owner.cM.anim.Play(meleeSettings.attackAnimationName,meleeSettings.attackAnimationLayer);

    to:

    Code (csharp):
    1.  
    2. float RandomAnimation = Random.value;
    3. if (RandomAnimation<0.33) {
    4.    Owner.cM.anim.Play(meleeSettings.attackAnimationName,meleeSettings.attackAnimationLayer);
    5. } else {
    6.    if(RandomAnimation<0.66) {
    7.           Owner.cM.anim.Play("Insert the name of another animation state here",meleeSettings.attackAnimationLayer);
    8.    } else {
    9.            Owner.cM.anim.Play("Insert the name of another animation state here",meleeSettings.attackAnimationLayer);
    10.    }
    11. }
    12.  
    13.  
    Remember to put the names of the animation states you want in there.

    About the enemy art replacement, I'll do better. I'll make a video tutorial :D Actually, I'll make a bunch of video tutorials covering several features of the kit. But I'll do the enemy art replacement one first.

    And thanks for the review :) Made my day!
     
  43. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Cool thanks so much!! You give the fastest support ever.

    I just discovered your videos tutorials too. Good stuff! I'm gonna have to look through those and glean some knowledge.
     
    DanielSnd likes this.
  44. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Daniel, I have a question... I don't know if this is specific to your asset, but COOP Action Game Kit has some classes with somewhat generic names that are clashing with other assets that are already in my project. Such as:

    Button.cs
    PlayerController.cs
    SoundManager.cs

    Is there a quick and easy way to make your asset play nicely with other assets without me changing any code? Thanks!
     
  45. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Sorry for the delay on the tutorial, I'm about to move to another country the next week so I've been spending some time preparing things for moving. Will be doing the tutorial on the enemy change soon ^^

    About the classes with the same name, you can put the kit's classes into the same namespace.
    To learn more about namespaces:

    http://unity3d.com/learn/tutorials/modules/intermediate/scripting/namespaces
    http://docs.unity3d.com/Manual/Namespaces.html

    I'll look into doing that with the kit by v1.2 so this problem doesn't happen with other people =x
     
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    Daniel, could you constrain movement so players can't run off camera?

    And thanks for making everything nicely modular. It just took a tiny glue script to get enemies under Shooter AI control.
     
  47. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I thought about it, but I couldn't figure out a way to do it :(
     
  48. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Could you please write what you changed in the project settings because i can not see clearly what has changed and i want only use parts of your assets in my projects and want to know what i should change in the new project so your parts can run there well or at least understand why it is not working so well and know where i can change things depending the project settings.
    For example i am not sure if you change the physics and if that will work with my project where i maybe want to change the physics my way.
    Thank you.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    You could use the invisible walls trick: Create an empty GameObject with four Box Colliders aligned to the sides of the camera frustrum. (The Camera Tricks page has a lot of information about working with the frustrum.) Make it a child of the camera. The colliders should be large enough to extend from the camera all the way down through the ground. Put this GameObject on a new layer that only collides with the Player layer. Since the invisible walls are children of the camera, they'll automatically follow the camera around. No scripting necessary.

    Or, you could instead limit movement in the characterMovement script. The ground is a plane on the X-Z axis. Precompute the maximum X (left/right) and Z (near/far) distances from the center to the edge of the frustrum. You only need to do this once, based on the maximum zoom out distance. You're already computing the current center point between the players every Update. In characterMovement, compute the X and Z distances between each player and the center point. If it's greater than the precomputed maximums, set the velocity in that direction to 0.
     
  50. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    Hmm, I'm not entirely sure of everything I changed. I'm pretty sure I added extra inputs for the weapon swapping and dropping: here is my input list: http://puu.sh/b8E3I/207dc4e55b.png
    I don't think I have changed anything in physics though:
    http://puu.sh/b8E8J/aaa4807449.png

    That sounds interesting :eek: I'll give it a try with the colliders aligned to the sides of the camera, thanks :D

    ----------------------------------------------

    Sorry for the delay to release a new updated version or the tutorials, I'm moving to another country tomorrow so this past 2 weeks was quite busy with preparatives. I'll get back to working on the new version once I get settled at my new place :D