Search Unity

[RELEASED] RPG Map Editor

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

  1. MachoBrizzin

    MachoBrizzin

    Joined:
    Jul 10, 2013
    Posts:
    27
    Hello CreativeSpore! Thanks for developing such an interesting and useful asset!

    You say this asset supports RPG Maker VX content only as of now, correct? My team and I have begun work on a project in RPG Maker XP a few months back and found this asset a few days ago. We'd do anything to bring this to Unity! But the problem is that this only supports VX tilesets and characters. Do you have any plans to add support for XP? This would open up a whole new community of developers (in my experience, more people use XP than VX) seeking to take advantage of Unity.

    Right now I have been reformatting our assets to work with VX. But this is a massive pain! XP allows any height for a tileset whereas VX sets strict rules about how tilesets are setup. So I'm having to go into my 256x6096 tilesets and cut out pieces of them into sections that will work with VX. Problem here is not only how much time this takes but also that, since the tilesets are so huge (256x6096), I would not be able to fit all of my content into a single VX tileset!

    Please consider adding support for XP content in this asset! It would be greatly appreciated not just by me, but tons more developers!
     
  2. CreativeSpore

    CreativeSpore

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

    Thanks for your post, it's great that you found this asset useful.

    I have checked the XP characters and it will be easy to support them as well. I will add support for them in the next version. I hope for next week.
    And for the tilesets, in the next version you will be able to create a big tileset. You can create a grid of slots, each slot have 1024x1024 pixels and it's created by 4 textures of 512x512, so if you split your texture in 6 textures of 512x512 it would work. But only for normal tiles. XP Autotiles won't be supported yet but if this is not a problem for you this could be a solution.
    Check this document for more information about how it works.
    Cheers :)
     
  3. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    The new version of RPG Maker v1.2.0 has been released at least!

    Any map created with previous version will loose the reference to the tileset, just restore it and it should work. Tilesets created with previous version should be compatible and automatically converted to the new format. If you have any problem send me an email to creativespore@gmail.com.

    These are the changes:
    - Multiple tilesets support and improved tileset editor
    - Improved performance when drawing big maps
    - Tileset collision data is now saved in the tileset instead of in the map data, so modifying it in the tileset will affect the map collisions
    - Fixed minimap size for big maps
    - Other minor bug fixes and improvements

    And soon there will be another version available with variable tile size and more improvements!
     
  4. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Cool asset. What features are supported during runtime?

    Cheers.
     
  5. CreativeSpore

    CreativeSpore

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

    During runtime you can draw over the map using the tileset editor ( you can see it in the web demo here ).
    And any change you do will be saved if you mark the saving during runtime option.
    You can see the minimap pressing the Show Minimap option and navigate along the map by clicking and dragging inside the minimap.
    You can show the collisions for each tile pressing Show Collisions button and modify the collision type for tiles by holding shift and clicking over the tiles. You will see them explained in the manual here.
    And you can export the map to xml file or import from a file ( it's called save and load in the editor ). In the web demo you won't see a load/save dialog ( this is not supported by Unity for web player ) but your map will be saved in player data.

    Cheers.
     
  6. NevaCross

    NevaCross

    Joined:
    Sep 27, 2010
    Posts:
    8
    Love the update!! Working on a parallel project so won't have time to try the new additions for a few weeks, but looking forward to it!
     
    CreativeSpore likes this.
  7. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Are the tiles still locked at 32x32?

    My tiles are all 64x64, so that's a deal-breaker for me.

    I actually find the way RPGMaker sets up tilesheets to be very odd and clunky so I was disappointed to see that was the model you followed. I would have to reformat 1400 tiles to even start using your tool (for example).

    Just FYI many of the RPG Maker graphics available on the web are not for commercial use and if they are for commercial use they are often only licensed for commercial use IN a game made specifically with RPG Maker. Your users are going to have to read a lot of licenses before they import anything off the web and try to sell it.

    You would be so much better off making your own generic tile templates and using some tiles specifically made to be open source.

    You've got a really neat looking tool but right now it is too RPGMaker oriented for me to use on a project. I'm looking for a more generic RPG map editor asset that has a few extras. If you made the editor more generic and came out with add-ons sold separately (shop, dialogue, different combat styles, line of sight / fog of war / etc.) that could be a real powerhouse.

    No offense. Just my thoughts.
     
  8. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    I'm enjoying the asset so far.

    I would like to make one enhancement request though. It would be nice to be able to tag tiles with custom information. Ideally, we could set a default on the Map Editor tile and then change it per instance on the map.

    For example, say one of the tile images is a box and I wanted to tag them as having loot, but one box I placed I wanted to explode, so that one I'd want to be able to modify the custom information for it after it had been placed.

    Perhaps some API callbacks would be better so we could implement this kind of stuff ourselves dependent upon our needs (for example, OnEditorTileChanged(tileId), OnMapTilePlaced(tileId, x, y), etc).
     
  9. CreativeSpore

    CreativeSpore

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

    Thanks for your sharing your thoughts, I not offended for that, just the opposite. I have a clear idea about what community is looking for thanks to people who share their thoughts.
    And about your questions and concerns:
    - I have already finished a new update with variable tile size. There is only a texture max size limitation of 4096 but I will work in a better tileset editor to allow more textures, if need, in the future. The update have to be approved and it will be this week or maybe the next week.
    - About the RPG Maker tilesets included with the editor, they are only allowed to be used with the RPG Maker tool, also most of the tilesets DLCs you can buy are only allowed to be used with RPG Maker. You can buy some to be used with other tools but for an higher price, but not all of them. But you can also find some tilesets with this license http://creativecommons.org/licenses/by-sa/3.0/ so you can use them as long as you give credits to the creator. You can find some here for example. This is good if you only want to create a prototype of a game before find someone who make a nice tileset for your game. Of course this asset is not intended to sell graphical resources for your game and I just added the minimum assets to see it working: macks tileset, the player was made using tool game character hub, and vehicles were created by myself )
    - I started giving support to this kind of resources because there is a lot of free resources you can use, at least, to create prototypes. But as you can see from the first version of this asset, I am improving the asset to be more flexible and break any limitation. For example, I am currently investigating about removing overlay layer and create billboards from map elements, like trees, and allow user custom collisions. Also add custom data in tiles and allow prefabs attachments and saving extra data in the exported map. Always maintaining compatibility with previous versions of the asset.
    - About focusing this asset to map creation it's something I agree. This is the fist asset I created and I wasn't sure what community wanted so I did the path finding and vehicles according to some requests, but later I saw some people was not very happy about making this an rpg starter kit, so I will focus in map edition from now on, but I will give support and polish the current extra features: vehicles, path finding and creature animation.

    I hope this solve your questions :)

    Cheers
     
    SiliconAvatar and Luschie like this.
  10. CreativeSpore

    CreativeSpore

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

    Something I want to include in future versions is adding some extra data in tiles like a prefab to be created, for example. I want to create a new demo scene with some map transition, like a door, and a chest, and save map data in the exported xml. I will create some useful events as well. I haven't stated with this yet, so I can't tell you exactly how it will be.

    Cheers.
     
    Luschie likes this.
  11. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Thanks for the explanation and the nice demo. Is it possible to add 3D elements/objects to the map?
     
  12. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Custom data for tiles - exposed to the editor and easily extended - would be a nice addition.

    It's nice to be able to detect a terrain type underneath the player. Then you can easily code some action based on what terrain the player is on (or standing near).

    There are many ways to accomplish this but having the data exposed in the editor is convenient.

    I'm watching this asset with interest!
     
  13. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, you can add 3D objects. You can use the map editor for the ground and use 3D objects for trees, houses, etc. But be careful if you mix 3D objects with overlay layer.
     
  14. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I will work on this after next week. Check the forum or follow my twitter https://twitter.com/CreativeSpore to be informed of the latest news.
     
  15. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version 1.2.1 available with support for tiles of any size!

    Also:
    - Added PlayerTouch prefab for a player who follows touch or mouse pressed events
    - Fixed disable in game tile editor when minimizing it (it was hidden but enabled)
    - Fixed ghost tiles when copying an empty area of the map with previous deleted tiles
     
    SiliconAvatar likes this.
  16. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    I have a png that's 2048x1088. The tiles inside are 64x64 square.

    They're NPCs, so one NPC (with its animations) is 4 tiles.

    How would I get something like that into your map editor? Does it take care of the issue with seams showing? Similar assets make you split everything and add 4 or 5 pixels of bleed around each edge - otherwise there are graphical issues.

    I have one asset that seemed okay, but the screen tears when you move around.
     
  17. CreativeSpore

    CreativeSpore

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

    If the tiles are normal tiles ( not autotiles ), you have to split your texture in textures of 1024x1024, because normal tilesets contain 4 sub tilesets of 256 tiles and you would use a tile size of 64x64.
    So you would create a tileset, set the tile size to 64 and then generate the atlas.
    Then you can go to tileset edit screen and select Add Normal Tileset.
    This will lead you to an screen asking you for up to 4 textures of 1024x1024. It's up to you how to split your png but here you need to set the texture with the right size. Each of these 4 texture will be later a tileset with 256 tiles each and a letter as name. Maybe you can think it's a pain to split the texture, but this is good to have an way to decide what tiles you want to see in each tileset and set a maximun of 256 per tileset make it easy to organize the tiles in the editor.
    Maybe I will allow more flexibility here with time, but right now few people have complained about this.

    About the NPCs, I guess you are using the RPG Maker characters, with 4 frames per direction. It's not clear now I read it again if the png was filled with NPCs. Could you explain this? In case they are RPG Maker characters with 4 frames instead 3, I will add support for them in next update.

    About graphical issues, they is a pixel perfect camera included to avoid pixel imprecision when you are moving around.
    Check the Web Demo and you will see no artifacts, even zooming in/out with mouse wheel.
     
    Last edited: Apr 13, 2015
  18. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Thanks for answering my questions. There are tools to redo sprite sheets into whatever shape and size is necessary so that isn't a big deal like I thought.

    My NPCs have 4 frames of animation only. They do not have directions - they just loop between the four frames (like Ultima 5). I'm not making an RPG that a system like RPG Maker could handle. That's why I'm asking so many questions. I am making an old-school top-down RPG like that looks sort of like Dungeon Crawl: Stone Soup or Ultima 4 or 5. Everything is top-down, not JRPG style. It is an early western style of RPG.

    It's sort of like this:
    but with more colors and higher resolution.

    Here is another example of the look I'm going for:


    Hopefully those videos do not have a lot of cursing. I didn't actually watch them.. >__>;;;
     
  19. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Hi,

    This looks amazing. I like that you decided to focus on the map functionality first and foremost. I think it's better to get one feature very good, rather than having a lot of features with only decent quality. Especially as the map and tiling functionality is so universal to all top-down 2d games, while things like battle systems are very game specific.

    Would it be possible to create a huge or even infinite open world procedurally at runtime? I know I would have to write my own code for content generation, but would your library help with drawing the map at runtime? My plan is to not create any maps by hand but use code to generate areas as players get closer to them.
     
  20. Exodish

    Exodish

    Joined:
    Nov 17, 2013
    Posts:
    6
    Hey,

    ive updated to the latest version and now get this error:
    Assets/CreativeSpore/RpgMapEditor/Scripts/Extra/ComboBox.cs(55,14): error CS0101: The namespace `global::' already contains a definition for `ComboBox'
     
  21. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Find the other one "ComboBox.cs" and delete it. The good one is the one you see the error.
     
  22. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, you can create the map by yourself, calling SetAutoTile. It's optimized to create the map with tilechunk and tilechunk are created only when needed. You have to set the dimension of the map, but it can as bigger as you want in size fit in an integer.
    Only the sections of the map with tiles will create tilechunks and only when they become visible.
    You can see an example of procedural creation in the code to generate a map. If you find "Generate Map..." in the project, you will find it.
     
    Sir-Spunky likes this.
  23. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    For a 4 frame NPCs you don't need the animation script for RPG characters but creating one simple script with 4 frames and one animation. You can use the animation script included as template, just using one direction. If you need help with the code I can tell you how.
    RPG Maker is focused in a top-down perspective. Ultima V and Dungeon Crawl are only top view as I see in the videos. I mean the tiles, not the actors. Good thing of top down tiles is, you can use ground tiles for a top view game as well and get use of the autotiles, for example.
     
    Last edited: Apr 11, 2015
  24. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Is the export / import function meant to handle a workflow that involves Tiled or was it designed for something else?
     
  25. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    No, it's not for Tiled. It's exporting the map serialized in an xml format.
     
  26. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I have to make a correction on this. Tilechunks are created even if they are not visible, but only when there is a tile not empty on it. Tilechunks are 32x32 tiles, and if one tilechunk has no tiles on it, it won't be created.
     
    Last edited: Apr 12, 2015
  27. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Thanks for the details! Sounds like the engine will handle seamless huge worlds very good.

    I still haven't decided if I want to go down that path or use separate maps instead. For one, I'm not sure which is the most comfortable for players. I'm also worried that the procedural algorithms for generating the content for a seamless open world will become more difficult to code, because they need more optimization and fragmentation (to generate them over many frames to not cause lag, and only render one chunk at a time). But that's not the engine's fault.

    It would be pretty cool though :)
     
  28. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I have been doing some digging this weekend trying to improve the loading times of a map. I found, after some improvements I have done, loading a map takes as much time as the tiles placed on it. So you can have a huge map with only some areas filled with tiles and it could be loaded in less time than other smaller full of tiles. As an example, using the "Generate Map" option to generate a random map full of tiles in layer ground, and partial filled in ground overlay:
    - With a map of 400x400 tiles ( that's 160000 tiles for ground layer and few more for ground overlay ) it takes 1.7 seconds to be loaded.
    - 200x200 tiles takes only 0.38 seconds, almost a 25%.
    - 800x800 takes 10.9 seconds.

    This times are big because I need to create all tile chunks and update all tiles placed in the map when is loaded to be able to see all the map in the editor and make zoom in/out.
    But if you are going to create a procedural map, you can draw it only in the visible area of the player so you don't save the map, neither see it in the editor, but while playing you draw the map dynamically and only in the camera area and maybe an area around. Or you can create a huge procedural map, but leaving some areas empty, so the total tiles are less than 200x200 or any other amount for a reasonable loading time.

    Just a remember, these times have been improved today and will be available with the next update.
     
    SiliconAvatar likes this.
  29. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    That sounds great! Just bought it, will start playing around with it now :)
     
    CreativeSpore likes this.
  30. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Great! Let me know if you need anymore help with the tool :)
     
    Sir-Spunky likes this.
  31. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    I also bought a copy today. I'm looking forward to playing around with it.
     
  32. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Initial impressions:

    Couple warnings right off the bat:

    Assets/CreativeSpore/RpgMapEditor/Scripts/AutoTileMap/TileChunk.cs(85,38): warning CS0618: `UnityEngine.Renderer.castShadows' is obsolete: `Property castShadows has been deprecated. Use shadowCastingMode instead.'

    There are inconsistent line endings in the 'Assets/CreativeSpore/RpgMapEditor/Samples/Scripts/TouchFollowBehaviour.cs' script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

    Don't know if those are really relevant.

    Current documentation is light on detail and appears out of date. Directories indicated in some instructions do not exist. I found the items anyway, but it's going to throw people off. Full API documentation was expected but I only see commented source.

    Nothing the author can't fix with a night or two of word processing..

    Looks promising overall.
     
  33. CreativeSpore

    CreativeSpore

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

    Don't worry about the warnings, they are not a problem and will be fixed soon.

    I forgot to update the documentation about the new route to create an AutoTileMap:
    "GameObject/CreateOther/RpgMapEditor/AutoTileMap"
    now is "GameObject/RpgMapEditor/AutoTileMap"
    I will fix this for next update but everything else is updated.
    You can also check the Docs link in the asset description for a more updated manual, in case I forgot something in the previous version.
    I kept it simple because I wanted to create an asset easy to use and fast to learn.
    Most of the people asked me things like how to change a tile or how to know what tile is over a world position, so I create the file RpgMapHelper.cs with some useful methods.
    In case there is something missing or unclear I you can use the forum or send my an email to creativespore@gmail.com and I will be glad to help you.
    Anyway, I will try to find some time between improvements to create a full documentation.
    Meanwhile, tell me what you are trying to do with the asset and I will give you full information about anything you need.

    Cheers :)
     
    SiliconAvatar likes this.
  34. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    More comments:

    For those of us not using RPG Maker assets and who are not familiar with RPG Maker in general, you will probably have to explain how to get custom tile assets arranged in the right order. It is not all that obvious when you are a developer coming from more generic tools like Tiled (which I assume many will since Unity has a broad base).

    The only reason I sort of know what to do in that regard is because I used RPG Maker a long time ago.

    :) The map editor itself is great. :)

    It'd be nice if I could name the tile sheets instead of ABCDE, etc.

    Looking forward to some type of data integration.
     
    CreativeSpore and Luschie like this.
  35. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Thanks for your commentaries and impressions about the asset.
    I am glad you liked the editor. I am going to continue improving it and making it more generic while keeping compatibility with RPG Maker tilesets. I've seen some people who bought the asset don't want to user RPG Maker tilesets, and it's a shame to being able to use it with other kind of tilesets, so I removed the tile size limitation and number of tilesets, but I maintained the letter name and the organization of tilesets in groups of 8x32 tiles because it looks like a good way of organization of tiles. And using a letter allows to display them properly in the in game editor.

    Anyway, I will work on allowing the user to create it's own configuration. Right now I am improving the documentation, following your first commentaries :)
     
    SiliconAvatar likes this.
  36. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Cool. I'm very enthusiastic for this tool.

    I read through my old RPG Maker manual (which describes the tilesets and how autotiles worked) and that helped me get going.

    I'll be using my 64x64 tiles and will try my first auto-tile to see how it works later in the week. I'm using the provided graphics as a type of template so I think I know what I'm supposed to do to get everything in the right areas.
     
  37. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    I really like the engine! It's a great base to work from, and its performance is great. Although I don't use the map editor much, as I try to make a procedural game, the code is well-written so I can find my way around it, and the autotiling functionality will make it much easier to draw things through code as well.

    Right now I'm trying to adapt the perlin example to draw the map on demand, so I can experiment with really big open maps. It's coming along well, and your example is perfect as a starting point.

    My only problem is when I set an empty map to 20000x20000 or larger and apply the dimensions. It starts eating memory and then fails. The error message points to Texture2D at AutoTileMap.cs at row 374, where it allocates a Texture2D for the minimap. Would it be hard to disable minimap generation entirely if I don't use it, or is this used in many parts of the engine?
     
    CreativeSpore likes this.
  38. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    I guess I forgot to explain that in the manual: how the tiles are placed in the editor. But as you said it's the same like in RPG Maker.
    An autotileset, build with 5 different textures, are placed in the same order as you see in the tileset editor when building it.
    And normal tilesets (16x16 tiles) are shown in the editor as a 8x32 tileset ( if you split the tileset in two vertically, left side go first, and right side goes below )
    I will add this information in the manual.
     
  39. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    It's nice you found it useful and be confident with it so soon :)
    Anyway I am revising all the code and creating a full documentation to make it more easier to understand.

    About your problem. You can remove the minimap texture. It was intended to draw a minimap but, as it takes a resolution equal to map size, and your map is really big but it should be easy to remove.
    I have checked the code and I found an easy solution to fix this:
    - Comment the code inside RefreshMinimapTexture, but not the method, so the method does nothing
    - Find this line in AutoTileMap.Initialize:
    MinimapTexture = new Texture2D(MapTileWidth, MapTileHeight);
    and change the size to (1, 1)
    MinimapTexture = new Texture2D(1, 1);
    this is easier than commenting references to m_autoTileMap.MinimapTexture.width and m_autoTileMap.MinimapTexture.height.

    Anyway, for a map so big as that, and mostly if you want it to be infinite, maybe it's better if you create an smaller map and update it as long as player moves over the map. I mean, for example, if player moves right, after reach the distant of a tile, you can move it back a tile distance, and draw the map with an offset of (-1, 0).
    In this case, you need to manage the position of the player your self, as in 3D world it will be always in the same area.
    Or you can try to move the AutoTileMap instance instead, to be under the player, but I am not sure how that could affect the asset, as I didn't tried it before.
     
  40. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    I got the autotiles to work okay. I didn't realize they were split up like they were so I have to redo them but I did get them to work okay and now I understand how they work in practice.

    I'm actually doing ok so far.

    I don't really understand what the horizontal and vertical "slots" are when I go to look at the autotile in the inspector.

    Suggestion: Do more error trapping. As an example, if a person tries to create map data before some other steps then errors are thrown in the log, but a new user will not know what they did wrong. The edit tileset and create map data buttons are above one another so selecting one immediately after the other seems natural, though not correct. If that error had been trapped new users could have been directed to the correct area via a message. Some will read documentation and watch videos (like me) and figure it out, but some have to learn by actively doing whatever they are trying to learn and that type of learner may become stuck if the software does not guide them a little when they do something wrong.
     
  41. CreativeSpore

    CreativeSpore

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

    The slots order in the editor is from left to right, from bottom to top.
    About error trapping, I tried to fix them as soon as I see one. Most of them are trapped, but if I skip one and see it, it is fixed for next version.
     
  42. Exodish

    Exodish

    Joined:
    Nov 17, 2013
    Posts:
    6
    Which asset for textboxes and cutscenes works well with this map editor?

    Any suggestions?
     
  43. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    Whenever I try to add a "B" tileset I get this:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. CreativeSpore.RpgMapEditor.AutoTilesetEditorWindow._validateTilesetTextures (CreativeSpore.RpgMapEditor.AtlasSlot atlasSlot) (at Assets/CreativeSpore/RpgMapEditor/Scripts/Editor/AutoTilesetEditorWindow.cs:301)
    3. CreativeSpore.RpgMapEditor.AutoTilesetEditorWindow.OnGUI_ChangeTileset (Boolean isFirstUpdate) (at Assets/CreativeSpore/RpgMapEditor/Scripts/Editor/AutoTilesetEditorWindow.cs:345)
    4. CreativeSpore.RpgMapEditor.AutoTilesetEditorWindow.OnGUI () (at Assets/CreativeSpore/RpgMapEditor/Scripts/Editor/AutoTilesetEditorWindow.cs:58)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    6.  
    That is using a fresh project and using your example assets.

    EDIT: If I also specify a tileset CDE in addition to B then it works properly. I guess you can't just add a "B". You have to add all of them?

    EDIT 2: After adding in tilesets BCDE when I go to paint with anything on BCDE I get this error:

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. CreativeSpore.RpgMapEditor.AutoTileBrush+TileAction.Push (CreativeSpore.RpgMapEditor.AutoTileMap _autoTileMap, Int32 tile_x, Int32 tile_y, Int32 tile_type, Int32 tile_layer) (at Assets/CreativeSpore/RpgMapEditor/Scripts/AutoTileMap/AutoTileBrush.cs:45)
    3. CreativeSpore.RpgMapEditor.TilesetComponent.OnSceneGUI () (at Assets/CreativeSpore/RpgMapEditor/Scripts/Editor/TilesetComponent.cs:132)
    4. CreativeSpore.RpgMapEditor.AutoTileMapEditor.OnSceneGUI () (at Assets/CreativeSpore/RpgMapEditor/Scripts/Editor/AutoTileMapEditor.cs:83)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    6. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    8. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    9. UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1971)
    10. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1337)
    11. UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1175)
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    13.  
    I like this asset but I don't think I should be running into this kind of bug.

    Edit 3: If I go into play mode it works ok? Some array isn't allocated until you hit play maybe?

    I think some of my problem is I'm not using the expected work flow you had in mind so I am running into errors you didn't trap. The manual is a little "light" so I'm bumping into things I shouldn't be.

    I've gotten everything to work so far (finally) but there were some "learning moments" that could have been avoided if errors were trapped and manual was improved.

    I'm not leaving a review until you've had a chance to get everything polished up. I think you're on to something great here.
     
    Last edited: Apr 19, 2015
  44. CreativeSpore

    CreativeSpore

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

    Sorry for that.
    I have fixed the problem so you can use only one texture instead all of them.
    Overwrite this script -> AutoTilesetEditorWindow.cs
    The other problem you had was probably because of this bug, I could not reproduce it.
    If you find any other bug, let me know and I will fix it ASAP.
     
    SiliconAvatar likes this.
  45. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    New version 1.2.2 available!
    - With Improved map loading times
    - Fixed loading scene with a map from a scene with another map if saving changes on play was enabled

    and next version 1.2.3 in progress with these changes:
    - Added full html documentation
    - AutoTileset is now created directly in the selected directory
    - Fixed null exception when creating normal tileset with not all textures selected
    - IsoSpriteController now set the Z position between ground overlay layer and overlay
     
    Sir-Spunky and SiliconAvatar like this.
  46. SiliconAvatar

    SiliconAvatar

    Joined:
    Mar 23, 2014
    Posts:
    50
    That's great! I'll check this out tomorrow. :D
     
  47. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Thanks for the suggestions!

    I tried changing the MinimapTexture to 1x1, but I still seem to be getting a memory spike in the editor when changing the size to 20000x20000, which freezes my Unity. Maybe it allocates an array or something which causes the problem?

    I agree with you that another approach might be the best solution. Is there an easy way to offset the map like you say? If I just move it, won't I just reach the border and then not be able to draw more?

    Besides the size limit, I've actually got it to work pretty well drawing content on demand around the player camera using a custom chunk system. It's really quite cool. Now I just need to figure out how to generate interesting maps :)
     
  48. Sir-Spunky

    Sir-Spunky

    Joined:
    Apr 7, 2013
    Posts:
    132
    Great job. Thanks for updating and improving performance!

    Quick feedback:
    I also seem to be getting the same warning message as lostdragon: "Assets/CreativeSpore/RpgMapEditor/Scripts/AutoTileMap/TileChunk.cs(85,38): warning CS0618: `UnityEngine.Renderer.castShadows' is obsolete: `Property castShadows has been deprecated. Use shadowCastingMode instead.'"

    When looking around the scripts I noticed that Extra/FollowObjectBehaviour.cs does not cache the Camera component, but instead calls GetComponent<Camera>() on every Update(). It's a minor thing, but thought I would mention it anyway. :)
     
  49. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, it allocates an array with all tiles to work with them and save the data. I think the best approach is creating the map on fly, using a small map size to make it fast. Before you reach the border, you can move player back in the map and draw the map again using player as reference:
    So player is always inside the map, but you draw the tiles taking him as reference to draw the other tiles. You can save the current tile it is located.
    But your idea is even better, because you can move the player along the world space and also other objects without having to recalculate their positions. Good work :)
     
  50. CreativeSpore

    CreativeSpore

    Joined:
    Nov 6, 2014
    Posts:
    1,190
    Yes, I fixed the warning in v 1.2.3.
    You can change the warning line for this to fix the warning:
    Code (CSharp):
    1.  
    2. #if UNITY_5_0
    3.             meshRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
    4. #else
    5.             meshRenderer.castShadows = false;
    6. #endif
    7.  
    Thanks for the advice about the GetComponent<Camera>(), it was added for Unity5 for compatibility. It was a direct reference before ".camera". I will improve this by catching the reference.