Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 SoundDestroyer · Oct 11, 2014 at 12:05 AM · 2d-platformersprites

Should I create an image for each element in a 2D game?

I'm making my first game and I was wondering if I have to create an specific image for each platform on the game or have one base "texture" and place it multiple times. For example in Mario, each platform repeats the same brick or rock sprite. So either every platform had it's own image or the same image is called multiple times.

If I place the same sprite multiple times in Unity, I create a gameobject with just a sprite Renderer and transform, but having multiple gameobjects affects performance, right?. What should I do?

(Also, if I wrote something wrong please correct my English. It isn't my native language) alt text

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Oct 11, 2014 at 12:09 AM

You can use prefabs, but that's very inefficient for anything more than very small levels. You should create or buy a tilemap system.

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

Answer by MrSoad · Oct 11, 2014 at 04:02 AM

Hi, first off good luck with your first game. It won't be easy but don't give up. It has taken me three projects to finally get one finished but it is worth the effort when you do. I would add a unity cube object to your scene. Stretch it to your desired dimensions, one very big one for the floor and several smaller ones for the platforms. Then apply you texture to the cubes(play with the tiling options in the Inspector window until it looks right, you will need more than one Material if you want different tiling on the different cubes. Look up "Materials" if you do not know what I mean). Do not worry about performance at this stage in your learning process. Have fun getting the basics working first, optimization is a whole lot harder with a ton of stuff to learn about, so forget about it until you are more experienced. Next look up info about creating 2D games in Unity. There is a load of stuff on the forums and in the Unity docs about this(Google always brings up good links to the desired sections of these if you start your search with "Unity " followed by what you want to know). You will find it much easier to work with 3D blocks(with your textures applied to them) rather than getting into sprites at this stage of your learning. Set your camera to "Orthographic" if you want a truly 2D Mario look to your game. Look up "constraints" for keeping things moving in two dimensions(x and y) and not allowing z movement. Unity has recently added a lot of 2D stuff, inc 2D physics etc(I've not yet looked at these as everything I've made has been in 3D so far, you should have a good read up on these though) Read through the Unity docs, forums and the Q and A sections until things start to sink in, they are all immensely useful and you will find almost every aspect you could ever need to know about covered somewhere within them.

Good luck and have fun!!!

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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

2D Physics game using sprites 0 Answers

Sprites vs 3D in 2D platformer game 0 Answers

Ideal resolutions for 2D platformer Art Assets (to make multi-res support easier)? 2 Answers

2D Game - GUIText doesn't shake with the camera 0 Answers

2d Platformer sprites background 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