Search Unity

[RELEASED] RPG Map Editor

Discussion in 'Assets and Asset Store' started by CreativeSpore, Nov 6, 2014.

  1. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I have tested the sample scenes with unity 5.5.2f1 and it looks like it happens when you don't save the scene.
    Maybe you forgot to save the scene? For some reason in this version the popup asking you to save the changes to the scene is not showing up.
     
  2. laiyh

    laiyh

    Joined:
    Jun 23, 2017
    Posts:
    1
    Can you support the RPG Maker MV Tileset ?MV Basically the same as VX , Only different resolution
     
  3. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I would like animated tiles support, perhaps using a shader.
     
  4. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    You can change the tile size, but the layout of the autotiles should be the same as VX tilesets.
     
  5. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    You can use the animated tiles using an autotile tileset, but I guess you mean custom animated tiles. For the moment, only the animated autotiles will be supported.
     
  6. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Yep any tiles animated like many 2D editors are able to do, i hope it will come.
     
    Shodan0101 likes this.
  7. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Anyone add networking yet?
     
  8. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Working on it in my project, but has little to do with the map since it's static. It's more about sending the updates for the players, NPCs, etc.
     
  9. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Two questions that are puzzling me:

    1. Why do the (sample) prefabs use Box Collider and Rigidbody components instead of the 2D versions?
    2. I've added in OnCollisionEnter/Exit methods to my player (starting with the prefab player in the sample) but the methods are never being called (trying to figure out melee combat)

    Thanks
     
  10. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,

    It was just a decision based on what was working better at that moment and 3D colliders where more stable and had better performance. Right now with Unity 5.6 it could have changed, but I still use 3D colliders in my 2D games with good results.

    Some scripts, like AIBehaviours are prepared to use both types of colliders.
    I am not sure why the OnCollisionEnter/Exit are not being called in your player. Maybe the collider is set to trigger?
     
  11. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    That's the first thing I checked but I don't have trigger set on the collider nor do I have Is Kinematic set on the rigidbody.

    Need to do more work on this to try to figure out what the issue is. My player is a prefab (pretty much a copy of the sample one) and I attach a script dynamically to it after I instantiate it in code (the behavior script is generic and attached to all entities at runtime hence why it's not put together at design time with the prefab). None of the OnXXX methods in my dynamic scripts are getting called (I just stubbed them out with calls to Debug.Log). Need to dig in more on this as I suspect it's something to do with dynamically attaching the behavior scripts or something, probably nothing in the framework code that's causing the issues.

    Thanks
     
  12. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    It looks like a typical mistake like misspelling the name of the methods or the parameters declared in the method.
    Remember if you are using a rigidBody2D the name of the method changes. If you paste that part of your code here maybe I can find what is wrong.
     
  13. AndreCabral

    AndreCabral

    Joined:
    Jan 11, 2016
    Posts:
    15
    Hi, I'm interested in buying this map editor or the other one you created, the Super Tilemap.
    I don't know which one I should buy, so I have some questions:

    - I already have a topdown 2d game that uses navmeshes and colliders3d. Can I use this or Super Tilemap using tiles that have colliders3d and navmeshes?

    - since I already have an AI and the navmesh pathfinding, can I delete some folders with these parts on rpg map editor so I don't import unecessary assets/scripts? If I delete only the AI folders, will the fog of war and the minimap still work?

    I want to make some future games both with topdown and platform, so both looks good for me, but the fog of war and the minimap are things I always wanted on some asset, but if they don't work with navmesh and 3dcolliders, I can't use them on the game I'm making...

    EDIT: another question: does the rpg map editor make only one game object for all the tiles like the super tilemap?

    Sorry for the big message hahahahah
    Thanks!
     
    Last edited: Jul 12, 2017
  14. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,

    Only Super Tilemap Editor supports collider generation, 2D and 3D, editing the collider in the tile properties.
    You can see in this video how it works:


    About removing the folders in RPG Map Editor related with AI, yes, you can do that.

    About the navmesh, it is not generating the navmesh geometry right now. I have plans to give support to this in the future, but right now I can not assure you how much it will take.

    RPG Map Editor and SuperTilemapEditor create a single gameObject per chunk of tiles. A chunk is about 60x60 tiles. This is because there is a limit in the number of vertices a mesh can have. Both tools are optimized to use mesh geometry only when needed to render the tiles.
     
  15. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Is there an easy (or easyish) way to have the world wrap around? I'm assuming the display would have to grab a screen full of tiles from the other side of the map and it would be purely on the rendering.

    I have a world that I would like to wrap around and make the map infinite (well, at least as far as the player sees it). Not sure if this is something easy to do or not as I'm not completely familiar with the rendering of the chunks.

    Also has anyone prevented the player from walking off the map? The only way I can see doing it is replacing the PhysicCharBehavior script with my own (or I guess adding my own component) to handle the edges (either that or putting a 1 block boundary of tiles around the edge which seems kind of yucky).

    Thanks!
     
    Last edited: Jul 16, 2017
  16. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    This is tricky to achieve and it depends on how you want to do it.

    For example, you could modify the tilemamChunk code to move the chunk according to the camera, so when the camara is in the right limit, the left most chunk is placed after the last chunks.
    Also, I think, but I didn't try, you can create another camera and split the screen in two, so one camera is rendering an edge and the other one the other edge. Only when the camera bound is over an edge.

    About the player or enemy or any other object in the map, it's also something to take into account. For example for the pathfinding you would need to adapt it to wrap the tile positions, and also other script could possible need a change.

    About the player, as you said, you would need to modify the PhysicCharBehaviour. This is the best way to achieve this. In the part where it checks is a position is blocked, check as well if the position is inside the map.
     
    Last edited: Jul 16, 2017
  17. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Thanks, yeah it sounds tricky. I'll just keep the players and NPCs within the bounds of the map for now (the camera takes care of that already). Just seems that I have to modify a lot of the classes you provided but it's better than starting from scratch.

    Also on my collider problem, found the issue. For some reason I had ticked the IsTrigger on the NPC prefabs (I was sure I didn't, but there it was). Once I removed that the collisions worked fine. Now onto melee combat!

    Thanks!
     
    CreativeSpore likes this.
  18. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Glad to know you found the issue with the colliders. Good luck with the melee combat!
     
  19. DrainedMan

    DrainedMan

    Joined:
    Jul 22, 2017
    Posts:
    7
    I know Unity isn't the easiest platform to make tools for but I am struggling to import my tiles. The documentation does not cover the problem and the tool wording/presentation isn't logical. I have a 768x768 sprite sheet with 48x48 size (16x16).

    For example I can't really change the slots sliders when i set texture size. I'll see what support says but I find this pretty confusing so far.
     
  20. DrainedMan

    DrainedMan

    Joined:
    Jul 22, 2017
    Posts:
    7
    Pretty sure Unity 2017 has screwed this asset up. I am seeing lots of glitches. What was the last stable version?
     
  21. DrainedMan

    DrainedMan

    Joined:
    Jul 22, 2017
    Posts:
    7
    I spent most of today uninstalling and installing Unity versions. I rolled back to an older version of Unity (5.3.2) and its working much better now. Unity really need to get their act together and do something about these problems, perhaps by stamping the asset with compatible versions. I doubt they will of course.

    Anyway on to other questions. Is it possible to setup attack animations the same way walk cycles are setup?
     
  22. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,

    Sorry for that, each version of Unity is a world but I fix the issues as soon as I hear about them. For that is always a good thing to say in what version you found the issue.
    In this case I found the problem is caused because in Unity 5.6.2f1 by default a texture with Advance settings has the property Non Power of 2 to nearest, and this was causing the atlas to have a different size.
    I have fixed that in this patch. If you still have issues let me know.
    About the glitches, I found the same issue when importing the 4.6 version into Unity 5, I don't know why. So I had to copy the files, not importing them to a project with Unity 5 to make it import the files and make it work.
    Unity have some problems serializing the assets between versions.
    The last version of the tool, released last Monday should fix some issues about glitches.

    I will submit the patch to the store ASAP.
     

    Attached Files:

  23. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, you need to create a new animation, like walking but attacking and just swap the animation when you are attacking.
     
  24. DrainedMan

    DrainedMan

    Joined:
    Jul 22, 2017
    Posts:
    7
    It seems there is another horrible bug with Unity here when splicing and saving animation :mad:. Is there a way to have different frames count per the animation e.g. 4x8 for walking and 3x2 for strike etc?

    It seems the first animation overwrites the slicing of the second animation.
     
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Are you using by any change the component Char Animation Controller? This is an old character animator intended to work with a character sheet were there is only a character and the sprite is in single mode, not multiple.
    I will move this in a legacy folder and place a new one for the last animator, the Directional Animation:
    In this video you can see how to create a character in the scene using the Directional Animation component and change the animation.


    About your other question, you cannot have different frames per animation. But you can create different sets of animations and change it in game.

    I have attached a new patch with more bugs fixed related to the old animation controller edit window and added a new option in the GameObject menu to create a Directional Animation Character instead of the previous one moved to legacy folder.
     

    Attached Files:

    Last edited: Jul 23, 2017
  26. DrainedMan

    DrainedMan

    Joined:
    Jul 22, 2017
    Posts:
    7
    I have upgraded to the latest Unity version and applied the patch.
    This seems to fix most of the issues.
    Would it be easy to amend the DirectionalAnimationController so that each animation has its own frame count?
    The problem I have is that my attack animation is 3 frames but my walk animation is 8 frames.
     
  27. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,
    I think I answer you by email, or a different person asking the same question.
    You can do that if you create different Animation Controller assets with different number of frames, and switch the Animation Controller in the Directional Animation component when you change the animation.
     
  28. JaseofBase

    JaseofBase

    Joined:
    Jun 12, 2017
    Posts:
    14
    Hey man, great tools. I've bought both this and Super Tilemap editor. I have a few questions, as I found the workflow BY FAR easier in SuperTileMap Editor.

    Is thier a way you can make the two work together? Each both has their pro's and cons but intergrating them to work with each other would be incredible.

    I'm really finding the workflow and limitations of this compared to supertilemap editor to be stifling. I would love to use features of both in one project (say random map generation using custom brushes and automatic collision creation, along with the pathfinding and behaviours)

    Is thier a way to work both?

    Cheers
     
  29. awnuxcvbn

    awnuxcvbn

    Joined:
    May 26, 2013
    Posts:
    5
    Assets/CreativeSpore/RpgMapEditor/Scripts/AutoTileMap/AutoTileMap.cs(1341,118): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.LINQ.ToArray<UnityEngine.Color>(this System.Collections.Generic.IEnumerable<UnityEngine.Color>)' and `System.Linq.Enumerable.ToArray<UnityEngine.Color>(this System.Collections.Generic.IEnumerable<UnityEngine.Color>)'

    Assets/CreativeSpore/RpgMapEditor/Scripts/AutoTileMap/UtilsAutoTileMap.cs(179,96): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.LINQ.ToArray<UnityEngine.Color32>(this System.Collections.Generic.IEnumerable<UnityEngine.Color32>)' and `System.Linq.Enumerable.ToArray<UnityEngine.Color32>(this System.Collections.Generic.IEnumerable<UnityEngine.Color32>)'

    upload_2017-7-29_20-6-41.png

    What should I do? V1.5.0
     
  30. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,
    Yes, you can adapt the RPG Map Editor framework to be used with STE.
    I could take some work, but some new subsystems like AI behaviours are prepared to work without the RPG Map Editor tilemap.
    You need to remove the PhysiccBehaviour, used to check collisions with the tilemap tiles, and add a rigidBody with Unity colliders to make it work without the tilemap.

    In case of the PathFindingBehaviour, it uses an A* library prepared to be adapted to each situation. In MapPathFinding.cs you can find the node definition MapTileNode that implements the INode interface. I should be easy to change the references to RPG Map Editor tilemap to use the STE tilemap or tilemap group.

    I have thought about integrating the framework in RPG Map Editor with STE, but it will take some time to be accomplished. If you want to integrate it with STE I will help you in the process. You can send me an email with the questions or errors appearing in the process.
     
  31. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    First of all, could you try to update the tool to the last version 1.5.4?

    What version of Unity are you using? Looking for some information about this error I found only this:
    https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/issues/36/error-in-unity-560f3

    Maybe you are using c# 6 and it already have a definition to ToArray in conflict with Linq.
    It should be using System.Linq.Enumerable, I don't know what library is System.Linq.LINQ and why is in the same scope. Maybe you have added a custom linq library to the project?

    By the way, you can fix the errors if you specify the library:
    example, change this:
    Color32[] atlasColors = Enumerable.Repeat<Color32>( new Color32(0, 0, 0, 0) , w*h).ToArray();
    for this:
    Color32[] atlasColors = System.Linq.Enumerable.Repeat<Color32>( new Color32(0, 0, 0, 0) , w*h).ToArray();
     
  32. JacooGamer

    JacooGamer

    Joined:
    Mar 28, 2014
    Posts:
    35
    I wanted to import some LPC tilesets from opengameart.org. The autotileset editor window has defined sizes for ground (512 x 384) but the LPC terrain tileset for example has a size of 1024 x 1024. If I try to use it as a ground texture, the editor window wont let me.

    Does anyone have any good tips for splitting existing tilesets into smaller ones that can then be used in the autotileset editor?
     
  33. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    This tool is free and could help you in the process.
    http://renderhjs.net/shoebox/
    Also, you can slice it with a paint program like Gimp:
     
  34. Yonipm

    Yonipm

    Joined:
    Sep 25, 2015
    Posts:
    4
    Hello, how can I select more than one tile in the Autotilemap Paint editor?

    Thank you.
     
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hold right mouse button then move the mouse to select more than one tile.
     
  36. jingray

    jingray

    Joined:
    Feb 6, 2015
    Posts:
    53
    Collision AABB Box very high. How to solved problems ?
    Near gate, between two plantpot in scene "demo3 - Player House".
     
  37. Yonipm

    Yonipm

    Joined:
    Sep 25, 2015
    Posts:
    4
    Don't work, I mean where the picture. In the scene it works.
     

    Attached Files:

  38. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    In the tile palette you won't see the selection rectangle but in the scene the painting brush will change to paint the selected tiles.
    rightSelection.gif
     
  39. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Do you mean why the player can move closer to the plant base?
    upload_2017-8-25_11-31-57.png
    It is because the player should be over the base tile or it will be in the middle of two tiles:
    upload_2017-8-25_11-32-30.png

    You can change the foot collider pressing the edit button in the Physic Char Behaviour component. Then dragging the cyan hangles.
    upload_2017-8-25_11-33-40.png
     
    jingray likes this.
  40. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    What's the recommended way to do giant levels? I made a map 4000x4000 and it was fine performance wise running it, but loading/starting/stopping was horrible.One of the features is that the system is optimized for big maps and low draw calls, but is making giant maps the way to go or do you dynamically load smaller ones (say 200x200) and stitch them together at runtime? Also it is better (performance wise) to have maps in powers of two (512x512 vs 500x500)?
     
    Shodan0101 likes this.
  41. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    When using big maps, one way to avoid loading times and memory is creating the map around the player only.
    You can access the data for a map from the MapData.asset and draw in another map with a small size, like 200x200 or even less and redraw the map when the player, or the camera is moving to a different tile.
    It doesn't matter is it's power or two, but you can take into account the chunk size of 62x62 tiles to avoid creating more chunks. For example a tilemap of 124x124(NOTE: 62 * 2 = 124) will use 4 chunks (4 gameobjects with a MeshFilter and a MeshRenderer component) and a map with 125x125 tiles will use 9 chunks. So the best is using a multiple of 62 tiles.
     
    Shodan0101 likes this.
  42. Ericks89

    Ericks89

    Joined:
    Nov 3, 2012
    Posts:
    39
    I bought the asset "not really for the map editor part, but for the other rpg features"
    There's a lot of VX official assets used, nothing will happen Degica or Kadokawa Games isn't going to come after you but I would have just used open game art stuff.
     
  43. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Hi there,
    All the assets are open source.
    For example the tilesets can be taken here:
    https://vxresource.wordpress.com/2010/03/17/the-real-macks-tileset/

    All the graphic assets include a Readme_Credits.txt file in the folder with all the credits given to the creators of these graphics.

    If you see any asset that could be suspicious to be not open source let me know and I will check it.
     
  44. wesllendelfino

    wesllendelfino

    Joined:
    Sep 9, 2017
    Posts:
    4
    Hey, why you use component Mesh Renderer for tile map and not Sprite Renderer?
    Is possible set Sorting Layer to Mesh Renderer ?
     
  45. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Mesh Renderer is faster than Sprite Renderer because you can paint more tiles using a single gameObject. With Sprite Renderer you would need a gameObject per tile.
    You can change the sorting layer and the sorting order of any layer of the tilemap here:
    upload_2017-10-3_11-28-23.png
     
  46. wesllendelfino

    wesllendelfino

    Joined:
    Sep 9, 2017
    Posts:
    4
    Oh, Good Good!
    Err i have other question, is possible import file map from RPG Maker to Unity using RPG Map Editor?
    If is possible, i need create a tile with all tiles used inside my project|(map)? And vice-versa, is possible too? Export the Map file from Unity RPG Map Editor to RPG Maker?

    About colider, i use the navmesh 2d to make auto path where player can walk by detecting objects..i read at old comments RPG Map Editor still not suport with navmesh, what u can suggest to do in this case? Add game object in same tile locations that player cant go and use navmesh? or What?
     
    Last edited: Oct 5, 2017
  47. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    No, right now it is not possible to import a file map from RPG Maker to Unity nor vice-versa.
    About the navmesh, the tilemap doesn't generate colliders, but you could iterate the tilemap and create a block using a prefab with a box collider where a tile with colliders is found.
    You can remove these blocks once the navmesh has been generated.
     
  48. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    I just updated to the latest Unity (2017.2.0f3) and found a massive loss in FPS. Created a new project, imported the latest version of the package, and opened up the sample scene. I was getting 40fps max. Created a new scene and created a new map (using the existing tileset and tile data) and dragged the player and player camera prefabs in and can't get over 40fps now. Granted, this is in the editor but still this isn't normal for my setup and my machine. Did something drastically change with the update to Unity? Is anyone else seeing this?

     
  49. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I've been testing with Unity 2017.3.0b6. I didn't found anything looking into the profiler. But the FPS could change depending on the level of quality of the project. Try selecting different quality settings:
    upload_2017-11-19_17-47-55.png

    Also I found something funny with the FPS. If you select a ZombiePlant enemy the FPS were higher than selecting anything else. It happened with Ultra quality, but with Fast quality it was the opposite. So I wouldn't trust too much the Unity statistics.
    Other things that could be affecting the performance are:
    - Activating the Gizmos in the Game View or having the Scene View visible during gameplay.
    - Having the Show Map Editor On Play enabled (In the tilemap settings)

    I see you don't have gizmos enabled. I think in your case it could be the quality settings what is making a difference in the FPS.

    Anyway let me know if you still have issues and I will try to find what is causing the performance drop.
    You can also use the profiler to check what is consuming the CPU.
    upload_2017-11-19_18-1-42.png
     
  50. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    The autotile stuff doesn't seem to work quite right when you want to have two walls next to each other. I know some of it depends on your tileset but I have an VX Axe tileset (POP! Horror City) and can't get buildings to work correctly when there are two walls next to each other (with one wall one tile up from another).

    Here's the building in RPG Maker:



    And here's the same tileset in RPG Map Editor:



    Is this an issue in the autotile code or is there a special way I should be assembling the walls?

    Thanks