Search Unity

SpriteTile, a fast dynamic tile system (RELEASED)

Discussion in 'Assets and Asset Store' started by Eric5h5, Dec 11, 2013.

  1. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It seems like you would use both the simplified tileset and the "real" tileset combined together into one bigger tileset.

    The Acorn Antics demo uses GetMapSize * GetTileSize for clamping to the bounds in world space.

    --Eric
     
  2. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Hi @Eric5h5 ,

    On my iMac using magic mouse and magic trackpad, I can't seem to Alt-Click/Option-Click to change cell properties. Can you investigate the problem or at least tell me how to add quick fix or a keyboard short cut. I would like to continue with my project, but stuck at unable to edit Triggers.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm on a Mac, and have no problems; try using a different mouse. As I recall the magic mouse is weird about clicking; make sure it's a left-click.

    --Eric
     
  4. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    Tried with logitech mouse, the same.....

    I am on OS X 10.10.4 Unity 5.2.0b6 Latest SpriteTile, tried with Magic Mouse, Magic Trackpad, and Logitech Mouse. I can't Alt-Click on Level Editor, however, it works fine in Tile Editor. Alt-Click on Level Editor will draw a tile with a brink at the properties pad. But if I drag mouse across a few grid, I can edit properties, but there will be many unintentional tile draw on the map.

    Edit: Restart Unity somehow fix it. My apology.
     
    Last edited: Aug 13, 2015
  5. Prometheusheir

    Prometheusheir

    Joined:
    Aug 15, 2015
    Posts:
    20
    quick question: how do I safely upgrade the files in my project with 2.12? I have run into the CopyGroup issue but as you advised I fixed that via assigning one tile artificially with a collider. Everything else runs fine and I am a bit anxious because with other software my experience has been that upgrading sometimes breaks my projects, and I lose a whole week fixing it.

    And separately, I bought SpriteTile via your website rather than AssetStore, just wondering how it would work then. I noticed too late it was on AssetStore as well.

    Thanks,
    Volker
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It depends on what version of Unity you're using. If it's pre-5.1, just import the SpriteTileDLL package; nothing will break.

    However Unity 5.1 has the really unfortunate bug/"feature" of renaming new files and keeping the old ones, instead of just overwriting the old ones. In which case you'd have to delete the old versions, and rename the new versions back to the correct name. This will temporarily break the SpriteTile/Resources/TileManager file. To fix it, reconnect the TileManager as described on the bottom of page 2 in the docs. (NOTE! Do NOT use the TileEditor until after you reconnect the TileManager! Otherwise you'll lose your tilesets.)

    Another method is to import the 2.12 package into a new project, then copy the files in the Assets folder over to the original project, outside of Unity. Normally file management outside of Unity is discouraged, but since you're just replacing files, it won't hurt anything, and is less obnoxious than Unity 5.1's import behavior.

    I'd like to say "it goes without saying that you'd have a backup of your project in case something goes wrong", but unfortunately it apparently doesn't go without saying, so...do that.

    I'd also encourage everyone to file a bug about this package import behavior in Unity 5.1, since it makes no sense, causes upgrading assets to be far more difficult than it should be, and breaks stuff.

    --Eric
     
  7. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Hi Eric - I bought the plugin this morning and it looks promising.

    Issue: I'm having trouble generating box colliders for my tiles.

    I've successfully constructed a level and it renders on play (I'm using only one layer for testing). Within SpriteTile, in the Tiles pane, I've ticked Collider for the relevant sprites and I can see them highlighted in blue in the Level pane.

    In the Unity editor, however, nothing is generated under SpriteTileColliders when I press play. (Note that I can generate polygon colliders if I tick Physics collider in the SpriteTile tiles pane.)

    I tried deleting and reimporting SpriteTile based on a post from another user in this thread. Didn't help.

    Maybe I'm missing something. Any ideas?
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    If you use physics colliders, SpriteTile doesn't generate box colliders, only polygon colliders. The non-physics tile-by-tile collision works with the GetCollider function; see demos such as Procedural Level and Gem Hunt.

    --Eric
     
  9. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Ah. Helpful. I'll do some more reading and I think I can figure out an approach from here.

    Last question for now: I've got one long, contiguous platform of 1x1 tiles. The polygon colliders that generate for it are in small, 3x1 and 2x1 chunks in a repeating pattern.

    My first instinct is to replace these with one long, custom, Nx1 box collider for the platform. Is there a reason I should prefer the automated polygon colliders instead?
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The default size of collider blocks is 5x5; you can change that with Tile.SetColliderBlockSize. You can use custom box colliders if you want, but I would be inclined to doubt it's worth the effort (box colliders are just polygon colliders behind the scenes anyway).

    --Eric
     
  11. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Thought that might be the case. Thanks for the speedy replies!
     
  12. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    I think the generated polygon colliders are posing a problem in my case. I've got a box collider sliding along the platform that occasionally gets stuck on the seams between the poly colliders. I tried changing the ColliderBlockSize but that wasn't what I was looking for.

    Is it possible set the size of the poly colliders themselves? I'd like to use the automation but the chunks aren't large enough for anything but my smallest platforms. If not possible now, could this feature be implemented?

    Edit: I've read about setting custom colliders, which is the route I'll take if automation isn't possible.

    Screenshot:

    spritetile-colliders.png
     
    Last edited: Aug 18, 2015
  13. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I can't replicate that here; I made a long platform using the Dirt1 tile from the demos with physics colliders, and a box collider moves smoothly across without getting stuck. Perhaps the colliders for the tiles you're using are slightly too small/big so they don't match exactly? You can use a custom shape if needed. Alternatively, you could add a couple of small circle colliders to the bottom of your box collider, so that you don't have hard corners at the base.

    --Eric
     
  14. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    To confirm, your platform generates the smaller poly colliders with seams as shown in the screenshot above?

    Otherwise if my colliders are being generated oddly, maybe it has something to do with the way my atlas is sliced. I sliced my atlas with 1px of bleed around each sprite.

    Assuming that's not the culprit, the only other thing I can think of is that my player object is using the DontGoThroughThings script.
     
  15. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Screen Shot 2015-08-18 at 3.18.24 PM.png

    That only works for 3D physics, and isn't necessary for a player character anyway, so I'd suggest removing it.

    --Eric
     
  16. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Tested and confirmed that DontGoThroughThings is not the cause. Only works for 3D physics? I've replaced Rbody with Rbody2D in that script, if that's what you mean. And I almost certainly need it in my case, because the player object sometimes moves very fast and otherwise does gothroughthings. :)

    I've confirmed that the colliders get stuck when the player object is moving with inertia, maybe 1 in 25 times or so.

    Edit: Just noticed that another object with a constant velocity set in FixedUpdate is also getting stuck.
     
    Last edited: Aug 18, 2015
  17. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Quick update - custom physics colliders set in SpriteTile don't appear to work for me, since the collider is repeated for every tile. In other words, I can't attach a 500-unit-long collider because each tile will have one of those attached. (And this actually makes the problem worse as it results in more collider seams.)

    Also, the vertical seams pose a problem for me as well. For example, if my player jumps and hits a wall made of tiles, a seam exists between each tile and the player occasionally gets stuck on them.

    I've played with the Physics2D.minPenetrationForPenalty and .baumgarteScale values a bit, but it hasn't solved the problem, so I reverted back to the defaults.

    For now it's looking like I'll have to lay out the tiles in SpriteTile and apply colliders manually in the Unity editor.
     
  18. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The custom physics collider is meant to apply to each tile; it's a replacement for the auto-generated collider in case you want to use something different than what Unity creates. Anyway, I still can't replicate this, but try adding circle colliders as I mentioned earlier, so you don't have hard corners on the collider.

    --Eric
     
  19. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Yep - understood about custom physics collider.

    I'll consider the circle colliders, but as of now I'm set on the player having a box collider for gameplay purposes - I'd like the player to retain the ability to stand on the very edge of a platform without falling off. I'm concerned that a circle collider would change the feel here, and I've also read from others that an object might bump along any seams with circle colliders but haven't tested myself yet.

    Anyway, thanks for taking a look at this. Really is a nice plugin! Just one step away from being an EPIC plugin for my use! :)

    I'll keep working on this.

    Update: Colliders getting stuck on seams between other tiled colliders appears to be a known issue with Box2D physics. Switching my player gameobject from a Box collider to Edge collider seems to have solved the problem (knock on wood!) and I can now use the Physics colliders from SpriteTile. Sweet!

    More info here: http://forum.unity3d.com/threads/rigidbody-getting-stuck-on-tiled-wall.220861/#post-1528659
     
    Last edited: Aug 20, 2015
  20. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Thanks so much for your input. This is what I've got so far. the camera following doesn't work well. What how would I make the camera follow the player while keeping it in bounds?

    Code (csharp):
    1.  
    2. usingUnityEngine;
    3. usingSystem.Collections;
    4. usingSpriteTile;
    5.  
    6. publicclassCameraController2D : MonoBehaviour {
    7.  
    8.  
    9. publicGameObjecttarget;
    10. Vector3cameraPos;
    11. floatorthSize;
    12. floatborderX;
    13. floatborderY;
    14.  
    15. voidStart ()
    16.  {
    17.  
    18.  }
    19.  
    20. //Updateiscalledonceperframe
    21. voidUpdate ()
    22.  {
    23. MapScroll ();
    24.  
    25.  }
    26.  
    27. //cameracontrols (callthisinUpdate)
    28. voidMapScroll () {
    29.  
    30. varmapSizeX = Tile.GetMapSize ().x;
    31. varmapSizeY = Tile.GetMapSize ().y;
    32. //updatecamerapositonandorthosize
    33. cameraPos = Camera.main.transform.position;
    34. orthSize = Camera.main.orthographicSize;
    35. borderX = orthSize * 1.05f;
    36. borderY = orthSize * 0.3f;
    37.  
    38. Debug.Log (mapSizeX);
    39. Debug.Log (mapSizeY);
    40. //mapmove (clickanddrag)
    41.  
    42. //getinput
    43. floatx = target.transform.position.x;
    44. floaty = target.transform.position.y;
    45.  
    46. //setxinputto0ifoutsideofxborders
    47. x = (cameraPos.x < borderX && x < 0) ? 0 : x; //ifitsontheleftandyou'retryingtomoveleft
    48. x = (cameraPos.x > mapSizeX - borderX && x > 0) ? 0 : x; //ifitsontherightandyou'retryingtomoveright
    49.  
    50. //setyinputto0ifoutsideyborders
    51. y = (cameraPos.y < borderY && y < 0) ? 0 : y; //ifit'sonthebottomandyou'retryingtomovedown
    52. y = (cameraPos.y > mapSizeY - borderY && y > 0) ? 0 : y; //ifitsonthetopandyou'retryingtomoveup
    53.  
    54. //movethecamera
    55. //Camera.main.transform.Translate(x,y,0);
    56.  
    57. transform.position = newVector3(x, y, transform.position.z);
    58.  
    59.  
    60.  }
    61. }
    62.  
     
  21. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    There's a bug when trying to load a modified sprite atlas as tiles. I have an existing tile map loaded. After editing this to add some more tiles, the sprite cannot be loaded into SpriteTile . It says "no sprite found for asset". I had this before and it started working another day. Now it's broked again. I'll try restarting/rebooting and report.

    No joy. Can't get some multisprite tiles to be added. SpriteTile doesn't recognise them as containing sprites.
     
    Last edited: Aug 27, 2015
  22. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I can't replicate that. I made a 1024x1024 atlas of 128x128 sprites and loaded that. Then I changed the size to 1024x1280 and added another 16 sprites. I reloaded the modified atlas in the TileEditor and it worked as expected, adding the new sprites.

    --Eric
     
  23. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    It would be best if you could provide the exact sequence of steps to reproduce the problem.
     
  24. SpiralCircus

    SpiralCircus

    Joined:
    Feb 1, 2014
    Posts:
    34
    Seems this bit is the problem - the floats "x", and "y" in my script are how much you want to move the camera by, not where you want to move the camera to. So in your case you'd want to move the camera by the distance between the camera center and the player. Off the top of my head it would be something like this (but I'm not testing this so you'll have to figure out the details yourself).

    Code (csharp):
    1.  
    2. // get distance / direction to target in 2d
    3. float x = target.transform.position.x - cameraPos.x;
    4. float y = target.transform.position.y - cameraPos.y;
    5.  
    6. // Do the thing where you set it to zero if it's over a border
    7. x = (cameraPos.x < borderX && x < 0) ? 0 : x;
    8. x = (cameraPos.x > mapSizeX - borderX && x > 0) ? 0 : x;
    9. y = (cameraPos.y < borderY && y < 0) ? 0 : y;
    10. y = (cameraPos.y > mapSizeY - borderY && y > 0) ? 0 : y;
    11.  
    12. // move the camera
    13. Camera.main.transform.translate (x,y,0);
    14.  
     
    Chibwemwn likes this.
  25. Chibwemwn

    Chibwemwn

    Joined:
    Feb 6, 2013
    Posts:
    129
    Thanks so much, it's a little clunky, but it's much much muuuuch better than my previous results! These are the lines I've changed. I'm also using Tile.GetTileSize () and that's what seemed to help a lot. Now I just want to make the borders more accurate.

    Code (csharp):
    1.  
    2. voidMapScroll ()
    3.  {
    4. varmapSizeX = Tile.GetMapSize ().x * Tile.GetTileSize ().x;
    5. varmapSizeY = Tile.GetMapSize ().y * Tile.GetTileSize ().y;
    6.  
    7. borderX = orthSize * 1.0f;
    8. borderY = orthSize * 1.0f;
    9.  
    10.  }
    11.  
     
    SpiralCircus likes this.
  26. SpiralCircus

    SpiralCircus

    Joined:
    Feb 1, 2014
    Posts:
    34
    @Chibwemwn no problem. You should probably replace the ternary operator (?) with if() {} since ternaries can't have an if without an else, meaning you end up making the assignment x = x; if the condition is false, when really you should just do nothing. It's not very expensive in this case, but it's obviously not as optimised as it could easily be.

    Edit: Eric's solution in one of the demo scenes is much cleaner :)
     
    Last edited: Aug 28, 2015
  27. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    On the other hand, a good compiler should just optimize that away.
     
    SpiralCircus likes this.
  28. SpiralCircus

    SpiralCircus

    Joined:
    Feb 1, 2014
    Posts:
    34
    Anyone know if it's possible to child all the sprite tile game objects to a single empty? I'd like to clean up my hierarchy a bit.

    EDIT: I mean programatically - my map is created at runtime.
     
  29. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    They're already parented to an empty.

    --Eric
     
  30. SpiralCircus

    SpiralCircus

    Joined:
    Feb 1, 2014
    Posts:
    34
    I mean like one empty for all the things Sprite Tile will create, I have separate SprtieTileLayer1, SpriteTileLayer2 etc. I'd like a SpriteTileGameObjects empty to hold all that in. Obviously it's not a huge importance, but I'd like to do it if there was an easy way.
     
  31. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You should be able to make another empty and use SetParent with the SpriteTile parent objects, though I haven't tried that so I don't know offhand if that would have any side effects.

    --Eric
     
    SpiralCircus likes this.
  32. Stygeon

    Stygeon

    Joined:
    Mar 21, 2015
    Posts:
    2
    Hi,
    First of all, I'd like to thank you for this excellent extension!
    I've got it during a sale some time ago, but until a few weeks ago,
    I could only play around with it a bit due to time constraints.
    However, especially these last days, I've been using it more extensively,
    and I have to say that it's really well done :)

    There is one request/question that I have:
    (What) Did you think about tile properties?
    AFAIK, Tiled has support for setting properties (strings as key-value pairs) for every tile (in the tilesets).
    Adding support for this would make automated processing of the maps much simpler IMHO.

    For instance, when I load a map, I also want to load the enemies that should be on there.
    While this could be done in the Unity editor via the preview-functionality, I feel that it would be
    advantageous to be able to do this directly in the Tile Editor. Use a special tile that has some property set and
    then when loading the level, remove all such tiles and load the appropriate prefeb at that position.
    This would also make pooling enemies pretty easy. (Btw, I'm currently working on a 2D Top-Down Action Adventure,
    so I guess pooling enemies would make sense to a certain extent). Of course, you could also
    enter the respective TileInfo in some kind of configuration file or so, but I like being able to do as much work
    as possible in one place.

    Another use case might be different types of colliders. I'm planning on having different types of "walls"
    (or rather blocking tiles, in general).
    For instance, depending on the state of the player, he might be able to go through some kind
    of special wall, but not through normal walls, I was planning on doing this by assigning these walls different
    layers (those used by the Physics2D system, not sorting layers), since I'm most likely going to use Physics in my game
    to move around characters, projectiles, etc. The player might be on different layers depending on his state,
    and the collision matrix would take care of the rest.
    Again, the special types of wall tiles could be replaced by prefabs
    with the appropriate colliders (and maybe scripts) when loading the map.
    (Just setting the layer could be problematic due to the batching of colliders, and I don't want to lose performance by setting the batching size to 1x1).

    One might be able to solve this by using fake triggers, but then, you can only use 255 of them (or one more,
    but íf I recall correctly, 0 is ignored) and more importantly, you have to keep track of which trigger ID
    is assigned to the different prefabs etc. This feels quite hacky and certainly adds a lot of mental overhead;
    custom string properties seem like a much clearer solution to me.

    Maybe I'm overlooking something, and there is a better solution to all of this.
    Anyway, what do you think? Is it possible to add such a feature or is there some kind of
    similar functionality that I'm missing? Or do you think it's not needed and there's a better workaround?
    I'm certainly not gonna complain if there is no such thing and you don't want to add it,
    as it might just not fit the project as is (I haven't had a closer look at the source code just yet),
    since as mentioned before, I'm really happy with this extension :)

    I'm sorry for the post being much longer than originally intended and hope that doesn't
    cause any inconvenience.

    Best regards
    Lightning92
     
    Nixaan and spryx like this.
  33. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Thanks for the feedback! There are plans for some improvements along those lines.

    --Eric
     
    Nixaan and Stygeon like this.
  34. SpiralCircus

    SpiralCircus

    Joined:
    Feb 1, 2014
    Posts:
    34
    Firstly, +1 for everything suggested by @Lightning92. The ability to hang some custom data onto the each tile based on the sprite that's chosen would be highly beneficial to me too, and would allow for some simpler solutions to several of the behaviors I'm putting into my game.

    Secondly, I'd love some advice on lighting with this extension:

    Taking for example, the procedural perlin demo, would there be a way to implement dynamic shadow casting based on tile type to achieve the kind of effect seen in the 2DDL extension (screenshot below)? I'm more than willing to invest in another 3rd party utility like 2DDL, but I don't want to take the plunge unless I know it can be integrated with SpriteTile.



    ^^ Imagine this but in the perlin noise level, with a light source on the ball and the collider tiles acting as shadow casters. Is this doable in any kind of remotely performant way based on the colliders generated by SpriteTile?

    EDIT: it occurs to me that this problem may be easier to solve with the custom properties @Lightning92 suggested.
     
  35. denjin

    denjin

    Joined:
    Feb 18, 2014
    Posts:
    2
    The SpriteTile editor window has stopped working and causing me to be unable to work on my project.

    I purchased and am very happy with SpriteTile so far and I've been working with maps that I've generated procedurally and I've been working on other areas of my project. I wanted to go back to my maps and add some new tile types so I opened the editor window and it won't work.

    I see some errors pop up in the console before the editor window obscures it but the close button is unresponsive and essentially locks up unity until I close it down again.

    What might be causing this and how do I fix it?

    -- The errors are ongoing while the window is open and are mostly NulReferenceException
    -- I have also tried removing and reimporting SpriteTile
    -- OK now I've updated and reimported and setting up the project again
    -- Still doesn't work, correction - it does work but throws errors upon import
     
    Last edited: Sep 3, 2015
  36. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    What are the errors?

    --Eric
     
    blizzy likes this.
  37. archwaykitten

    archwaykitten

    Joined:
    Jun 12, 2014
    Posts:
    14
    Another +1 for @Lightning92's suggestions. Nice to hear that something may be in the works. Any idea on when those changes might come along?

    I'm currently trying to work around that lack of functionality with triggers, but it's not fun. You can use multiple layers worth of triggers to store multiple pieces of information with each tile (or if you need more than 255 different values), but it gets confusing and feels like a hack. I'm considering building some sort of look-up table based on tile names, but that sounds like a big project.

    It would be great to be able to give each tile multiple properties. If this is likely to be added to Spritetile any time soon (in the next few months), I can work on other parts of my game first while I wait.
     
    spryx likes this.
  38. spryx

    spryx

    Joined:
    Jul 23, 2013
    Posts:
    557
    +1, I love SpriteTile... but I need more than a byte value for storing information about a tile
     
  39. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Yes, it will done within the next few months.

    --Eric
     
    Stygeon likes this.
  40. Stygeon

    Stygeon

    Joined:
    Mar 21, 2015
    Posts:
    2
    Yeah, that should make the solution much easier. I'm guessing that once this functionality is there,
    there shouldn't be any issues whatsoever integrating this with 2DDL, since you can just replace the tiles that
    should block the light with whatever they use. Maybe integrating them also works nicely as of now, but since
    I don't have that extension, I can't say for sure. Note though, that using the same approach, you should also be able
    to get the desired results using Unity's lighting system.

    Such a solution should feel that way :p Custom properties would immensely decrease mental overhead.

    I have done something similar to mark my map transition points :)

    Now THAT is great to hear!
     
  41. Nixaan

    Nixaan

    Joined:
    May 30, 2013
    Posts:
    118
    Autotiler and working with prefabs/interactive objects are the only 2 things that I miss in SpriteTile. The problem is not that its impossible to work as it is, but how fast you can iterate. I "solved" the autotiler myself (i can't even imagine selecting each tile type manually now that i get used to autotiler). So in the end the only thing i miss is an easy way to work with (and especially an easy way to iterate) levels' prefabs.
     
  42. JayJennings

    JayJennings

    Joined:
    Jun 24, 2013
    Posts:
    184
    Does anybody have a C# version of the CharacterControl.js script? Thought I'd check before rewriting it myself...

    Jay
     
  43. BreadWeek

    BreadWeek

    Joined:
    Aug 12, 2014
    Posts:
    45
    I deleted my current sets, increased the number of tiles per set, and re-loaded my tilesets. I now get the warning:

    The max number of tile sets referenced in the file (8) does not match the max number of tile sets in this project (32). Tiles may not be correct.

    Now sometimes when I open the tile editor I'm told that the tiles from a set don't exist and those tiles in the map become null. Loading the map again seems to restore them, but it's still an odd problem. Is there some other file I need to edit after changing tiles per set?
     
    Last edited: Sep 10, 2015
  44. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    No, it's just that the data in files already saved becomes invalid if you switch the number of sets afterward; re-saving a file with the new number of sets would cause the data to be valid.

    --Eric
     
  45. BreadWeek

    BreadWeek

    Joined:
    Aug 12, 2014
    Posts:
    45
    Maybe I'm missing something, and it's not a serious problem at all, but the issue still occurs with old files that have been re-saved and brand new levels.
     
  46. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I can't reproduce that; if I re-save a level after changing the number of tiles per set, the warning goes away.

    --Eric
     
  47. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    137
    Just for curiosity shake, why the 32768 unique tile limitation? I know it's quite a stretch but one huge game with lots of tile variety could reach that limit...

    Or is it 32768 per scene?
     
    Last edited: Sep 23, 2015
  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    16 bits per tile. (Well, 15, plus one bit for special stuff.)

    --Eric
     
  49. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    137
    Is there a reason for that limit? (just curiosity)

    Also, will you support seeing the level in the scene editor in the future? So far I'm happy with Sprite Tile, congrats :)
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    So levels use memory efficiently. As you said, it's a big stretch to consider using more than 32K tiles, so it wouldn't make sense to waste memory on something that nobody is going to use. It's not really feasible to see the entire level in the scene view, since far too many objects would be required (depending on the size of the level of course).

    --Eric