Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
0
Question by Opoczan · Sep 04, 2016 at 09:53 AM · 2dspritetilemaphex

Tilemap with irregular sprites?

I found many answers on this topic, but none of them solve my problem.

I want to make a 2D turn-based game. I went with pixel art for graphics. The map is supposed to be made of hex tiles. So, I made a sprite of a hex (with visible pixels, so it fits the art style). However, when I started looking for some improvements for the map system, I found out about TileMaps. My initial solution was to instantiate hex tiles and assign them coordinates using arrays, and then calculate their in-game positions based on their coordinates. But everyone recommends using Tilemaps instead of this, as it is presumably more efficient. Can tilemaps be use with irregular sprites? Or is there any other way that I don't know of?

Also, the sprites aren't supposed to rotate, move, or do anything besides being there, and maybe changing some variables or their color. The map is supposed to be random, but only when it comes to variables like type of terrain, or bonuses etc. And I think this can be done with my initial option - instantiating tons of objects and putting them in place. So what do I gain from doing this with TileMaps, besides better performance maybe? From what I've seen it only takes much more time to set up.

TL;DR: I have irregular sprites in my game. I want to make a 2D map with them. Can I use a TileMap for this, or do I need to write a script which will instantiate lots of sprites and put them in place? And if I can, what do I gain from using a TileMap?

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 Cherno · Sep 04, 2016 at 12:14 PM 1
Share

A Tile$$anonymous$$ap is the common way of doing things because just can't handle hundreds or thousands of GameObjects for each tile seperately.

It doesn't matter if the tile sprites are non-rectangular; what matters is that you uv-map your mesh correctly so the texture is applied without distortion.

avatar image Opoczan Cherno · Sep 25, 2016 at 10:12 PM 0
Share

Thanks for your answer, it helped me begin to understand how Tile$$anonymous$$aps work. Sorry for replying so late.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Pixels per unit with tile palette? 1 Answer

Does anyone know how to fix this tilemap render issue? 0 Answers

Unity2D Tilemap Add Sprites with Normal Maps to tilePallet 2 Answers

How can I interacte with Sprites from a Texture with Sprite Mode multi? 1 Answer

2d tool required for simple sprites? 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