Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by CheekySparrow78 · Dec 24, 2019 at 08:51 PM · 2dunity 2dtilemapcustomtile

2D tilemaps - separation of view and data, prototyping doubts

I'm prototyping a top down tile-based game in Unity, and, as many before me, have found Unity's tilemap system helpful, but lacking. First of all, manipulating tiles and checking the tile data (for pathfinding and LOS calculations, not to mention custom tiles) is easier when using a dictionary or array, so I found myself iterating over tilemap at startup in order to create a dictionary out of it. I understand this is a temporary solution though, so I'm thinking about making a custom tile brush that will populate a dictionary asset in real-time, just as I paint tiles on the tilemap. This feels wrong, however - it would mean I will effectively store the tilemap data twice - both in Unity's tilemap assets and in my own dictionary classes (serialized to JSON or whatever). The tilemaps would also be duplicated at runtime. Is this the wrong way to do it? I mean, it obviously is, but what other options are there, except rolling out my own custom-built tilemap system/renderer that would use my custom dictionaries to make a draw calls and paint the tilemap? Any insights would be greatly appreciated.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image corn · Dec 25, 2019 at 12:36 AM 1
Share

I'm in the same situation as you are, prototyping with the tilemap and still not entirely sure how viable this solution is going to be.

Have you checked the 2d-techdemos repo? There are some interesting examples there that might help you find out how you can embed logic into tiles, such as pathfinding or LOS. However it doesn't always feel super intuitive or convenient, so it might actually be way easier to just use whatever data collection that stores all your relevant info for your computations.

$$anonymous$$y current view on the subject is that, as it is, the tilemap system is useful for a single purpose: rendering stuff. As you pointed out, even the way it stores the data is kinda annoying... If you need need anything more complex than a few colliders (say, for player navigation or LOS), it feels like the tilemap isn't going to help you in any way.

That was my 2 cents on the subject, not sure that was actually very helpful. Also, I believe a forum post would better suit an open question like that. ;)

avatar image CheekySparrow78 · Dec 25, 2019 at 07:12 PM 0
Share

whoa, thanks for responding, some of what you've said are exactly my thoughts: current tilemap system is fit for rendering only, otherwise it gets complicated very quickly. Thanks for the advice and the links. Indeed, I'll recreate this question on forum and maybe we'll get something (maybe guys from Unity themselves will take notice).

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

243 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Changing Size of Tilemap 1 Answer

Extending TileMap to "paint gameobjects" 0 Answers

Streaming in 2D tiled maps for seamless world, does this conflict with Unity's editor? Do I need to use an external editor? 1 Answer

Color tile from tilemap 0 Answers

Tilemap: Resizing Tiles? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges