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
0
Question by juicyz · Aug 24, 2016 at 09:13 AM · 2d game2d platformervoxels

2D 'Voxel' Game

This might have been asked before but I couldn't find a post with the exact answer I wanted. I'm currently trying to make a game based on Terraria. I have all the rpg systems coded pretty much but just haven't finished the world as I keep changing what type of game it will be and can't make up my mind. (I would probably do 3D but I can't art soo.... 2D it is)

I've been following this tutorial about world generation: http://studentgamedev.blogspot.no/2013/08/unity-voxel-tutorial-part-1-generating.html

In the tutorial, it starts with a 2D world but with 3D meshes and colliders then transforms into a 3D game. Would the best option to be to continue with using the 3d meshes and colliders or switch everything to 2D. What would be the benefits of using 3D vs 2D? The game will fully be in 2D and no 3D elements will be needed, but for coding purposes which makes the most sense and the easiest?

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
1
Best Answer

Answer by tanoshimi · Aug 24, 2016 at 09:43 AM

If your game is fully in 2D, you gain no benefit from using 3D physics, and you incur extra complexity from doing so. The tutorial you are following is old, and probably dates from a time before Unity has the dedicated 2D workflow it has now. Use 2D physics and sprites all the way, and refer to one of Unity's own more up-to-date tutorials if you need to.

A "2d voxel" is a "pixel", btw.

Comment
Add comment · Show 1 · 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 juicyz · Aug 24, 2016 at 10:20 PM 0
Share

@tanoshimi

If i had a world like:

 1 = block, 0 = empty
 0 0 0 1 1 0 1
 1 1 1 1 1 1 1
 0 1 1 0 0 0 1
 1 1 1 1 1 1 1

I'll be using sprites for everything now. Now I'm deciding between EdgeColliders, BoxColliders, PolygonColliders. It seems the best would be an EdgeCollider because of performance and it fixes some ground problems but I don't think I can solely use it because of inner empty spaces or I could use a combo of Edge and Box/Poly maybe... or just go with Polygon. This would require an algorithm to find all the edges and make a big collider around the frame and have other 'paths' (like a polygon collider) $$anonymous$$gled in the collider to account for empty space.

I think the best solution is to have one collider for all the chunks that are visible to the player. I believe the best way is to do something like Greedy $$anonymous$$esh algorithm for 2D ... or just do a greedy search over the blocks and make paths by hand for the PolygonCollider. Is there any better good options?

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

How to write a change Scene 2d for multiple scene 2 Answers

In my 2D platformer game, how would I create a height marker?, 1 Answer

,Unity Spieler Gravity funktioniert nicht? 1 Answer

Changing layers on runtime does not work 1 Answer

When my 2d character is moving to the right it can jump to or fall from a platform but when it moves to the left it can't jump or fall from a platform. Here's the code I'm using. 0 Answers


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