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 tomandresen · Jul 20, 2017 at 06:49 PM · 2dbackgroundscrolling

Large finite background for vertical scroller - best approach?

Hi, I'm working on a 2D vertically scrolling shoot 'em up in the style of old Amiga games like Battle Squadron and Banshee.

The game needs to have a scrolling background, but not the infinite, parallax-scrolling type common in tutorials.

I've already ruled out using a single, large .png, as the vertical dimensions are going to be beyond Unity's size limit, as I understand it.

I've considered multiple approaches:

1: A tile-mapped approach using 32x32 tiles - this would lead to quite a number of tiles pr. level, around 500 (25*20) for one screen height's worth. Is it possible to do this without too much of a performance overhead (i.e. by using object pooling for the tiles, adding tiles as needed rather than loading them all at once)?

2: A tile-mapped approach using 800x540 or 800x1080 "tiles". This would use more memory, but would reduce the number of tiles to something in the range of 25-30 pr. level.

Are either of those approaches workable? Or is there a better, third way to do it?

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 · Jul 20, 2017 at 07:13 PM

A "tile" is simply a UV-mapped quad; even the most humble of mobile devices can easily push around 10,000s of these. You don't need to use object pooling because each tile doesn't beed to be a separate object - they're just triangles in a mesh. Use a standard sized POT tilesize like 32x32, 64x64, or 256x256 and you'll gain benefits of efficient compression on your tile atlas.

I suggest you look up "Tiled" and "Tiled2Unity" - a free 2d tile map editor for Unity. http://www.mapeditor.org

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 tomandresen · Jul 20, 2017 at 07:27 PM 0
Share

Thanks, in that case I believe I'll go with 32x32 tiles, neatly mapped in square images with nice power-of-two dimensions.

I've already been looking into Tiled and Tiled2Unity, but wasn't sure how well that would cope with big levels. If that's not an issue, I'll be using those.

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

122 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

Related Questions

Scrolling background help - seams appearing... 1 Answer

How to follow a game object by camera but with a slower speed? 2 Answers

2D Infinite Vertical Background scrolling 0 Answers

Equally Distributing Light On a Quad Object 2D 2 Answers

Scrolling and Looping 2D Background Image 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