Search Unity

[RELEASED] Rex Engine: A Unity 2D Platformer Engine

Discussion in 'Assets and Asset Store' started by BeeZee, Jun 20, 2017.

  1. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I did, but I usually don't include the video demo scenes in the actual release, since they're just for video purposes. If you're looking for some of the new features, you can find them here:

    Powerups: RexEngine > Resources > Powerups
    Stairs: RexEngine > Resources > Actors > Gimmicks > Stairs
    Enemy Spawner: RexEngine > Resources > Actors > Gimmicks > EnemySpawner
    Add stair climbing to actor: Tools > Rex Engine > Add Ability > Add Stair Climbing

    Hope that helps. Lemme know if there's anything else in particular you'd like clarification on.
     
    Rick-Kercz likes this.
  2. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Can you make the character and enemies stop completely when I dialog pops up?

    Right now there are cases when the player jumps or was running during a dialog, that control is lost but the player still moves. this can cause the player to die, or fall of a cliff of a dialog popup during an action.
    Also when an enemy shoots at you before the dialog pops up the bullet still hits the player during the dialog.

    I would prefer it if enemies/ player and bullet were all paused during the dialog.
     
  3. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    hodgepodge2022 and Rick-Kercz like this.
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Nice I love it, just in my memory I was able to jump and shoot from ladders, I will have to get back to castlevana 4 to refresh my memory :)

    Is the whip gonna be in a rex update? love to try that out
     
    Last edited: Nov 1, 2017
    BeeZee likes this.
  5. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    It sort of already is -- all the tools to create it are there. The main thing is to stop the player in their tracks for a second when they move, which is available under the Attack component in the Inspector under the Actions Allowed During Attack field.
     
  6. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I gotta say, "Castlevania but with robot dinosaurs" is a pretty awesome game pitch. (I'm also working on tutorials to show everyone how to do this style of game with Rex Engine!)

     
  7. EaseUpBro

    EaseUpBro

    Joined:
    Nov 7, 2017
    Posts:
    4
    This asset is really cool and everything works for the most part. But I just cant get the SceneManager to work in a build of the game. Every scene loads fine when I play the game in Unity, all the scenes are in the build settings, all scene loader identifiers are matched up, but when I build the game and try to play it, it wont load to the next scene.
     
  8. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for grabbing a copy of Rex!

    Hm... that's odd about the SceneManager. What platform are you building for? And, just to double-check, the same SceneLoaders are working properly when tested in the Editor?
     
  9. EaseUpBro

    EaseUpBro

    Joined:
    Nov 7, 2017
    Posts:
    4
    Nevermind, I think I found the problem. Unity and Mac OS sierra are having problems. Everything works fine on OS X tho.
     
  10. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Awesome, glad it cleared up!
     
  11. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Nice I was just testing the new update 1.0.5

    When I jump on the ladder it works when I press right en jump or left and jump. ( or just jump )
    can you also make it jump when pressing up or up/right up/left. so I can jump up the ladder while climbing, and diagonal jump when pressing up/right or up/left?
     
  12. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    And for the physics when walking up a slope is it possible to make him walk a bit slower and when going down a slope a bit faster, like with Mario / Sonic. or even slide when going down very fast
     
  13. hodgepodge2022

    hodgepodge2022

    Joined:
    Mar 8, 2015
    Posts:
    19
    Looking forward to it! Do you think you will be able to improve it or show the user how to mimmick a pounce attack enemy attack from the black leopard-like or hunchback entity and/or possibly create a behavior that allows the player to make a viper swarm/slime enemy that drops from the ceiling on raycast detection? I'm positive a lot of users would love to see that for their enemies.
     
  14. Manou1111

    Manou1111

    Joined:
    May 13, 2017
    Posts:
    12
    Hello, we talked by email already ! Here is a simple question how do I get access to the current speed of the player ?

    I tried
    Code (CSharp):
    1. Debug.Log ("player current speed : " + controller.GetComponent<MovingState> ().runProperties.acceleration);
    but it says 0 even when moving.

    Thanks !
     
  15. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I'd like to do a lot of terrain-based stuff, like ice and conveyor belts, so moving faster or slower on slopes is a possibility.

    Sure, I can do tutorials on some of that. I've been considering doing tutorials on how to do the fishmen from Castlevania, because I'm pretty happy with how they turned out in the Dracula Rex demo. I did some very minor scripting to make them work, but it's all with stuff that's already in Rex Engine.

    The "runProperties.acceleration" you've got there is how much the character will accelerate per frame while holding the Run button. To access current speed, I'd use this:

    Code (CSharp):
    1. slots.physicsObject.properties.velocity.x
     
  16. Manou1111

    Manou1111

    Joined:
    May 13, 2017
    Posts:
    12
    Hello, is it the velocity of the 2D rigid body attached to the player or is it in your asset, I can't find "physicsObject" :/

    Thanks!
     
  17. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    There should be a RexPhysics component on the root of the Player GameObject, which is what slots.physicsObject refers to:



    You could also access it via GetComponent<RexPhysics>(), but it should be slotted onto the Player.cs script via their slots.physicsObject property, so that would be faster.
     
  18. Manou1111

    Manou1111

    Joined:
    May 13, 2017
    Posts:
    12
    Hello, ok I can get the velocity using GetComponent like you said, what is "slots" you are refering to, is it Unity specific ?

    EDIT : ok found it in the inspector panel, my bad !

    Regards,
    Pierre.
     
    Last edited: Nov 14, 2017
  19. Manou1111

    Manou1111

    Joined:
    May 13, 2017
    Posts:
    12
    Hello, I have a scene named "default", if my player dies touching the bottomless pit it tries to load the "Demo_1" scene from RexEngine and throws an error as Unity can't find the scene in the build settings. How to solve this?

    Regards,
    Pierre.
     
    Last edited: Nov 14, 2017
  20. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    There are a couple ways to go about this:

    • You can put a checkpoint with no graphics at the start of your scene; this tells the engine to load the player there when they die. The included Demo_1 scene has a sample you can use all the way at the left.
    • DataManager.cs has a value on line 13 called "lastSavedScene." By default, this is set to "Demo_1", which is why it tries to load the Demo_1 scene when you die. If you set that to another scene, it'll load that one instead.

    Typing this, it occurs to me that I should make this something that can be publicly set from the settings somewhere, so I'll do that for an upcoming release. Thanks for pointing it out!
     
    Rick-Kercz likes this.
  21. Manou1111

    Manou1111

    Joined:
    May 13, 2017
    Posts:
    12
    Thanks !
     
  22. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I just did a video showing you how to add new animations to the player character. Hope this helps some people!

     
  23. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    very helpfull thanks!

    Can you add a sound slot for the idle and also 3 differrent idle slots?
    I want to randomise 3 different idle animations and be able to have them with sound, like the player is able to express something at idle.
     
  24. Saiga308

    Saiga308

    Joined:
    Jun 14, 2015
    Posts:
    46
    @BeeZee Any future plans to add mounts? By mounts I mean horse, lion, aircraft, tank (i.e. Ikari Warriors)?
     
    Rick-Kercz likes this.
  25. jdameron

    jdameron

    Joined:
    Oct 2, 2013
    Posts:
    5
    Just picked this up, and im sure I'll have some questions to add soon.

    But i would imagine the current system in place to switch between swimming, flying etc, could pretty easily be used for mounts...

    I havent gotten to play with that part yet, but that idea definitely crossed my mind.
     
  26. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Sure, Idle is a good candidate for multiple animatations; I'll add this in a near-future update.

    Hm... I actually hadn't thought about this, but it's a cool idea! I don't have any concrete plans at the moment, but I'll mull it over. Off the top of my head, if I end up adding it, it'd probably come a bit later, since there's a lot of more "core" stuff I plan to add first, but mounts are definitely part of the classic platformer cannon, and I agree that they're worth considering.

    Thanks for getting a copy of Rex! I really appreciate it!

    This is a good solution, and it'll work so long as the mount never needs to be separated from the player. As long as the mount only shows up in an animation -- say, it pops out when the player is flying and the disappears when they stop flying -- this is a clean, simple way to achieve this.
     
  27. Saiga308

    Saiga308

    Joined:
    Jun 14, 2015
    Posts:
    46
    Thank you for considering it for a potential future update. Another example would be the clouds in Super Mario that you could hit and then fly around in. Keep up the great work!
     
  28. statrick

    statrick

    Joined:
    Oct 12, 2013
    Posts:
    4
    Hello,

    I picked up Rex and just have a few questions about some things.

    1. Is it possible to have multiple land animations, for landing while moving, firing, etc..? Currently I can only get a land animation to play while jumping straight up and down.

    2. Is their a way to have the full animations play and not interrupt themselves? For example when I run and shoot the animation clips itself every time I hit the button.(also is continuous fire possible)

    3. Is it possible to have animations for aiming (up, 45, -45 down)?
     
    Lars-Steenhoff likes this.
  29. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks a ton for getting a copy of Rex!

    1. Hm... it'd be possible with some code, but it's not a feature at the moment. "Landing" is meant to be its own discrete state, akin to how landing from a large fall stuns you for a second in something like Symphony of the Night.

    2. Attack animations are set to play from scratch every time the corresponding attack is triggered. You can play with Cooldown Frames setting on the Attack component to make a longer delay before the player can do a second attack, or you can set "Actions Allowed During Attack" so "Attacking" is unchecked, which will prevent the player from starting a new attack until the previous one is finished.

    For continuous fire, this is something I plan to add in very soon.

    3. This is something I'd like to add in at some point, but it's a bit more complicated. This one's a bit trickier because there are so many possible permutations (aiming up at a 45 degree angle while standing, aiming up at a 45 degree angle while running, aiming down at a 45 degree angle while jumping, aiming straight up while crouching, etc. etc. etc.), so I'm searching for a good solution that doesn't involve cluttering up the Inspector too much.
     
    statrick likes this.
  30. Exonto

    Exonto

    Joined:
    Nov 22, 2017
    Posts:
    16
    Hello BeeZee,

    Recently got the Rex Engine and it's working great! I have a question about acceleration/deceleration on the ground vs in the air. From what I can tell, the movement state is the only place where these can be changed and they apply to both ground and air travel. I'm wanting to have very low deceleration in the air while having a much more natural deceleration on the ground. Is this possible via UI or will I need to edit some scripts?

    Thank you.
     
  31. KyleRR12

    KyleRR12

    Joined:
    Aug 15, 2016
    Posts:
    11
    Hello,

    In case you didn't get any of my emails, I'm actually thinking of buying Rex Engine again. But I have one question I should have asked in the first place and one of the game companies I'm going to be publishing to say on their website that I may need to provide proof that I can use the software legally/commercially. Assuming since Rex Engine is on the asset Store it can be used for commercial games that will be sold. Is that right?
     
  32. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for getting Rex! I'm glad you're liking it!

    There's no way to accomplish this out-of-the-box, although it's a request I've gotten a few times, so I'd like to look into it for a future update. I suspect it'll be fairly easy to edit -- I'd look into the FixedUpdate and the UpdateMovement methods of MovingState.cs. The latter of those governs how deceleration is applied. You can check against controller.slots.physicsObject.IsOnSurface(), which will return True if the actor is grounded and False if the actor is in the air.
     
    tiz777 likes this.
  33. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I haven't received any emails, but that's awesome news! And yes, you absolutely can use Rex Engine in commercial projects, provided you've purchased a copy.
     
  34. calminthenight

    calminthenight

    Joined:
    Nov 23, 2017
    Posts:
    11
    Hi Beezee,

    I just bought Rex Engine and am exploring it at the moment. It looks really good so far and I am getting the hang of it. Just wanted to see if you had implemented arching projectile attacks yet, such as the example you posted in #38 of this thread. I wasn't able to find it in the assets.

    Cheers
     
  35. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya, thanks a ton for getting Rex!

    Yep, arcing projectiles are in.



    Here's a screenshot showing the primary settings you'll want to apply to a projectile. You'll want to make sure Starting Vertical Direction is "Up", you'll want Movement Speed's Y value to be a positive number, and on RexPhysics, you'll want to enable gravity so that the projectile falls back down after shooting upwards.

    Hope that helps! Let me know if there's anything else I can help clarify on that front.
     
    calminthenight and kitsune9000 like this.
  36. Wamtu

    Wamtu

    Joined:
    Jul 31, 2017
    Posts:
    3
    Hey. This engine looks pretty cool, but before I get it, I'd like to know a few things (either from the dev, or from someone who's used the engine):
    1) Can the Rex Engine use skeletal animations like Spine? (http://esotericsoftware.com/)
    2) If you don't mind me asking, how does this compare with the Corgi Engine and Platformer Pro?
     
    BeeZee likes this.
  37. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya Wamtu, awesome, thanks for checking out Rex! I appreciate it.

    It can indeed use Spine; you can use any art style you'd like with it.

    As far as it compares to other engines, I'd definitely check those out as well and make your own choice as to which one interests you the most. I'll say that, as far as Rex goes, there are a couple major distinctions I've designed it for. Firstly, I'm a really big fan of classic games -- stuff like Mario, Mega Man, Castlevania, etc. -- , and none of the other assets I tried perfectly nailed the physics or the game feel from that era. One of my biggest focal points with Rex Engine was making sure I really nailed that feel at a professional level; I want it to be a thing where you can use Rex Engine and release a game with it and it will feel every bit as good and as polished as the classic games that inspired it.

    Secondly, I wanted to go more in-depth with Rex Engine, and give users more control over how they set up their games and the characters in them. One of my favorite examples is the dash ability; rather than just having a toggle for whether or not a character can dash, there are tons of settings for it, including if they can dash in midair, how many times they can do it, what attacks they can use while dashing, if the dash cancels when they hit a wall or the floor, if they can change direction while dashing, if taking damage cancels the dash, if falling or jumping while dashing carries over the dash momentum, and so on. I want to give users that level of customization so they can make stuff that feels really unique, and make the game they want to make, not just another game that feels like everything else made with the same engine.

    I hope that helps! Feel free to let me know if there's anything else I can assist with. Good luck with your choice, and with your games!
     
  38. hodgepodge2022

    hodgepodge2022

    Joined:
    Mar 8, 2015
    Posts:
    19
    I both extensively used Corgi and Platformer Pro and although Rex lacks some of the neat bells and whistles that Corgi and Pro have like Game Inventory and level select screen, it blows them out of the park where it really matter, coding much better then both of those engines and easy to modify to boot.
     
    kitsune9000 likes this.
  39. Wamtu

    Wamtu

    Joined:
    Jul 31, 2017
    Posts:
    3
    Cool, that's what I was thinking. Lacking a pre-made level select or inventory ain't a deal breaker for me; I can make those myself. I mostly just don't want to reinvent the wheel to work in my favorite genre, and it looks like this gives me a whole lot of wheels to not reinvent. If there's anything else lacking, well, at the rate he updates this thing, I wouldn't lack it for long.

    So congrats, man, you've got yourself another customer.
     
    BeeZee and kitsune9000 like this.
  40. kitsune9000

    kitsune9000

    Joined:
    Aug 15, 2015
    Posts:
    42
    lol @ the Castlevania level @BeeZee ... The part where the whole roast chicken shows up in this demo as well to come out of all the walls like the porkchop in the original.
    BTW, Are you able to provide that level as a demo in the Unity update? I haven't downloaded the latest version with all the changes yet because I'm out of town and on a laggy notebook that is at odds with Unity, but I'm looking forward to trying out all the new changes when I get home.
     
    BeeZee likes this.
  41. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Another great update is live!
    I see you added two player mode thats awesome!
     
  42. KyleRR12

    KyleRR12

    Joined:
    Aug 15, 2016
    Posts:
    11
    I went ahead and bought RexEngine.

    When I imported the RexEngine into Unity, and I played the demo, none of the keyboard controls are working to move the player and the console says input Fire1 is not set up and to go to Edit > Project Settings > Input but when I go there I see all the controls are already set up. What could be the matter?

    and another question, will you be adding a map system like Super Mario World?
     
  43. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I'm hesitant to include it in the full release since it's a tile-for-tile remake of a Castlevania stage, but hit me up in PM or via email and I'll see what I can do.
     
  44. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Awesome, thanks a ton for getting a copy! Good to have you.

    Can you send me a screenshot of the bug? Ideally, it'd help the most to see your Project Settings > Input panel onscreen at the same time as the console is showing the error message. (We should be able to get this fixed up pretty quickly.)

    I've had a number of people ask about a map system, so I'm giving it some thought, yeah. I'll keep you posted on it!
     
  45. hodgepodge2022

    hodgepodge2022

    Joined:
    Mar 8, 2015
    Posts:
    19
    I believe a hotfix is in the works for that issue. There are two solutions for this.

    1. Go into Edit->Project Settings->Input and change the 9 player0 Axes so their name field doesn't have "Player0" in front of them.

    Additionally you can update the Singleton prefab to take into account the recently added two player feature in 1.07 to run the demo game. This is done by:

    2. Editing the InputManger inside Singletons so that the UnityInputManager script is up to date with the player axis you wish to use. You can do this by simply adding "Player0" in front of each axis. So "Jump" would become "Player0Jump" etc etc.
     
  46. KyleRR12

    KyleRR12

    Joined:
    Aug 15, 2016
    Posts:
    11
    Sure thing! Here's a screenshot of the console and Input. I've made really no changes since first importing it.
     

    Attached Files:

  47. hodgepodge2022

    hodgepodge2022

    Joined:
    Mar 8, 2015
    Posts:
    19
    here is where you make changes to the singleton prefab to be able to run the demo game.
     

    Attached Files:

  48. KyleRR12

    KyleRR12

    Joined:
    Aug 15, 2016
    Posts:
    11
    Thanks! Your first suggestion worked!
     
  49. Exonto

    Exonto

    Joined:
    Nov 22, 2017
    Posts:
    16
    Hey BeeZee,

    I am wanting to create an inanimate object using the rex engine which will simply give the object gravity and such but which does not have any animations/behaviors. Basically I just want to create a boulder for example. My problem is that I can't figure out how to set up my game object to behave correctly. What would you suggest?

    Thank you.
     
    Last edited: Dec 3, 2017
  50. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I'd try making a new GameObject and giving it:

    • RexPhysics
    • A kinematic RigidBody (just for getting collisions; not for the physics)
    • A BoxCollider2D
    • A SpriteRenderer

    If you look in the demo files, the health restore powerups use a similar setup, so they might be useful as an example. You can find them under RexEngine > Resources > Powerups > HPRestoreLarge.