Search Unity

[Released] 2D Jump'n'Run Framework

Discussion in 'Assets and Asset Store' started by Samb88, May 23, 2011.

  1. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    Hey all!

    @modeling_man
    At the moment. the boost is only for running, but I will look into that, so the speed will be carried over to the jumping!
    Jumppads with angles will come, but I have to do some stuff before that, so the player can correctly act to added forces!
    Of your mentioned things, I will implement some but haven't decided wich of them. I hope you will be pleased with the next update anyway :)

    @Zharzeu
    Checkpoints are already there, saving is something that you have to do. It's a bit heavy to make a saving system that will work for every game. Maybe I will make an example and everyone can build on top of that.
    Inventory and weapons are tricky, inventory I would say "no" so nothing like an rpg inventory, but collecting items, keys etc. Weapons are tricky, because I made this framework mostly for 2D graphics. There will be melee attacks but I have to see what I can do for normal weapons.
    Health/Death is already there, I will add a user interface for that.
    Upgradeable Stats is something you have to do.. This is very untypical for a platformer, but not that much of a problem. Just program a trigger that manipulates the maximum vars like running speed, jump height etc. :)

    @p6r
    That reminds me of paper mario!

    (notice the lighting of bowser)
    It's not easy but maybe you can add the 2Danimation component to an empty gameobject and overwrite it with the one of the player, everytime the player turns around. I will look into that problem for the next update.

    and again @modeling_man
    Thanks man, but I will do my own little system for that. But I'm glad you found a solution for yourself :)
     
  2. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Yes dude I can't wait for the update:)!!!
    gogogogogogogoggoo!!!
    B
     
  3. Zharzeu

    Zharzeu

    Joined:
    Aug 21, 2011
    Posts:
    4
    Samb88, thanks for the update and for answering our questions. I think you covered everything, but I had one more question about weapons. Can you do an example of a held weapon that swings? Like a sword. Also, I think it was mention that something like Mario's fire ball would be useful.

    Anyways, keep up the great work! I am looking forward to what the next updates have in store. I am planning on purchasing this framework soon, but I was curious if I should wait until you get your own store setup, or buy it through the Asset Store. Any preference?
     
  4. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    I will start to work on the homepage in a few hours and it should be online before the next update hits. So yes, you can wait :)
    Sword would be melee attack (just think of the attack from the simpleEnemy just for the player) and that mario fireball thing is a good idea! I will do that!
     
  5. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Hey samb88 the fireball thing would be awesome especially if the fireball had a ton of variables that could be edited so we could make our own types of projectiles (speed, bounce, no bounce, follow/track enemy, spread shot)
    I just think of all the different types of Mega Man shots, or like with Contra where you could shoot spread, rapid, lazer, fireshot etc.
    That would be TIGHT;)
    B
     
  6. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    Great package, just picked it up to prototype a few things and to mess around. I just wondered if anyone else was finding that their characters sort of stuck to walls? I'm not sure what settings I have to alter to change it... but my character will actually stick to wall surfaces that he touches without moving for a good 5+ seconds, he randomly falls off afterwards. I tried disabling wall jumping and wall sliding just in case the detection was causing issues.... but that didn't seem to do it.

    Any suggestions?
     
  7. DD

    DD

    Joined:
    Jul 31, 2010
    Posts:
    5
    Thanks for an awesome fun tool.... I was wondering what the best way to replace the left joystick with a gamepad type interface... similar to a gameboy, ..
    is there a way to simulate fake input key press event for the "adws" keyboard control or do I need to write a whole new control, ... Thanks for the input...
     
  8. Haircut

    Haircut

    Joined:
    Aug 8, 2011
    Posts:
    2
    What sort of multiplayer is supported with this package?
     
  9. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @modeling_man
    I will try my best :)

    @DavidB
    Could you make a webplayer version with the problem? Did you changed the collider size?

    @DD
    Hm, I use a modified version of the virtual stick code from unity. Maybe with some clever modified vars you could emulate the gamepad style. But thats really a thing you should do for yourself :) Shouldn't be that hard! Just study the virtual stick code how I pass the position of the stick to the player.

    @Haircut
    At the moment, you could do a splitscreen multiplayer styled game, I you set up everything correctly. But there is no "how to"-manual at the moment.
    At some point, I will implement a smash bros styled camera, that zooms in and out if needed.


    @all
    My website will be on hopefully tomorrow. So don't worry paypal user, you will get your chance :)
     
  10. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    I get the sticking issue too, not for 5+ seconds but I definitely see the hit collision as something that could be a little tighter. For example, I've seen my character jump and stick to sides/top corner of platforms or enemies. So I wonder if it's something to do with the physics processing. You can apparently up the amount of process/iteration on the physics (I guess it makes the results better but can be costly on the engine) which could improve collision.
    B

    Will the website update also come with a version update?:)

    also: you could do a splitscreen multiplayer styled game, I you set up everything correctly.

    Did you mean IF you set up everything correctly? OR I set up everything correctly?
     
  11. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    I'll try to get a webplayer up soon, but yes I've modified the capsule to fit my 3d character. (I'm using a 3d character when it sticks btw). Also in the editor whenever he touches a wall, 2 white debug lines are drawn perpendicular to the wall. I have disabled wall sliding and wall jumping hoping that would fix the issue, but it hasn't.
     
  12. DavidB

    DavidB

    Joined:
    Dec 13, 2009
    Posts:
    530
    I fixed the issue of my 3d character sticking to walls. It's just a hack change atm, but should be easy enough to check for in your actual system.

    The problem was the detection of wall_left and wall_right in PlayerMovement and PlayerJumping. Because my character was 3d, it was not always appropriate to check the X axis of the collision point versus the local space X of my character (as it would be facing into the screen and out of the screen due to the character running left and right.)

    What I did was change the checking parameters from local space and kept it in Global space (that way the turning character would not factor into the equation).

    Code (csharp):
    1. //if(transform.InverseTransformPoint(contact.point).x<-0.2)
    2.             if(transform.position.x - (contact.point).x>0.2)
    I just changed the first check code for the second...adapting it of course to the forward and reverse directions in both of the mentioned files. Seems to work just fine now. My character is no longer getting stuck.
     
    Last edited: Aug 26, 2011
  13. SlySly

    SlySly

    Joined:
    Jan 26, 2011
    Posts:
    23
    Good to see other coder who help for this awsome asset! (A canadian? Yo cousin! ;)
     
  14. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I hope there will be something pickable in the next update like coins and health.
     
  15. Deej

    Deej

    Joined:
    Jan 29, 2011
    Posts:
    5
    ug still having a problem with the boost not working. Simply created an empty new project, import and install fresh instance of the framework, open your demo scenes to see, and even though the boost object is assigned, I get a game crash and NullReference Exception: Object reference not set to an instance of an object., when the player enters boost mode.

    Also get a crash when the player kills the bad guy sometimes, something about trying to reference a destroyed object?
    Looking forward to next update :p
     
  16. SlySly

    SlySly

    Joined:
    Jan 26, 2011
    Posts:
    23
    Yo,

    I am actually working with this 2D Jump n run frameworks and with the PlayMaker asset. It could be cool to have this two asset compatible. I'm look how to do that for have the possibility to manage animation. But I'm not a coder so my technic is limited. If someone is skilled enough for that it can be cool. If yes, please let me know, or contact me.
    I will keep in touch about what I will find interesting.
    Thanks
     
  17. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @DavidB
    Thanks for that, I knew that it had something todo with the size of the collider. Thanks for that!

    @modeling_man
    "If", sorry for that :) Look at the end of this post for more infos.

    @Deej
    Sorry for the boosting problem, but after assign the boost_prefab to the pointer it shouldn't show any errors anymore. Never saw that bad dude error but I will look into that, thanks!

    @SlySly
    Hmm I will have more time mid september for that kind of stuff. Maybe I'll write with some guys so we can make this framework and others work nicely together. Like RageSpline :)


    Ok, so heres the deal: I have 4 deadlines for mid september. So, my time is limited at the moment. Right know, for the next update, I will make the fireball thingy and many little tweaks and adjustments (pickups like health etc.). The update after that will be a pure template update with some scenes that shows you what you can do with the framework (minigames, local multiplayer etc.)
    Hope everybody is fine with that :)
     
  18. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208


    Had a little time on my hand so I made bouncing fireballs! Yay! I will tweak them a bit and read all posts in this thread since the last update to get some more tweaks into the next update. So it should be ready in the next few days.. I hope.
     
  19. SlySly

    SlySly

    Joined:
    Jan 26, 2011
    Posts:
    23
    Thanks for the follow-up man! I can't wait for the next update :)
    Good job!
     
  20. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    Hey all,
    I submitted the update, containing the fireball and pickup hearts


    The enemy can spawn now as many prefabs as you want, so it will be possible to let some enemy drop a key and so on (but keys and doors aren't already there, so for now you have to make them for yourself)

    Also, the updated webplayer will be temporality on another webspace. You can find it here: http://www.gamingclerks.de/temp/jumperframework.html

    Next up are some templates. So more items, attacks and examples of game-ideas!

    Have fun!
     
  21. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    ZOMG
    I just got back from vacation (Aruba!) and saw the posts from the hotel public computer and was soooo excited thinking an update was going to happen probably next week...now I'm back as of about an hour ago and I hop on to the forums just to see what's going on and I see this update
    I'm SO PUMPED!
    B
     
  22. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    I'm trying to use the framework with a 3D character, which works pretty well except it keeps sliding across my platforms. I think its because the character is constantly in the "falling" state. Any idea what might be causing that?
     
  23. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Check your collision capsule? I noticed when I moved my collision capsule manually it caused a falling/sliding issue in the 2D character.
    B
     
  24. SlySly

    SlySly

    Joined:
    Jan 26, 2011
    Posts:
    23
    It's weird because I didn't succeed to see the new update on the asset store. :( I am log with my account and for the asset store, nothing new with the 2d framework. It's write "up to date".
    Is anyone try to update it using asset store? Is it working? Because I didn't seen any health item :(
     
  25. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    I might be wrong but Samb88 said he 'submitted' the update...I think the people at Unity still need to check the update to make sure it's ok before it's ready for us to download.
    I'd wait on Samb88 for an official response though.
    B
     
  26. Ceegore

    Ceegore

    Joined:
    Sep 2, 2011
    Posts:
    14
    Hi all,

    I have a really stupid question to ask. I'm trying to develop for the iphone, and I am really getting a lot of use out of this and really beginning to learn what I'm doing with the framework. However, can someone please tell me what I need to do in order to change the sprite animation from the little guy that comes with it to my own. I haven't really done anything with any animations, and I'm lost. Help please. How do I get my own toon in the game and moving correctly? Thank you all.
     
  27. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Go to the 2D player prefab and look under the animation script you should see the animation call outs and the files listed for each one.
    You can save over Samb88's animation images or make your own and repoint those into the script in the prefab. (I'd recommend the latter)
    Hope that helps.
    B
     
  28. Ceegore

    Ceegore

    Joined:
    Sep 2, 2011
    Posts:
    14
    Thanks so much, for the response. However I must not be doing something correctly. I've tried changing the built in images with my own, however all I get is the player plane, not animation. And to be honest I don't really understand how or what to point to like you where saying. Any suggestions?

    Thanks again
     
  29. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Hope this helps.
    1. Select the 2Dplayer Prefab
    2. Locate and drop down the Animation 2D(Script) in the 2Dplayer Prefab
    3. Drag whatever new images you want from the Animations Folder under the Projects window to the Animations listed in the Animation 2D (Script)

    Hope that helps:)
    B
     

    Attached Files:

  30. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    Hey all!
    The new update is online, have fun :)

    @cosmas
    As said, check your capsule collider if everything is set up right. Use the 2D Player Prefab as a starting point and replace the 2D plane with the 3D character, after that remove the 2Danimation component with the 3Danimation component and set up the animations. Hope that helps! I will update the 3DPlayer prefab in the next update.

    @shadow and modeling_man
    Thanks for the help ;)
    If I do a "Version 2" of this framework, it will make heavy use of editor plugins, so setting up the character etc. will be easier. But yeah.. that's something for the future. Ich hope modeling_mans picture will help you!
     
  31. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Hi Samb88,
    Are you planning on updating the 3D player prefab to work the same as the 2D? So it'll have the same range of movements?
    Thanks again
    B
     
  32. Ceegore

    Ceegore

    Joined:
    Sep 2, 2011
    Posts:
    14
    @modeling_man THANK YOU SO MUCH!!! The screen shot was exactly what I needed, now I'm able to really start making some forward progress. I know where to go now for any help that I may need. :)))))))) :-DDDDD

    Thank you!!!! :-D
     
  33. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    I'm on day 3 with this framework and I already have a side scroller 75% complete. Amazing.

    If I may suggest one addition, it would be an audio handler for events like footsteps, jumping, landing from jump state, running, etc.
     
  34. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    One other suggestion, I noticed you hard coded the capsule collider as the character collider maybe reference a generic Collider object in your scripts if you can, I found its better to use a Box collider for some of my characters. Mileage may vary for some.

    I didn't look yet, but does the 3D Player Prefab support animations outside the model? Your Lerpz mesh has them built into the meshes animation graph but not all users will use it in this configuration. For example, I have multiple animation FBX files for my character that I reference externally.
     
    Last edited: Sep 7, 2011
  35. Ceegore

    Ceegore

    Joined:
    Sep 2, 2011
    Posts:
    14
    Hey guys, one other thing......what do I need to do to set this up with a simple joystick and jump button to work on the iphone/ipad. I've really got it going now and feeling good. I just have no idea how to set it up to work with mobile, and I know it can be done. Thanks a lot in advance. :-D
     
  36. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @Cosmas
    Good question, I have a very good modeller friend and will ask him some things in things like 3D models and animation set ups. The problem here is: I'm not a 3D graphic artist so I really can't "make" something for that. But yes, after mid september, when I got more time, I will update die 3DAnimation component with more function.. like blending etc.!
    Audio is on my list but wasn't on a high priority (any newbie coder could do that with the unity manual) but maybe I will add them for the next update.
    Capsule Collider is hardcoded because I need the radius for some raycast calculation. I would use only "collider" but the code have to be static written for the mobile developer.. I will see what I can do!

    @shadowghost
    I think in the manual is a part with a mobile description. But the basic is: in the RageSpline level is a unactive gameobject named "mobileJoysticks" or something. Activate them. Then go to your 2DPlayer and activate the mobile controls, if the joystick isn't set up then set it up, drag the joystick gameobject (and the buttons) in the right variables and boom! You can use the virtual joysticks as input.
    But remember: You have to use the unity remote on your mobile device to actually use them!
     
  37. Ceegore

    Ceegore

    Joined:
    Sep 2, 2011
    Posts:
    14
    @Samb88 Thank you so much!!! Love this framework. Going good. :-D
     
  38. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Hey man,
    How can we replace your handcraft sprite animations with a more robust system like Sprite Manager 2 or ex2D?

    Are they compatible with your project? Is yes, what is the best and easiest way to implement them?

    Thanks
     
  39. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @Curious
    Sadly I didn't had the time yet to ask the developer of ex2D if we can work together for a solution. But I will do that in.. I think two weeks. I have no idea how their system works so I can't answer you that :/

    Just a quick update of the template progress, splitscreen template ist ready,yay!
     
  40. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    :eek:
    ZOMG
    Will this work between 2 linked mobile devices? Or online?
    Or is it strictly locally split screen?
    B
     
  41. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Thanks for your reply buddy, that's good news
    How about SM2?
     
  42. SlySly

    SlySly

    Joined:
    Jan 26, 2011
    Posts:
    23
    I think Samb88 has choice to make an atlas system to the 2D framework, like other asset; Or He can just make compatible an other asset with his. (personnaly I vote for SM2, because a guy make a script for working with playmaker :) )

    Hey Samb88, nice work for the splitescreen! It's cool! I hope We will have the possibility to play 2 characters on the same screen. I said that but I don't want to give you more work for now... That's awsome dude!
    Thanks for your work, for all your answers and support!
     
  43. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @modeling_man
    It's just locally, so you could make something like an splitscreen TabletPC game etc.

    @Curious
    Same with SM2, have to even try any of those systems to make it happen :)

    @SlySly
    Well you can just use one camera. I only had to fix a little code error in the Ui script of the player, but everything else can be already done in the current version, with the right setup :)

    So here is something thats a bit more "game like"

    A DoodleJump like minigame. Every template won't alter the player code, so you guys will see what can be done!
     
  44. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @Samb88
    Any chance to add OpenFeint ? Maybe via Prime31 Plugins ?
     
  45. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Can i simply use greater pictures (256x256) then 128x128 for my character and more pictures for i.e. the runcycle?
     
  46. slowdev1

    slowdev1

    Joined:
    Sep 12, 2011
    Posts:
    35
    Hi Samb88,

    This framework is absolutely fantastic! I'm creating a Megaman type game and this is perfect! I have a couple feature requests.

    - Can you let the enemies shoot back? That's the biggest request from me.

    - can you allow the player to pick up special weapons and add an ammo system for those weapons? So when the ammo runs out, the weapon reverts back to default.

    - can you allow the animation frames to change to a "special weapons" set of animations?

    - can you add an attack animation, for example for gunfire muzzle flash?

    Thanks for your great work!
     
  47. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @KeepTreying
    I don't have the right unity license to do something like this, sorry :/

    @M_Stolley
    That should work!

    @killerbean
    Those are a bit specific wishes, but something like ammo and changing images will coming,I hope, after the next update. So hopefully that will help a bit :)
     
  48. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    133
    I made a modification to my Player Health script concerning the animation_dead value. Rather than a clip, I wanted to use a ragdoll, so I simply made a test for if the Player gameObject is using the Animation3D component, if it returns true, then it Instantiates a public ragdoll prefab rather than referencing a clip then updates the Player.State, if not it reverts to the named string. That should cover all cases both 2D and 3D, maybe someone else might find that implementation useful.
     
  49. slowdev1

    slowdev1

    Joined:
    Sep 12, 2011
    Posts:
    35
    @Samb88
    Actually, if you could scratch all my other requests and just make the enemies shoot back, that would be all I need :)

    Thanks again for your great work!
     
  50. slowdev1

    slowdev1

    Joined:
    Sep 12, 2011
    Posts:
    35
    Actually, nevermind again. ;) I found a good solution. I put a prefab AI gun turret on the back of an enemy and it shoots plenty.