Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 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 ERROR134 · Nov 06, 2014 at 07:31 PM · meshtilemaptileheightmapterain

3D Tilemap

I am quite new to Unity, but I know (game-) programming for a few years now. Until now I only made 2D games with SFML. As a start I did a Tutorial from Unity3d.com and now I want to port one of my 2D games to 3D in Unity.

The game is a Tower Defense Game which is based on a tilemap. So I want to create a tilemap on wich the camera is pointed in an about 50-70 degree angle. The map has to have different heights, which means the path where creeps walk is lower than the area where you can build the towers. My main problem is how I can create this tilemap. I googled quite a bit for the right solution, but most of the hits where a tilemap in 2D. The other ones where a bit confusing, because they mentioned a bunch of different solutions. Some said I should use meshes, others told me to use a heightmap or other ways.

So was is the best approach?

To make it clear, the path should be something a canal for ships, but just for creeps. And really important is, that I can lower or raise different tiles while playing. Just imagine a flat area in minecraft and for the path, imagine the player can "dig" the path into the flat area. I hope you can understand what I want to create :)

I really appreciate any help :)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Nov 06, 2014 at 08:37 PM

If your gameworld is rather small, you can get by with instantiating nad destroying prefabs to create your terrain. For more complex stuff, you will have to look into mesh generation by script. Also search for procedural generation (think Minecraft).

Comment
Add comment · Show 2 · Share
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 ERROR134 · Nov 10, 2014 at 11:29 PM 0
Share

Thanks for the help. I am looking into mesh generation right now. But what should I do if I don't want my world to be angularly, but smoot and with "round edges"?

avatar image Cherno · Nov 11, 2014 at 12:47 AM 0
Share

This is probably the definitive thread on all things Unity-$$anonymous$$inecraft-Clone-related. Try to look over it if you are serious, it has lots of bits of information scattered throughout.

As for your question: How your mesh looks is entirely up to you; $$anonymous$$ost simple generators go for the cubic look, but you can just as well create not faces with 4 vertices, but anything you want. You can even take the mesh data of an existing model and use it for our generated mesh. This will come in handy if you want more complex stuff like stairs or slopes where you would have trouble creating each vertex by script. Look into the thread linked above, one of the more recent posts by me deals with it.

Also look arond for other procedural (voxel) terrain engines, you will see that there are some that look very life-like with smooth ground etc. but with a voxel structure underneath.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

What technique for tile-based 2D game 0 Answers

Import a 513x513 Texture2D (heightmap) 0 Answers

Getting multiple heights at same (x,y) coordinate 1 Answer

Lightmapping and Diablo3-style big-tile levels 1 Answer

Tilemap2017 Access position & sprite of specific Tile in new Grid System 2dGame 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