Search Unity

[Released] 2D Jump'n'Run Framework

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

  1. blaze

    blaze

    Joined:
    Dec 21, 2011
    Posts:
    211
    There is some AI for jumping enemies?
    Like in a 2D shooter where the enemies go get the player.
     
  2. blueFire

    blueFire

    Joined:
    Nov 27, 2010
    Posts:
    68
    How do you build your levels? Is each tile a prefab that you simply drag a script to?

    Jason
     
    Last edited: Jul 28, 2012
  3. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @blaze
    I planning some new enemy scripts (and rework the current one) but there won't be any real pathfinding anytime soon. But some simple ai (if possible to jump over things then jump) is no problem

    @bluefire
    The framework is made for the player and everything that affects him. To make a level you add the 2DPlayer prefab (or your own) and use any level creation tool of your choice. Any 2D tileeditor in the assetstore should do it. Or, for more fancy level, use ragespline.
    But there is no editor built into this package, since there are editors out there which are much better than anything I could think of.
     
  4. elizeusz

    elizeusz

    Joined:
    May 2, 2012
    Posts:
    49
    AI_can_move is this one to set AI to move or stay in one position ? Because after i switch it on or off AI is moving.
     
  5. mboog12

    mboog12

    Joined:
    Oct 4, 2011
    Posts:
    91
    good evening everyone!

    i have tried building the project for android (until now i've only built the exe), and i get the following errors :
    Assets/Imported/2DJumpNRunFramework/TemplateScenes/DoodleJumpishFiles/create_jumppads.js(30,48): BCE0019: 'Length' is not a member of 'Object'.
    Assets/Imported/2DJumpNRunFramework/TemplateScenes/DoodleJumpishFiles/create_jumppads.js(32,27): BCE0048: Type 'Object' does not support slicing.
    Assets/Imported/2DJumpNRunFramework/TemplateScenes/DoodleJumpishFiles/create_jumppads.js(60,41): BCE0019: 'RemoveAt' is not a member of 'Object'.
     
  6. mboog12

    mboog12

    Joined:
    Oct 4, 2011
    Posts:
    91
    Replying to my own post :
    Just a simple syntax thingie. I have re-written the script in C# and got rid of the errors anyway :).
    If samb88 wants to integrate the scripts into his package I can provide.
     
  7. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @mboog12
    Yes, C# is the only way to fix this right now :) My current advice was to just delete the sample file. But of course, I would use the C# file if you provide it.

    Playing around with gravity right now. I don't know if this will ever work but if so, then the player could walk on any surface on any rotation. You could even do something like sonic, that the player can run up walls with enough speed. I will work on this for the next three days. If it won't work perfectly after three days I will continue with other features first :)
     
  8. mboog12

    mboog12

    Joined:
    Oct 4, 2011
    Posts:
    91
    @Samb88
    Please check your PM Inbox, i've sent you a link.
     
  9. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    gravity like sonic sounds really cool, hope you can pull it off
     
  10. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    Hi Samb88, you got a ''RoadMap'' or something talking about new features ?
    By the way you can develop custom ones ?
    Thank's in advance;
     
  11. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    Could someone explain the exact steps needed to make smoothmoves work with e.g. the rage spline level in jump 'n run, the manual is kind of hazy... Thanks!
     
  12. SlySIy

    SlySIy

    Joined:
    Jul 10, 2012
    Posts:
    16
    Samb88, I'd like to know if you will/could work on platformer advanced featured.
    By "advanced" I mean features for making more advanced platformer like "Flashback" (action/adventure). So we would not be limited to a basic platformer. It's not a critic about your work, because it's awesome, but I always see platformer kit and it's always the same kind. But if you add more advanced features, it will make people think this asset is better!

    I give you a little example about "advanced features":

    -Inventory system
    -Possibility to use object from inventory to unlock things, event
    -possibility to use key form keyboard to use object/trigger object (like open door)
    -Warp system for change player location (triggerzone warp)
    -Condition system/Switch system for manage event

    I really with this it will be possible to make simple/basic or advanced platformer,
    I know it's a lot of work, but I need your opinion on it.
     
  13. deadswine

    deadswine

    Joined:
    Mar 27, 2012
    Posts:
    19
    Will this work with uni2d?
     
  14. deadswine

    deadswine

    Joined:
    Mar 27, 2012
    Posts:
    19
    Tested it myself and it works ok
     
  15. janio

    janio

    Joined:
    Mar 20, 2012
    Posts:
    8
    Hey Samb, why you did not used the CharacterController? The character would be more controllable that way.
     
  16. marcus.m.jung

    marcus.m.jung

    Joined:
    Aug 26, 2012
    Posts:
    1
    hi.
    i'm using 2D jump'n'run framework.
    while i am using mobile input, your joystick is working great.

    but i have some trouble.
    i wanna move by using two buttons (left button, right butoon)
    but i can't understand your code so cannot modify it.
    Can anyone help me?
     
  17. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    Hey all,
    implemented vertical movement script. It's a script file of it's own so maybe some programmers can learn from it how to add something to the framework :)


    Next version will be uploaded soon. Just wanna try out some more new features.
     
  18. Grambo

    Grambo

    Joined:
    Oct 3, 2012
    Posts:
    3
    Samb88,
    Can you expand/clarify a bit on your SmoothMoves script? I don't understand how to implement your framework with the bone animations. I've swapped out "Animation2D" for the "AnimationSM" script and edited it, as per the instructions in the script and manual, but am still lost on what to do next.

    *Edit*

    Ok, I've more or less figured it out.
    Also, I'd like to point out that at line 413 in "PlayerJumping.js" there is no addition of playerMovement.plus_rotate_angle

    So if you have both a "playerMovement.plus_rotate_angle" modifier and use playerJumping.rotate_in_air, your character will lose the modifier while jumping or falling.

    Code should be:
    playerMovement.player_graphic_pointer.eulerAngles.y=(90*Mathf.Sign(playerMovement.return_real_axis().x))+playerMovement.plus_rotate_angle;

    Thanks for the Framework :) I'm enjoying it.
     
    Last edited: Oct 4, 2012
  19. TTkJonas

    TTkJonas

    Joined:
    Mar 21, 2012
    Posts:
    28
    Hi Samb!
    Thats great! Its nice to hear from you. Cant wait for the Update :)
     
  20. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    @grambo Thanks! Will add that! Also I will implement the basic playback code for smooth moves and a testscene in the next version. Should solve the problem some smooth moves users have :)
     
  21. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Hey Saamb sooooo glad to see you still working on this.

    Any chance you could implement a pick up object, visibly carry object, and drop/throw that object? i tried working on a system and just could not get the object to attach in the proper orientation.
    Thanks!
    B
     
  22. ilovemypixels

    ilovemypixels

    Joined:
    Oct 16, 2012
    Posts:
    6
    Hi there,

    I am using the basic jumpOnly scene to create my game. However I would like to detach the player and the camera. This is because if he hits an object I would like him to stop while the camera keeps moving creating a sense of urgency. If the player leaves the sceeen to the left you die.

    I have found the move_with_player variable. However if I set this to false, it seems to revert back to true no matter what I do. I guess this is to do with how the script is imported on run-time. Any ideas?

    Any help is very much appreciated

    Thanks

    Will
     
  23. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Seems I have a problem with the jump script. when added to my smoothmoves character it stops the walk animation and also stops the sprite facing the direction its walking.

    Any help please?
     
    Last edited: Oct 17, 2012
  24. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Anyone?
     
  25. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Hi,
    I'm having some problems.

    I couldn't run my project because of an error in the joystick script regarding "touch" which I couldn't figure out.
    I'm a bit out of date so I upgraded Unity and your latest version of the Run and Jump framework and now it's completely screwed and all I get is broken shader pink and a sea of error messages I can't fix.

    I still have the old project (Thank you Time Machine!) and have gone back to it, but what in the world do I do about the new Run and Jump framework?
    Thanks
     

    Attached Files:

  26. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    Hey RHD i'm using:

    2D Jump and Run version: 1.645 + Unity version: 3.5.6f4

    No issues, so update ATI/nVidia driver, Windows, Unity, Jump and Run and try again :)
     
  27. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    I was wondering if we can integrate this pack with 2D Toolkit in-order to be able to use the different features of 2DTK like atlas, Tile-Map editor, 2D collision ... etc.

    any plan for this?
     
  28. pallinarozza

    pallinarozza

    Joined:
    Jul 24, 2012
    Posts:
    14
    I have a problem: when i try to import my project on android, I enable the controllers, but when I move the controller on android he jumps only? How can I do? Thanks
     
  29. tomiwarti

    tomiwarti

    Joined:
    Aug 28, 2012
    Posts:
    2
    Anyone know how to crouch?
    When I press down arrow it stops the player but doesnt crouch!
    (It's my first unity project)
     
    Last edited: Dec 3, 2012
  30. tomiwarti

    tomiwarti

    Joined:
    Aug 28, 2012
    Posts:
    2
    Here is the exact error I get:
    NullReferenceException: Object reference not set to an instance of an object
    PlayerCrouching.Update () (at Assets/2DJumpNRunFramework/Scripts/PlayerCrouching.js:19)

    At PlayerCrouching, line 19:
    18: function Update () {
    19: if(playerMovement.current_mode==playerStates.Idle || playerMovement.current_mode==playerStates.Walking || ...All other states}

    so I guess my problem comes from the "playerMovement" which is not defined? (it's in the function start above but doens't seems to work!)
    here it is:
    function Start () {
    playerMovement = GetComponent(PlayerMovement) as PlayerMovement;
    collider_size_temp = GetComponent(CapsuleCollider).height;
    }
     
  31. mplaczek

    mplaczek

    Joined:
    Feb 13, 2012
    Posts:
    19
    Before your Smooth Moves integration I had managed to get it working myself with a few tweaks to the scripts here and there... I was hoping someone could post some step by step instructions to get your smooth moves character correctly implemented in the new framework... It would be nice not to have everything breaking whenever I update! Thanks in advance! :)
     
  32. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @pallinarozza have you activated ALL the childrens of Mobile_Setup ?
     
  33. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @tomiwarti tested this right now and it's playing very nice, no issues;
    Update Unity and the Framework :)
     
  34. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Saamb hope things are going well:)
    Can't wait for the next update!
    B
     
  35. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    I'm come back to Run and Jump after a year away and it's going OK.

    One problem I'm having though is my Simple Enemies no longer chase my 2D Player. I remember (or think I do!) that they chased the player before. I've checked the settings and downloaded a clean version into a new project but the same thing happens there too.

    The Player is selected in the AI, the sight thing looks fine, I'm baffled.

    Anyone know the fix?

    Thanks guys.
     
  36. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    RHD see documentation and the settings of "testsceneragespline" - because here, the enemies are chasing like crazy :)
     
  37. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Thanks KeepTrying but I'm on a Mac and all updated as far as possible.

    I re-downloaded the latest version of Run and Jump into a new project and loaded testsceneragespline but the enemies are still totally uninterested in chasing my player.

    Do your Simple enemies actually chase your 2D player? Mine just run about!
     
  38. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    I'm using Unity 3.5.7f6 and the latest Jump n Run release.
    As far as i know the enemies only chase when you got in front of then.
    Because when you start to play in that scene you spawn in the back of enemy, so he can't see you.

    Select simpleEnemy on hierarchy panel and look at AImovement script and attack_target option.
     
    Last edited: Dec 15, 2012
  39. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Oh! That's got it!
    I've moved the enemy to start to the right of the Player and now he's chasing!
    Thanks a million!
     
  40. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    Hahaha nice one :D
     
  41. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Lot easier for me than trying to mess with the script!
     
  42. SlySIy

    SlySIy

    Joined:
    Jul 10, 2012
    Posts:
    16
    Any news Samba? Specially for Christmas? :)
     
  43. Samb88

    Samb88

    Joined:
    Mar 26, 2009
    Posts:
    208
    Hey all,
    send a new version to unity. Maybe it will be online before christmas!

    It's a really important fix update that throws the old collision system overboard and uses a much better and more stable system. So no more "stuttering" while running into wall etc.

    Update Notes:
    "1.65:
    - Added Vertical Movement Demo
    - Improved player collision"

    I will try to fix some more things and add a really big component to the framework, that is online multiplayer. It's like.. my 10th try to make an authoritative server, if I can't get it to work I will offer a non authoritative server solution. Just keep in mind, that a non authoritative server is not useable for competition games!

    So yeah, thats the update for now. Since I had some rough weeks I will read the thread and see what everyone had to write :)

    Have a nice christmas!

    -Samb
     
  44. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    o.o
    THANK YOU!!!

    On a side note, if you could implement pick up and drop (like in Super Mario Bros 2) you would be my hero!
    Man I love this kit.
    Ur the best!
    B

    New collision system eh? You go with raycasting or something?
    Can't wait to dig into it.

    I tried testing out "couch", however I couldn't get it to work. Is there a button i press for it? Does crouch work like a sliding crouch? Similar to say MegaMan? or Mario 3? There's a 2.5d kit that has a slide mechanic however I found it to be pretty buggy.
    I'll admit it's been a while since I've dove into this kit. I've been tied down with other projects but finally am free to invest some time! Will the Gibberish script play nice with this kit?
     
    Last edited: Dec 23, 2012
  45. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @Samb88, I was researching collisions and you just play this great news <> Big Thanks! :D

    @parnell open the scene < testsceneragespline > press < Play > and press < Arrow Down > to see that movement, the script is < PlayerCrouching > ( the last one attached to < 2DPlayer > thank me later :)
     
  46. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Doh!
    I always just test in the testscene not testsceneragespline:p

    Thanks for the heads up:)
    So the crouch is like a Mario crouch and less like a Megaman Crouch/slide.
    I wonder if I can modify the "crouch" state so that if the player hits the jump button or shoot button he'd slide in the direction he's facing.
    Something I going to try to figure out.
    I've been trying to get the character to pick up and drop items (like blocks). I think it opens up a huge range of puzzle/platform mechanics which I think is much more interesting.
    Cool stuff!
    B
     
  47. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
  48. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    Waz up players ? The new version is online right now <> get your copy today.
    @Samb nicely done, son.
     
  49. SlySIy

    SlySIy

    Joined:
    Jul 10, 2012
    Posts:
    16
    Any news about what's next? :)
     
  50. alahti

    alahti

    Joined:
    Feb 7, 2013
    Posts:
    4
    Have anybody tried to switch standard joystic to Mobile joystic controller which is much better?
    https://www.assetstore.unity3d.com/#/content/4344
    As far I have tried I'm getting following error:

    Assets/2DJumpNRunFramework/Scripts/PlayerJumping.js(80,37): BCE0019: 'IsFingerFrameDown' is not a member of 'Joystick'. Did you mean 'IsFingerDown'?

    Assets/2DJumpNRunFramework/Scripts/PlayerJumping.js(94,37): BCE0019: 'IsFingerFrameUp' is not a member of 'Joystick'. Did you mean 'IsFingerDown'?

    Assets/2DJumpNRunFramework/Scripts/PlayerJumping.js(108,36): BCE0019: 'IsFingerFrameDown' is not a member of 'Joystick'. Did you mean 'IsFingerDown'?

    Assets/2DJumpNRunFramework/Scripts/PlayerJumping.js(122,36): BCE0019: 'IsFingerFrameUp' is not a member of 'Joystick'. Did you mean 'IsFingerDown'?

    Assets/2DJumpNRunFramework/Scripts/PlayerAttack.js(21,38): BCE0019: 'IsFingerFrameDown' is not a member of 'Joystick'. Did you mean 'IsFingerDown'?