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 Nanjue · Mar 29, 2018 at 05:38 PM · 2d-platformercollider2dlevels

Large 2D polygon mesh levels

Hello guys. I'm making a platformer game inspired by "Ori and The Blind Forest". The only thing that confuses me is how do I make really large freeform levels. Obviously using a really large image for level and collider would be too heavy for memory so it would be nice if someone knows a way to do such thing and how to implement it. Thanks in advance.

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

Answer by Rygaran · Mar 29, 2018 at 05:59 PM

well, it wildly depends on what you want to do exactly, but you can use smaller sprites for things suck as rocks, ground, and other decorations and build the lvl like that, you can use tilemaps as well, you can even use 3d models if you want and still use 2d physics, as for implementing them, you should look up tutorials on these things and from there you can figure out what's best for you.

Comment
Add comment · Show 3 · 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 Nanjue · Mar 29, 2018 at 09:07 PM 0
Share

The main problem here is optimizing such large levels. I couldn't find any examples on dividing huge 2d levels to chunks or anything like that so that's why I'm asking here. I'm not going to use tiles so tilemaps are not an option I think.

avatar image Rygaran Nanjue · Mar 30, 2018 at 08:52 PM 1
Share

well, if you want to divide by chunks, you can do that by storing the all the gameobjects that are in an area to a list on a 2d array. For example: you get all objects and all that are between 0,0 and 10,10 are added to the list in [0,0], all thar are in 0,10 and and 10,20, go in [0,1] and so on. you'll then need to spawn the currently visible chunks on runtime, For this you should use a pool, so you're not instantiating and destroy objects. For getting the lvl data, you can use editor scripts to inspect the scene and create a file with basic information of the asset, like id of the sprite, size, and position within the chunk

avatar image Nanjue Rygaran · Mar 31, 2018 at 04:52 AM 0
Share

Oh, that clarified some things for me. Right now I'm just storing all the objects in the array and activate/deactivate them if they're in range with a player. Using pools is an excellent idea. Now I sure know what to do. Thank you!

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

82 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

Related Questions

OnCollisionEnter2D Not working! 2 Answers

How to detect CompositeCollider2D shape center? 0 Answers

how can i change tile map collider2D's outline collider to shape? 0 Answers

Player movement 1 Answer

I am trying to create all elements in the scene from one script at run time. How do I detect collisions between the enemy and the coin without having to create another script for each item? 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