Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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

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

  1. ASamer

    ASamer

    Joined:
    Aug 30, 2019
    Posts:
    2
    Hello, I also have the problem of multi-touch. Have you solved it now? Look forward to your reply, thanks
     
  2. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Hi again!
    Every time I try to make a build, it keeps giving me errors that all seem to come from the ladder script, specifically:

    Assets\RexEngine\Scripts\RexEngine\_Actors\Ladder.cs(75,20): error CS0103: The name 'PrefabUtility' does not exist in the current context

    Assets\RexEngine\Scripts\RexEngine\_Actors\Ladder.cs(77,21): error CS0103: The name 'PrefabUtility' does not exist in the current context

    Assets\RexEngine\Scripts\RexEngine\_Actors\Ladder.cs(77,68): error CS0103: The name 'PrefabUnpackMode' does not exist in the current context

    Assets\RexEngine\Scripts\RexEngine\_Actors\Ladder.cs(77,100): error CS0103: The name 'InteractionMode' does not exist in the current context

    I'm also getting some other errors, but they seem to be ones that say that the build failed due to compiler errors or something.
    Also worth metioning I'm getting 22 warnings. Dunno if they matter as much though.
     
  3. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    Last edited: Sep 7, 2019
    PhantomFox128 and BeeZee like this.
  4. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya,

    Yep, this is solved. Here's a link to an updated RexTouchInputManager.cs:

    https://www.dropbox.com/s/i0gwm86663pixzy/RexTouchInputManager.cs?dl=0

    If you replace the existing RexTouchInputManager.cs in your project with this updated one, that should fix the issue!
     
    Bagnol and Lars-Steenhoff like this.
  5. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Hiya!

    Couple more questions for you.

    How would I go about using a single large image for a slow, scrolling background? And would using a big image even be a good idea or is there a better way to go about it?

    Also I know this probably isn't the right thread for it, but I picked up Ferr2D not that long ago and was wondering if it's possible to use both that and RexEngine to make one-way platforms, moving platforms and the like.
     
  6. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    How exactly does the door object work? I'm not quite understanding it for some reason. Also, it keeps crashing the game whenever I use it.
     
  7. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    Is it possible change in near future integrated TextMesh to TextMeshPro in core engine or Canvas UI? TextMeshPro is now free and has a lot of nice features that are better like old TextMesh unity component.

    I don't like change core source manualy every new release ;)
     
  8. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    The gist of it is, Door has a SceneLoader on it which will activate when the player interacts with the door. That will load the player into whichever new scene is specified in the attached SceneLoader component.

    There's a good example of this in action in the Demo_9 scene included with Rex Engine. There's a door in the lower-right corner which leads to a separate room with some powerups in it, and then that other room has a door that leads back.

    Crashing the game is really strange, though -- I've never seen that happen with the door. Is there an error that's popping up in the console when that happens? (I'd make sure the scene you're trying to load into has been added to your Build Settings, as well, because that would definitely cause problems if not!)
     
    PhantomFox128 likes this.
  9. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Ferr2D will definitely work with Rex. I love Ferr, personally, and can't recommend it enough! Just make sure to put your terrain on the "Terrain" layer, or the "PassThroughBottom" layer if you want a one-way platform. (Also, I'd recommend still keeping your walls perfectly vertical, and I'd limit your floor slopes to 60 degrees and below.)

    For the scrolling background, set the Layer of your background image to the "Background" layer, and Rex's parallax system should automatically make it scroll more slowly than the rest. (The "Canvas" layer won't scroll at all, and the "Midground" layer will scroll more quickly than Background, but more slowly than the regular sprites layer.) Using a big image is probably fine; depending on the level of detail you need, you can probably save memory by using a slightly smaller image and then scaling it up, but that's up to you.
     
    PhantomFox128 likes this.
  10. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Okay, so it looks like not having it in the build is what was causing it to crash, but now I'm getting a couple of other issues. The door's sprite isn't showing up in the game view (scene view shows it fine) and when the next scene loads, my character spawns slightly above the ground and doesn't respond to any input.

    EDIT: So I tried it with one of my own scenes and the player is spawning out of bounds.

    EDIT 2: Alright, so trying with multiple scenes, the player seems to spawn at certain locations that aren't the spawn point and still doesn't respond to input whatsoever. Do I need to attach a sceneloader object to the target scene somewhere?

    I always feel really dumb when I can't figure something out and the solution turns out to be really simple lol. Anyway, thanks for the help! Greatly appreciate it.
     
    Last edited: Sep 19, 2019
  11. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Also, sorry for the constant questions, but I'm also running into an issue where my character "freezes" if he jumps to far off the top of the screen.
     
  12. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    on a first look is REX very great asset, but afrer one week I found that a lot of elements are hard-code in a way, which is not good for new game addons and extensions. I want use REX for my next project, because has very good working player ability/attack system and components. Problem is, that this all components are directly connected with existing gameplay and game data. This connections break usability in other game flow as is now.

    A few example:

    - using animations from 3rd party tools/importer
    - because animated sprite is assigned out of Animator component (SpriteHolder), then is not possible using exported animation
    - all animation clips I have to create manulaly or always make changes on created object from REX palette :(

    - UI/HUD
    - because level has used UI in scene instead in Canvas/uGUI, create other UI elements is not so simple from existing elements
    - using TextMesh instead TextMesh Pro, which is now free and part of new Unity

    - PowerUp
    - powerup has only 3 UI bars type, and only one for weapon
    - when game need more weapon types with extra bars and energy/amount, then is not possible assign powerup to other bars

    - EnergyBars
    - energy has link to energyBar prefab, which is problem when items/powerups are created proceduraly
    - setup item count from powerup is not possible for example for different weapons ammo, because implementation now works only with one Energy/Bar

    - Player data
    - player data like MP, HP, lives are as part of prefabs/components
    - this is not good way, best solution is create extra static component, where gameplay data are stored
    - then is very simple share and control values, similar to MVC flow, with other game components in or out of scene without impact on existing or new code

    Again, REX is really very good, but need clean and modular architecture with modules working together instead hard-coded connection between components and prefabs.


    Best Regards,
    AndyGFX
     
    jeremyfryc and Lars-Steenhoff like this.
  13. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya, no problem. On the RexPhysics component for your character, pop open "Advanced," and un-check "Disable Physics When Off Camera." That should do the trick!
     
    PhantomFox128 likes this.
  14. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Thanks for the feedback!

    Regarding where sprites are stored on your character: if you'd like, you can absolutely move your SpriteRenderer to the root of your actors, if that makes it easier to import animations from other programs. The reason they're nested by default is because that enables you to move the sprites independently from the rest of the GameObject; for example, there's a jitter effect that's used when actors take damage which couldn't be accomplished without nesting. Nesting also opens up the possibility to do things like use positioning as part of your animations, and of course to use multiple sprites for your character! For all those reasons, I strongly recommend leaving them nested, but by all means, don't use the nesting if you don't like it. (You can also change the Template which new actors are created from by opening up Resources/Templates and making the adjustment there, and that will carry over to every future actor you create from that template.)

    I'll plan to look into TextMesh Pro in the near future. It sounds promising!

    You can create your own prefabs to use as energy bars; if you scroll through previous pages in this thread, I think some other people have created some really cool designs. If you want, you can give every character their own separate energy bar, and those can either use the same prefabs or different ones; it's up to you.

    Regarding where player health is stored, I disagree with the notion of storing it somewhere else statically. Health (and the energy component that uses it) is intended to be a property of the character whose health it is; that's intentional, and I wouldn't want to do it any other way. If you're looking to query the health of a character, you can call hp.current on them, and that will allow you to access that value if you need it. If there's anything specific you're trying to do with it, though, definitely let me know and I'll try to help out.

    At any rate, thanks again for the feedback, and for the kind words! I'll certainly take them into account going forward, and I'm always here to help with any questions you might have.
     
    Last edited: Sep 21, 2019
    Bagnol likes this.
  15. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    So, I'm using doors as the primary way to move to new levels and want many of them to be entrance only, but I'm running into a couple of problems. I was under the impression that setting the right identifiers and specifying which level to load would simply have the player spawn into the new scene at the spawn point, but in practice, the player spawns anywhere but the spawn point (they've spawned in the ground, in the air, even out of bounds) and the game refuses to accept any input afterwards. I'm betting the solution is relatively simple, but there's gotta be something I'm missing.

    Also, how do I get the SwimController working? I've tried looking at the examples provided, but I can't to get it to work.
     
  16. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    The Spawn Point graphic is an Editor-only thing; that determines where the player will load into the scene if you test starting in that scene via the Editor.

    For a Door, you're loading into a specific door in your new scene. If you check out the door in the Demo_9 scene, you'll see that it has a SceneLoader component on it, which is set to load into Demo_15, Load Point "A." In Demo_15, you'll see the corresponding Door that you load into. That Door is the only SceneLoader in Demo_15, and its Identifier is set to "A." That means that the Door in Demo_9, which is set to load into Demo_15 A, will load into that specific Door.

    For Water, you'll want a Water script to be on the object you're using for your water body. There's a good example in Demo_8. When your characters touch the BoxCollider on your water body, that Water script will tell them that they're touching water. Then, you'll want to make sure your player has two RexControllers set up: one for land and one for water (as always, the demo character is a good template to follow! Under its Player > Controllers object, you'll see both a regular "Controller" object and a separate "SwimController" object.) On the root of the player, on their RexActor script (which is called "Booster" for the demo character), you'll see a "Water Properties" field. If you expand that, there are two slots where you can slot in the Land and Water Controllers; when your player touches a water body, they should automatically transform to the correct one.
     
    Bagnol and PhantomFox128 like this.
  17. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    So, from what I understand is that, even if I'm using doors for everything, I'm still going to need a matching door/sceneloader for the new scene, even if the player isn't supposed to go back. I got around this by disabling the box collider and the sprite of the new door so the player can't see or interact with it, but it's still there. Is that a good way to go about it or is there a better way? Either way, it's finally working now (yay!).

    So for now, my only other door related questions are:
    There's a bit of a two second or so delay on loading the scene where the player is unable to do anything. Is that normal?
    Say I wanted a "goal gate" that would lead back to a menu or something. Would I just set it up the same way?

    Other than a few tweaks, almost everything seems to be working perfectly! The only problem I'm having at the moment is that upon exiting the water, the player now falls very slowly to ground whenever they jump.
     
  18. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    The SceneLoader component on your Door will have a property called "Scene Load Type." If you set that to "Entrance Only," then the player can enter the scene via that Door, but they can't leave through it afterwards.

    The small delay is there for the door's opening/closing animation, as well as the player's corresponding enter/exit animation, if it has one. You can set those on the Door itself via the Actor Animations and Door Animations fields. Note that for Door Animations, it'll want you to slot AnimationClips that are on that Door's Animator, and for the player, you just type in the name of the AnimationClips that are on the Player's Animator.

    For your goal gate question, that's an interesting question! I didn't explicitly design the Doors with that in mind, but I think it should work just fine.

    The water thing is weird. I could swear I heard about that once before, but I'm going through my notes and I can't place it. Would you be able to .zip up your project and PM me a link to it so I can take a look?
     
    PhantomFox128 likes this.
  19. jemchicomac

    jemchicomac

    Joined:
    Jan 2, 2018
    Posts:
    10
    Hi,

    a super quick and simple question: When modifying singletons prefab pointing my own prefab player, this change is not reflected when the game is running: the runtime-generated Singletons is pointing to the default player prefab instead my own prefab

    I'm using Rex 1.55 and Unity 2019.2.6f1

    Thanks in advance
     
  20. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya,

    Are you using the Rex Settings window? It's under Window > Rex Engine > Rex Settings. The top field in that window is called "Player." If you expand that, there's a slot for the Player prefab; slot your player in there and hit "Save" and you should be good to go.
     
  21. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Got this figured out:

    There’s a value on the RexController called “Override Max Fall Speed.” This is what governs — you guessed it — the maximum fall speed of the character. If it’s set to 0, it does nothing, but any value higher than 0 will change your character’s max fall speed when that RexController is switched to. You had 0 set for your Land Controller and 2 set for your Water Controller, with your Rex Physics set to “20” by default. So what was happening was:

    • Your fall speed was 20 by default, due to Rex Physics settings
    • You’d go into the water, and the Water Controller would change your fall speed settings to 2
    • You’d leave the water, and the Land Controller wouldn’t change the settings, since its Override Max Fall Speed value was 0, so you’d stay at 2

    If you put Override Max Fall Speed to "20" on your default/land-based RexController, that'll solve the issue.
     
    jeremyfryc, PhantomFox128 and Bagnol like this.
  22. jemchicomac

    jemchicomac

    Joined:
    Jan 2, 2018
    Posts:
    10
    Hey! This worked perfectly!

    I was confused after watching the Rex's Castlevania tutorial, for me is clear now this is the way to go.

    Thanks!
     
  23. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    Hey, thanks for doing that! Really appreciate it!

    At this point, I have a handful of other water related issues I need ironed out, (sorry for all the questions, you're probably really sick of hearing from me) and then hopefully I should be completely done on that front. (fingers crossed)

    I set it up so that the only attack the player can perform while swimming is the aerial attack that I have, but instead it keeps playing the standard 3 hit ground combo. Assuming I did it right, the ground attacks should only be performed when on ground and not the air (I'm assuming air moves double as water), so I'm not entirely sure what's going on here, if that makes sense.

    I want the player to be able to move in all directions while underwater (since sinking is really slow), so I turned on the checkbox on the SwimController to be able to move vertically but nothing seems to have happened. Pressing up or down doesn't do anything. Also, is it possible to have swim animations for moving up and down? I can't find anything for that.

    I noticed for the splash effect, you need to slot in a RexPool, but I can't figure how to get that set up. Is it also good practice to have all particle effects be used with that or am I misunderstanding?

    This ones probably the weirdest. I have a door underwater that leads to a completely submerged side area, and from what I can tell, exiting through a door that's underwater seems to keep the SwimController active for some reason, as in going out of the water doesn't change anything - the player's still swimming on land. It's also giving me these two errors:
    Cannot create Collider2D shapes if shapes already exist.
    UnityEngine.Behaviour:set_enabled(Boolean)
    RexEngine.<MovePlayerToSpawnPointCoroutine>d__34:MoveNext() (at Assets/RexEngine/Scripts/RexEngine/_Managers/RexSceneManager.cs:307)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    Assertion failed on expression: 'GetShape() == NULL'
    UnityEngine.Behaviour:set_enabled(Boolean)
    RexEngine.<MovePlayerToSpawnPointCoroutine>d__34:MoveNext() (at Assets/RexEngine/Scripts/RexEngine/_Managers/RexSceneManager.cs:307)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)


    And on a side note, I've noticed that entering a door when the player isn't grounded has them automatically jump upon loading the next scene. Not sure why.

    Last one I swear. This most likely doesn't have to do much with Rex per say, but I figured I could get a quick answer. I added a little particle system to the SwimController that has essentially small bubbles emitting close to the player's head and floating up (sorta like in Mario games for context), but it doesn't turn with the player when they turn. Would anyone know how to do something like that?

    I know I say this a lot, but I greatly appreciate all the help. I've been able to make substantial progress on my project thanks to this asset and there's no way I would have been able to get this far this quickly without it.
     
  24. RainbowWhale

    RainbowWhale

    Joined:
    Feb 25, 2018
    Posts:
    37
    Hello! How to set up a scene that loads after you click the "Setup Level Scene" button? I want to add my objects to the scene, change the sprites.
     
  25. BomberRaz0r

    BomberRaz0r

    Joined:
    Oct 11, 2017
    Posts:
    6
    @BeeZee When are we getting a new version of the Awe-rex-some RexEngine? Is there any planned date? I'm just asking so that I can better sort things out for a new project that I'll be moving from prototype to the real thing soon. haha
     
    Last edited: Sep 30, 2019
  26. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,458
    BomberRaz0r likes this.
  27. BomberRaz0r

    BomberRaz0r

    Joined:
    Oct 11, 2017
    Posts:
    6
  28. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    There is indeed a Halloween update coming later this month, and in the meantime, there's a new update coming this week, as well.
     
  29. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I'm not quite sure what you mean. Can you clarify a bit?
     
  30. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    For grounded attacks vs. air attacks: the enabler here is whether or not the character is physically touching the ground, regardless of whether they're in water or not; so you can have an attack which says it requires the player to be grounded, and you can execute it both on land and in water, so long as the player's hitbox is touching the floor under them. I had to do a little bit of custom coding for the demo Booster character to make the proper attacks enable and disable when he changed between his land/sea/air controllers. If you're interested, you can see that on line 112 of Booster.cs. This is a complicated enough topic that I could probably do an entire tutorial just on this. More realistically, typing this out makes me realize Rex probably needs a more robust system to handle this situation out-of-the-box. Let me give that some thought.

    With doors leading from water to land: I don't think that will work; characters need to *physically* exit water for it to properly trigger their state change. You'll most likely need to have underwater doors only lead to other underwater doors, and the same on land. I'd probably just have one underwater door lead to another underwater door in a shallow pool, and then the player can exit the pool and the land controller should trigger.

    With doors making the player jump if they enter one when they're not grounded: that's odd -- I'm testing that on my end and I'm not seeing it. I'm trying both jumping before entering the door as well as enabling vertical up/down movement and entering the door in midair that way. Can you provide some more details?

    For using the up and down buttons to navigate underwater: at the moment, that requires turning gravity off on your RexPhysics component; under the Gravity field, turn off "Uses Gravity." I think at one point in the past, you could use both gravity and the up/down movement at the same time, but if I recall correctly, that was causing some sort of larger bug, so I had to make them mutually exclusive.

    For Rex Pools: The water in Demo_8 has a good example of this. Basically, you'll put the Rex Pool component on a child GameObject of your Water object. The Rex Pool consists of a prefab GameObject, which should be your splash effect. (I'd reference the "Splash" prefab in the Rex demo to see that, as well.) The job of the Rex Pool is to then create as many instances of that prefab as you specify, and keep them ready to play whenever a splash is needed. That Rex Pool child object is then slotted into the "Enter Splash Pool" or "Exit Splash Pool" (if you want different splashes for each) of the root Water GameObject, and they should then play automatically when something enters or exits the water.

    For your Unity particle system, I'd check to make sure it's in local space instead of world space. With world space, the particles won't orient to the player's scale or position, but with local space, they should.
     
    PhantomFox128 likes this.
  31. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Rex Engine 1.56 is now live! It's got some new features I'm really excited for. I'll have tutorials detailing them all in the coming days; to start with, here's the new Circular Moving Platforms feature!

     
    CHEMAX3X and Lars-Steenhoff like this.
  32. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    So as far as getting attacks/free underwater movement working, I'm assuming that's going to require some extra coding? For using up and down in water, I noticed the RexPhysics component is only on the main controller, so I'm assuming I'm going to need to find a way tell the engine to switch gravity off when the SwimController is active unless there's something I'm missing here.

    From what I can tell with the doors making the player jump, it seems to only happen if the player enters the door while in water. I figured the player wasn't technically grounded during then, so I assumed that's what was happening. My bad for the confusion. If it's not happening while jumping or in midair, then I'm guessing it might only happen while the SwimController is active.

    As for the splash effect, I mostly got it working. The particle plays, but the colors are way darker than they should and the burst is more narrow and flying way upwards. I checked the effect on its own in the prefab and it's working fine there?
    EDIT: I got the color working fine, but the burst is still acting weird.

    EDIT 2: Found something else. I'm making a water level that purposely has water in odd places (for example, floating in midair) and I'm noticing that trying to exit a body water from the bottom is causing the player to jump and stay in the water. In other words, they can't get out.

    Here's a pic of Kirby with an example of the kind of level I'm making:

    Those air bubbles are dry land. I'm making a level with water somewhat placed similarly, being able to exit water from different angles.
     
    Last edited: Oct 4, 2019
  33. clammy2017

    clammy2017

    Joined:
    Feb 21, 2018
    Posts:
    27
    Hi.

    I’ve been away from developing my platformer for the last year, as I had paid contract work come along that needed doing.

    Back now, and I can see lots of changes/improvements have been made. Is there a full changelist of what was new each version somewhere? I checked on your website, and it’s a little out of date ;)

    Also, is there a roadmap or anything close to it, of planned features? Just so I don’t go adding a new feature myself which you intend to add later, etc etc.

    Thanks,
     
  34. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya,

    For water, you're correct -- it's designed to work primarily from the bottom-up, so it'll make you jump if you exit through the top. If you want to disable the jump, you can comment out line 274 of RexActor.cs, but be forewarned that the water isn't really made to work any other way, so that might cause other issues.

    RexPhysics should be on the root GameObject of your character, so it's independent of the Controller. What I'd probably do for that one is override the OnControllerChanged() method of your RexActor. That'll take a minor bit of code, but it would basically just have to look like this:

    Code (CSharp):
    1.         protected override void OnControllerChanged(RexController _newController, RexController previousController)
    2.         {
    3.             if(_newController == waterProperties.landController)
    4.             {
    5.                 slots.physicsObject.gravitySettings.usesGravity = true;
    6.             }
    7.             else if(_newController == waterProperties.waterController)
    8.             {
    9.                 slots.physicsObject.gravitySettings.usesGravity = false;
    10.             }
    11.         }
    It's hard to say for your splash particle -- that one's really probably more of a standard Unity ParticleSystem thing, and those can get finicky. I'd double-check the shader it's using, as well as the scaling of any parent objects it has. It also might come down to its rotation or a similar Transform property; those can mess with particles a lot.
     
  35. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Welcome back! Hope you're able to make some good headway on your game!

    I just updated the version history on the official website; thanks for pointing that out. Note that there was an intentional gap between 1.36 and 1.5; 1.5 added a new AI system, which was such a massive update that I decided skipping ahead to a nice, solid number like "1.5" made sense.

    I don't have a roadmap, but feel free to send me a PM with any new features you're interested in building and I can let you know if they're on my radar or not. At the moment, I'm planning a Halloween update which will predominately focus on new enemy behaviors.
     
    Lars-Steenhoff and Bagnol like this.
  36. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    1.56 includes NPC character portraits! Here's how to implement them (and how to style your text boxes):

     
  37. jemchicomac

    jemchicomac

    Joined:
    Jan 2, 2018
    Posts:
    10
    Hi, I'm facing a problem and I can not find the solution.

    As you can see in the image, there are glitches when rendering my tilemap:



    I'm using latest unity and RexEngine versions, no special camera configuration too. I'm pretty sure everything is properly configured when creating tileset and importing sprites (ppu 16, btw).

    Find a view of my Sprite Editor:



    Problem also appears on build version. Any thoughts? Thanks in advance
     
  38. Bagnol

    Bagnol

    Joined:
    Sep 5, 2013
    Posts:
    169
    @jemchicomac I believe this is an issue that occurs when Unity slices the tiles. I haven't used Unity's tilemap system, but the way it's generally solved when using the Super Tilemap Editor asset is by padding the sprites with several pixels. I'm seeing a some people mentioning they can solve the issue by adjusting the camera or configuring pixel snapping, but padding/extrusion is the only way I've seen actually work.

    A thread from back in 2014 -
    https://forum.unity.com/threads/tile-map-tearing-problems.225777/#post-1507246

    A video from the developer of Super Tilemap Editor explaining the solution in their asset -
     
  39. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi, I found logic problem.

    When is used AttackSet for example with different weapons with diff. ammo, where energy bar shows amount (diff. bar for diff. weapon), and when is enabled UI state "Only Show When Enabled", the is problem with pickup, because is imposible pickup item and increase energy bar amount , due to is hiden when is picked item for non active weapon => game then crash.

    Code (CSharp):
    1. Coroutine 'ScaleEnergyCoroutine' couldn't be started because the the game object 'WP-Bar' is inactive!
    2. UnityEngine.MonoBehaviour:StartCoroutine(String)
    and second problem is, that UI prefab (for example as icon for weapon) used same logic as energy bar. I don't understand why is used one state for different UI elements with different target. I think is better using one state for energy bar and second for additional UI element.

    Yes it is possible set "Only Show When Enabled" to false on all bars, but then is impossible show which one weapon is currently selected. Pickup then works, but player lost info about selected weapon.
     
    Last edited: Oct 8, 2019
    Lars-Steenhoff likes this.
  40. clammy2017

    clammy2017

    Joined:
    Feb 21, 2018
    Posts:
    27
    There’s some projectile changes i want to make, but I’m pretty sure no one else will need them, so that’s ok.

    But the other thing I want to get in ASAP to build levels around is a Mario-3 style bum slide down hills when crouching, with acceleration and maybe even use it to launch of ramps into air.

    As I know you were going for a “Mario feel”, I was wondering if that was on your plan list at all? If not, I’ll spend a while doing it myself trying to get the feel I want.



     
    Lars-Steenhoff likes this.
  41. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,458
    I would love that too!
     
  42. jemchicomac

    jemchicomac

    Joined:
    Jan 2, 2018
    Posts:
    10
    Thanks, man!

    I just added the Pixel Perfect 2D camera to all Rex Cameras and everything works great now (anytime using "right" screen dimensions) BTW Pixel Perfect camera is something I was willing to add to Rex hence I'm back on track again.
     
  43. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    I think that would be really cool, but I don't have any plans to include it at the moment, since I think it's still fairly niche. If you end up implementing it, I'd love to see it, though!
     
  44. FDGSundae

    FDGSundae

    Joined:
    Aug 28, 2019
    Posts:
    7
    EDIT: Problem solved. Something imported incorrectly.
     
    Last edited: Oct 14, 2019
  45. FDGSundae

    FDGSundae

    Joined:
    Aug 28, 2019
    Posts:
    7
    Okay - ignore previous post after all. Looks like there was an import error and something went weird. Deleting the entire project and re-importing it brought everything back to normal.

    Sorry!
     
  46. PhantomFox128

    PhantomFox128

    Joined:
    May 22, 2019
    Posts:
    157
    How would I go about changing the lifebar to a set of Zelda style hearts? And is there a way to display a couple of icons for lives instead of a number? For example, instead of an icon with the number "3" next to it, there would be three icons. Is that doable?

    Also, I duplicated the water script and replaced the BoxCollider2D with a PolygonCollider2D as I have a couple different shapes for the water that aren't perfect squares, like an "L" shape, for example, where the water entrance is at the top and exits in a subterranean cavern. I found that's working pretty good, but the splash effect doesn't play at the exit on the bottom, it still plays at the top where the entrance is, as if the whole thing is still a box. Is there a way to fix that?

    EDIT: Forgot to ask, how can I tell what version of Rex I have installed? And if it's not the most current, how do I update it without losing anything?
     
    Last edited: Oct 14, 2019
  47. FDGSundae

    FDGSundae

    Joined:
    Aug 28, 2019
    Posts:
    7
    Sorry, I'm back again after all with 30-degree slopes that Rex can't walk up. =(


    What happens: Rex can walk down slopes or on flat ground with no problems. On attempting to go up a slope, he collides like he's getting caught on the first line of elevated pixels.

    Terrain Type: Unity 2D Tilemap with a Tilemap Collider 2D and a Composite Collider 2D. Slopes have custom physics shapes to create a smooth slope w/o pixel-steps.

    Image 1: Tilemap Composite Collider.


    Image 2: Custom Physics Shape in Sprite Editor (half the sprite; sliced into two 32x32 tiles)



    Image 3: Default slope settings for default player in Rex Engine



    Image 4: This is the default Box2D collider shape for him. I'm not sure why it looks like that; never seen a collider with a second box out in front , but every Template "new player" I've done comes out with the same weird-looking collider. If nothing else out of this post, could someone explain what the second square in front of him is?



    Any idea what I'm doing wrong that this poor guy can't climb his slopes? :(

    Thanks!
     
  48. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    how can I disable pickup of any powerup when energy is full?
     
  49. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    Heya,

    Responded to your PM with some info for the slopes stuff. Hopefully we can get it sorted out!

    Regarding the collider in front of your character: that's for his slash attack (which is a child of the main player GameObject), not the character himself.
     
  50. BeeZee

    BeeZee

    Joined:
    Sep 25, 2012
    Posts:
    657
    There's unfortunately no system at the moment for using different hearts/icons for your energy bar, although it's an idea I really like that I'm keeping in mind for the future. You can, however, easily access the information on how much health a character has, so if you're interested in using a different plugin or coding your own system to display hearts, you should be able to integrate it with Rex pretty easily.

    For the water, check out Water.cs. You want line 78:

    Code (CSharp):
    1.                         GenerateExitSplash(new Vector2(col.gameObject.transform.position.x, waveTop), col.gameObject.transform);
    2.  
    If you change it to this, it should play the splash anywhere:

    Code (CSharp):
    1.                         GenerateExitSplash(new Vector2(col.gameObject.transform.position.x, col.gameObject.transform.position.y), col.gameObject.transform);
    2.  
     
    PhantomFox128 and Lars-Steenhoff like this.