Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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

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

  1. hellosimplegame

    hellosimplegame

    Joined:
    Jun 13, 2017
    Posts:
    8
    Thank @san40511 I use it and get Easy Mobile Pro success. Thanks!
     
    san40511 likes this.
  2. san40511

    san40511

    Joined:
    Oct 20, 2019
    Posts:
    29
    Hey guys. Does somebody know when the rex engine will be updated?
     
  3. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @san40511 Unfortunately there are currently no plans for any more official Rex Engine updates.
     
    san40511 likes this.
  4. ggpereira

    ggpereira

    Joined:
    Mar 30, 2015
    Posts:
    9
    Hey, guys... How is it going?

    I was looking for an asset for making 2D games and Rex Engine was one that I was interested

    Maybe it's a little late to ask this, but why isn't it on the Asset Store anymore?

    Thanks
     
  5. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
  6. ggpereira

    ggpereira

    Joined:
    Mar 30, 2015
    Posts:
    9
  7. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    Is there any way I can use two colliders with my character -- one for taking damage and another for colliding with terrain? I wanted my damage collider to be a bit smaller than my sprite but then my sprite overlaps a bit with walls and ceilings and I don't like the look of that. Since the character is not quite boxy enough, if I make the collider larger then there would be spots where they could take damage, but visually it would look like they shouldn't have gotten hit.
     
  8. ggpereira

    ggpereira

    Joined:
    Mar 30, 2015
    Posts:
    9
    Hey, @BeeZee ... How is it going?

    Is there a way where I can acquire the Rex Engine package? :)

    I got really interested in it

    Thanks
     
  9. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    I am having an issue where when an enemy is animating, the sprite that you set on the character in SpriteHolder > JitterHolder > Sprites > Sprite stays visible. So I have an enemy playing the animation with this static sprite sitting on top of it. If I disable the sprite, then it looks fine during gameplay but then I can't see the enemies when I am working on the game in the scene view. Does anybody know what could cause that?
     
  10. ShirohelmDev

    ShirohelmDev

    Joined:
    Jun 26, 2019
    Posts:
    32
    anyone know how to implement saving and metroid style maps?
     
  11. san40511

    san40511

    Joined:
    Oct 20, 2019
    Posts:
    29
    For saving better to use 3rd party plugins like dataBox or easySave because these libraries already have cloud saving and cross saving functionality and if you don't want to use them then you should be ready to spend a lot of time on development and especially on bug fixing, with metroid maps i think the same situation
     
  12. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Hey, good question! First of all, check the Z Position on any of the Scene objects for the enemy. Sometimes the parent object is way negative. Make it zero.

    Also, you may need to play around with shish sprite renderer to use. That's true that you could use the sprite renderer on the jitter holder, but if you swap out the animator controller on the animator component of the parent object of the enemy, once you start creating new animations, it'll likely just automatically create a brand new sprite renderer on the parent object, and you won't have to use the sprite renderer on the jitter holder. It doesn't seem to affect anything at all.

    And then, if you want the enemy to flash when you attack it, make sure to drag the object that contains the sprite renderer you are using into that slot. So, if you are using the new sprite renderer on the parent object, this is object that you should slot to flash.

    Does that make sense?
     
    brittany and Bagnol like this.
  13. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @brittany Just to add a little info - If you take a look at the SkyTyrannosaur YouTube channel, there are two videos showing the specific method used in Rex to create your animations. The important thing to keep in mind seems to be to make sure when you're making a new animation, that you Add Property, then dig down through and select SpriteHolder>JitterHolder>Sprites>SpriteRenderer>Sprite or as @jeremyfryc mentioned, Unity will create a second Sprite Renderer and show two sprites.

    Rex Animation Video 1

    Rex Animation Video 2
     
    brittany likes this.
  14. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    Yes that does make sense and you are right. Without realizing it I created another sprite renderer when doing animations and had been animating that one instead of the one already there. Thank you!!
     
    jeremyfryc and Bagnol like this.
  15. brittany

    brittany

    Joined:
    Feb 26, 2013
    Posts:
    93
    That is very very helpful. Yeah, I did have two sprite renderers and I wasn't animating the one in the JitterHolder but was instead animating the other one. Now that I know more what I am doing and how things work, it makes sense. Those videos are great. Thanks!!
     
    jeremyfryc and Bagnol like this.
  16. Edco

    Edco

    Joined:
    Dec 6, 2013
    Posts:
    16
    Unity 20.1.7 : Hello, not sure where else to ask, but we've recently started generating infinite errors in our Unity project and finding it to be directly related to Rex Engine Editor windows. A few times Unity has even forced a reset of Editor UI layouts siting a conflict with "custom windows," traced back to Rex-- Rex Settings, Rex Level Editor, Rex Palette. Running the game also has been throwing errors and not drawing correctly.

    Has anyone else experienced this? Other settings related to our level setup have also been affected, and we fear this is the start of irreversible problems if we continue using a depreciated Rex.

    Screen Shot 2020-10-13 at 3.44.34 PM.png Screen Shot 2020-10-13 at 3.46.02 PM.png
    Screenshot2.png
     
  17. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @Edco Did these errors start after updating Unity?
     
  18. thenadamgoes

    thenadamgoes

    Joined:
    Apr 26, 2019
    Posts:
    29
    Is there a setting to stop falling while you melee attack?

    I see "Freeze Gravity" in the attack component, but it doesn't seem to do anything. I just want to briefly pause in the air when I attack.
     
  19. tirkaroKujo

    tirkaroKujo

    Joined:
    Jul 10, 2017
    Posts:
    10
    Still haven't gotten an answer for this and it's putting me in kind of a rut with my current project rn, my attempts to homebrew workarounds for this with my limited C# knowledge has been unsuccessful, so I might just need to abandon the idea of weapon energy all together (or just throw bolt into the project lol)
     
  20. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    Hey @tirkaroKujo, my apologies - it seems I missed your post. I hadn't actually caught this but I'm seeing something similar. To start with, can I confirm if all your weapons are sharing the same energy pool? That could cause a multiplication effect if each weapon is refilling to the same pool.
     
  21. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @thenadamgoes The Freeze Gravity option on an attack definitely works, but it only stops falling for a single frame by the looks of it. You may have to extend/modify the Attack component to trigger the freezeMovementY bool, and possibly freezeMovementX of RexPhysics temporarily to achieve a more noticeable effect.
     
    thenadamgoes likes this.
  22. tirkaroKujo

    tirkaroKujo

    Joined:
    Jul 10, 2017
    Posts:
    10
    Yes, tho the multiplication effect is happening even in regards to moves that dont use MP, it counts for every currently active attack script it seems. Did a lot of digging through the code, but I'm not sure where the culprit lies here, as even the weapon refill script itself refers to a few other classes/scripts across the board, and altering those hasn't been giving me much luck so far.
     
  23. Edco

    Edco

    Joined:
    Dec 6, 2013
    Posts:
    16
    Yes, we're mostly thinking it's a conflict with 2020 so am asking if anyone else updated with/without issue.
     
    jeremyfryc likes this.
  24. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Hey! I just saw your question about the errors. So, this happened to me with two of my projects after updating Unity to 2020. I was freaking out, but I decided to shut down Unity and restart my computer. I did, and now both projects work. I know it's simple and please excuse me... but have you tried this yet? I do hope it works! (I'm on Unity 2020.1.2f1)
     
    Bagnol likes this.
  25. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @jeremyfryc Does your project build successfully after the update? I just recently lost a (backed up) project when updating just from 2019.1 to 2019.4. It gave odd errors initially that disappeared after restarting Unity (and possibly rebooting), but would return during the build process and cause it to fail every time.
     
    jeremyfryc likes this.
  26. thenadamgoes

    thenadamgoes

    Joined:
    Apr 26, 2019
    Posts:
    29
    Ah ok. I'll give that a try, thank you!
     
    Bagnol likes this.
  27. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Good question -- Yeah! It did. Upgraded to 2020.1.2f1 and it works perfectly after I rebooted. I dunno what the issue really was, but I'm happy it worked. I have since made builds and my friends and family have played builds on both Mac and PC without any issues.

    I wish I could be more help, and I wish I were smarter about what could possibly causing those errors. I guess we'd have to look through the release notes of the Unity version and check to see if it conflicts with anything in the RexEngine.
     
    Bagnol likes this.
  28. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @jeremyfryc That's great to hear - I might have to try again with different versions. Unfortunately the error I was getting didn't even really show up on Google either, at least nothing leading to an answer. The error log was zero help either, nothing specific enough to follow up on. I only really updated to test something unrelated anyway, so if it continues to prevent me from updating it's no major issue.
     
    jeremyfryc likes this.
  29. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    If anyone else is having issues with the MP Restore Power Up not quite working as intended like @tirkaroKujo mentioned, I've got an alternative solution attached to this post that might help. It's just one option but I've tried to make it as flexible as possible. It contains a readme file and everything you need to get started. It's an addition to Rex, not a modification, so it won't change your files and shouldn't require any coding.
     

    Attached Files:

    Last edited: Oct 19, 2020
    tirkaroKujo and jeremyfryc like this.
  30. Edco

    Edco

    Joined:
    Dec 6, 2013
    Posts:
    16
    Just as a followup, yes we've tried this and several other approaches with no luck. I'm afraid we were unable to resolve conflicts with the Rex dialogs but understand it may be out of the bounds of our current abilities to understand the integration with Unity and the update to 2020.1.7+. But in an effort to move ahead with development we had to make the decision to subtract our work from any dependency on Rex Engine. Best wishes to everyone else here and have fun.
     
    jeremyfryc likes this.
  31. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Quick question: Is there a way to add directional back and forward attacks? I'm in the process of testing out a bunch of aerial moves (again, think you're standard Smash Bros. moveset; up air, back air, etc.) and I'm assuming that I can easily set up air and down air via the Vertical Press option, but I can't see an option to set a specific move for holding back, or the opposite direction the player's facing.

    Actually, to piggyback off of that, I still haven't figured out how to properly jump backwards even. Best I got is a reverse back dash that forces an uncontrollable arc on jump, so the above might not even be doable currently.

    Quick edit: Also just discovered a bit of a landing animation glitch that occurs when hitting the ground if an aerial attack is playing. For me specifically, it happened when an attack initiated from a sub button was playing.
     
    Last edited: Oct 28, 2020
  32. thenadamgoes

    thenadamgoes

    Joined:
    Apr 26, 2019
    Posts:
    29
    I figured out how to add more cameras for paralaxing.

    But now I'm just wondering. How many cameras is too many? Does it matter? Is there a certain point when I should just consider using one camera in Perspective mode?
     
  33. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Wanted to chime in here -- I don't believe this is something that RexEngine supports. It's not something I've looked into specifically, but Rex does only cover the most basic moves. You'd probably have program something out yourself. Sorry!
     
    PhantomFox128 likes this.
  34. san40511

    san40511

    Joined:
    Oct 20, 2019
    Posts:
    29
    Hi guys. i have a problem with scene switching. When i do
    Code (CSharp):
    1.         SceneManager.LoadScene(sceneName,LoadSceneMode.Single)
    2.  
    the scene is switching but params are not reseting. my player-actor appears in wrong place and all params and states are the same as on prev. scene
     
    Last edited: Oct 30, 2020
  35. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Hey, it's a good question -- I don't think I'm qualified to answer this, but I'm curious; is there a reason your trying to call this through custom code? I know that RexEngine draws code from several different scripts that work together to perform one harmonious action. Can you perform this by using what comes out of the box with RexEngine? Perhaps in a clever way?
     
  36. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Is there a way to disable the sequence that plays when the player enters another scene through a door? I'm trying to set it up like in the Kirby games where the player is immediately able to start moving as soon as the next scene loads. Right now, it plays the door enter animation on repeat while there's about a two second pause before the player is able to do something.
     
  37. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Hey, good question. Do you have a DoorExit animation? I have made sure my Players all have DoorEnter and DoorExit animations (or whatever they are supposed to be called), which are just idle animations. This allows the player to just start moving immediately after he/she leaves the door.
     
  38. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    I do not have any DoorExit animations. After reading this, I went ahead and made one that just has the first frame of an idle animation, but I'm still getting the same result.
     
    jeremyfryc likes this.
  39. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Sorry about that. I don't think I was clear enough. Here is a little video which explains it:

    https://www.loom.com/share/06ee7af98db343b4a853921142c71436
     
    PhantomFox128 likes this.
  40. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Thanks for this! I went through and set up some things, but it's still not completely fixed, although different things seem to be happening depending on the setup.
    Really quick, I made a separate door prefab that I was going to use. Here's a screenshot of its current settings:
    Door.png
    For some context, right now, the EnterDoor animation is two frames of the character facing towards the door as if they were going to walk in and the ExitDoor animation has no frames on it whatsoever. Also, the door's sprite is just a simple, static opening with no animations, similar to doors in the old Kirby games.

    I have some doors that are supposed to be one way in order to progress through the game. You know how in Kirby there were doors you go through to get to the next part of a level and you couldn't go back? It's like that. I managed to achieve that by placing a connected door in the next scene while disabling the sprite and the box collider for said door so the player can't interact with it (I haven't tried it in awhile, but I remember that setting it to be Exit Only didn't seem to change anything. I could be wrong on that though). This setup is giving the above result: the character enters just fine, but when the next scene is loaded, the EnterDoor animation plays on repeat while there's a two second delay where the player is unable to do anything (I read way earlier that the delay is for the door animations, but I got rid of those, so I don't know what's going on there).

    The other situation is doors that go into sub-rooms that the player can go in and out of. Again, recalling Kirby, there's some rooms you can go into that would have maybe an item or two and you can go back to the previous room. This setup is pretty straightforward with just a door in each scene the player can interact with. This setup is closer to the desired result, but it's still not perfect. The EnterDoor animation doesn't play when the next scene loads thankfully, but there's still a one second delay before the player can do anything. To top it off, no animations play for the character until either the player does something or an idle animation plays, where it then goes back to normal. When the scene is loaded, the character just sits motionless on one sprite.

    Sorry I'm still constantly bugging you about this. Hopefully there's something in here that I'm missing that I just can't see for some reason.
     
  41. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Yeah, I see that. Weird that setting the door to "Entrance Only" doesn't work. It's still allows you to exit. How strange. Well, I figured out a work-around. It's always good to get creative with the tools at your disposal. You can see how I achieved what you are looking for here:

    https://www.loom.com/share/c4cbcba238784ce29c62d3a71f1cadd6
     
  42. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    I think you need to add a value greater to zero in one of the 'movement speed' parameters, I think that's how I got it to work!
     
  43. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    does anyone know how to make movement animations play for horizontal movement?
     
  44. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Hey, just checking in here -- can you elaborate? What do you mean "movement animations play for horizontal movement"?
     
  45. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    whelp, that was just me confusing the words 'horizontal' and 'vertical'-- sorry about that, thanks for the quick reply! I've just got a pretty decently set up birds-eye-view 2d game, but i've never figured out how to get movement animations to play when characters move vertically, and just accepted my fate until I found this great forum.
     
  46. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Gotcha. No worries -- Are you using RexEngine? If so, on the Rex Physics script for the player/enemies, look over anything that has to do with gravity. Uncheck "Uses Gravity". Uncheck "Snap to Floor On Start". Things like that. Does that help?
     
  47. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    Thanks for getting back to me! I am using Rex Engine, I've been able to get vertical movement set up, but it seems that Rex only plays movement animations when actors are moving horizontally by default, and I was wondering if that could be worked around at all.

    If anyone is interested, a lot of these features may apply more to top-down games, but I can post info for creating varying levels of accuracy for enemies with ranged attacks, spreading/self replicating fire (for forest fires, explosions, etc), random weather generator, and farcry style outpost capturing (kill the leader/all the enemies/blow up something-- trigger a sequence to disable the enemy outpost, replace it with allied outpost)
     
    jeremyfryc likes this.
  48. jeremyfryc

    jeremyfryc

    Joined:
    Mar 11, 2014
    Posts:
    96
    Ahhhh gotcha. That would definitely need to be scripted out. There is no animation for vertical movement, I don't think. I know in the Rex Demo there is a flying portion. You could check that and see if he put in any special vertical animation movements in that specialized controller.
     
  49. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    Ohhh, that's a great suggestion, I'm pretty sure there is a little animation when you move vertically in that level, thank you!
     
  50. BlackGamma

    BlackGamma

    Joined:
    Dec 2, 2019
    Posts:
    26
    Alright, I've had no luck tinkering around with vertical movement, so I'm paying somebody on fiverr to help me out, and I will post the edit once it's done... In the meantime I've made the discovery that rex engine is capable of some faux-procedural generation of levels, which I have been using in my game to add randomly generated exploration areas outside of the main open-world map, and add random quest locations. I've done this by making a scene with many layers of possible combinations of tilemaps (buildings, plants, water, random objects), and groups of enemies & powerups, and then switching them all 'off' in the inspector. Next, at the start of the level, I have a little invisible RexAI character set up to play an AI sequence which randomly selects groups of tilemaps, enemies, and powerups to turn 'on'. I've grouped my tilemaps and other objects into separate sequences, based on context, so if the 'forest' tilemap group turns on, it won't have any possibility of activating the 'town' tilemap group that overlaps with the forest. (this is all without any c# editing, just 100% in one rexAI routine.) I think the implementation of this technique in a platformer would actually work better than in my top-down format, and could be used to create infinite dungeons and cave systems. It's just not persistent, so you can't go back to a level that you were already in and have it be the same way it was the first time. (you could fix this by having a separate rexAI object for each group of tilemaps/objects, and have all generator objects start 'on', but be turned 'off' by their respective AI object (have AIs wait one second before turning them off). Then have one main AI object randomly select one of the others to kill, and then kill itself, when the level is loaded. Turn on object disablers (full session) for that AI, and all the other generator AIs, and that would fix it, but you'd have to make a predetermined set of scenes to create a path through the random levels.)
     
    realitywhoneedsit and jeremyfryc like this.