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 Deeeds · Jul 23, 2018 at 05:53 AM · 2dphysics2dground

2D Ground, really long, how?

What's the best way to make a really long ground in a 2D game? I mean, massively long, like 20, 40 or even 100 screen widths long.

Needs physics. Has a tiling texture.

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

Answer by Stratosome · Jul 23, 2018 at 07:10 AM

Well, there are a couple ways you could do it. Just make 1 platform and set its width to your large value to be as big as you want. Or you could place a bunch smaller ones yourself. Or even you could generate the platforms as you move along the path. I'd say if there are any "cutscene" like things, breaks in the gameplay, or something like that, I'd say break it up. If you do it with code, it could be an easily adjustable length to perhaps just keep adding platforms the further you go, so it would automatically stop whenever you decide to have the player finish the level or end the game or whatever.


I think figuring out the best approach to it would depend on the type of game that you are trying to make. If there are repeated areas on the level, I'd say break it up into chunks and spawn them in. If every part of it is unique, maybe just making a really long collider would be fine.

Comment
Add comment · Show 5 · 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 Deeeds · Jul 23, 2018 at 02:21 PM 0
Share

I kind of need a really long collider (and graphic) for some weird, pseudo 3D shots of the level, during fast parts in the action and rapid level previews right at the start of each level, that also peer down the length of the levels before straightening up and scrolling across.

Are there any negatives to having a huge object of enormous length? eg do iOS or Android phones go bezerk if something is super long?

avatar image Stratosome Deeeds · Jul 23, 2018 at 02:28 PM 1
Share

Ooo, that sounds cool. In that case, yeah, a long platform ins$$anonymous$$d of breaking it up into parts I think would be the way to go (they would just be really looong parts) (or I guess you could break it into parts and generate the whole thing right at the start? that would be a decent option if it isn't just one long straight platform). Um, sadly, I'm not really certain about any possible issues it would cause to do that? I guess I've just never done that and put it into some project before (especially not mobile stuff). But I'd be willing to bet that it would be totally fine. Having a single long collider would probably be more efficient than a bunch of smaller ones actually.

avatar image imaginaryhuman · Jul 23, 2018 at 07:01 PM 1
Share

I would probably break it up into smaller chunks so that the ones which are off-screen don't need to be considered for the physics collisions.

avatar image Stratosome imaginaryhuman · Jul 23, 2018 at 09:49 PM 0
Share

Oh, yeah, I suppose that's a good point too. Forgot about that hah.

avatar image bennett_apps Stratosome · Jul 23, 2018 at 11:51 PM 1
Share

plus you can then use occlusion culling and the device won't have to render all those pieces

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

183 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

Related Questions

Colliders 2d apparently touch each other even if they should not. 2 Answers

Question about Scripting a slingshot mechanic 0 Answers

Set targetjoint2d anchor position at mouse position in 2d 0 Answers

Velocity from external objects 0 Answers

Jitter/vibration on an object with constant velocity when using 2D Pixel Perfect Camera 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