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 Stay Away · Jan 30, 2011 at 12:30 AM · 2dspriteplatformerhow

2d games advice

I want to create a 2d game, using just sprites. Absolutely nothing 3d. Not even lighting.

I have seen a 2d platformer tutorial, but it uses 3d models. What I seek is for a tutorial about just using sprites, is there any out there?

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

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Goody! · Jan 30, 2011 at 04:02 AM

I know this answer kinda sucks but the best way I know to do a 2d game in unity is to buy and use sprite manager. I sucked it up, bought it and never looked back. I even went and bought ez GUI as well because they are the bomb. No, I get no monies from Brady or absoft. :)

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
1

Answer by zbegra · Jan 30, 2011 at 08:54 AM

If you want the cheap solution you can use this script: http://www.unifycommunity.com/wiki/index.php?title=Animating_Tiled_texture_-_Extended

The way I solved it was by having a different animation for each row, then passing the right coordinates through the function when the desired animation is needed. You will have to manually make the spritesheet in for example photoshop and make sure the different frames are distributed with exact precision. This method is by no means optimal but hey.

For example when my character jumps I do the following

if (charGender == false && jumpCheck.jump.jumping == true) { animationScript.SetSpriteAnimation(20,4,3,0,1,3);

}

You can use the script from the 2D Platformer tutorial, replace Lerpz with a plane. Make sure to put the script on the same gameobject as the plane so that it can access the material. You might have to fiddle around a little to avoid having the plane rotate. When changing directions you could flip the material instead of turning the plane.

As for the camera, you would have to change that to orthographic.

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 Eric5h5 · Jan 30, 2011 at 07:52 PM 0
Share

The camera doesn't have to be orthographic. Zombieville USA for example does not use an orthographic camera, in order to get "free" parallax scrolling.

avatar image
1

Answer by John J · Jan 30, 2011 at 06:23 PM

Sprite Manager 2 is good advice. For the price, it will save you TONS of time and makes the use of sprites fast and efficient - you should go watch the YouTube video on SpriteManager2 (the ones that's about 19 minutes long). It will show you exactly what you get and how it can help you.

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 bernardfrancois · Oct 20, 2011 at 08:20 AM

Sprite managers aren't always the best solution to achieve 'plain 2D' games.

Depending on the game, it can still be handy to use planes in a 3D scene, or you may be able to create your game more rapidly using the GUI class (sacrificing some performance, but depending on the amount of 2D images on screen, this may not be an issue).

For a better overview of the different methods of doing 2D in Unity, I'd like to refer you to the following article detailing on each of the different methods and their pros and cons: http://www.previewlabs.com/2d-game-development-in-unity3d-overview/

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

1 Person is following this question.

avatar image

Related Questions

How to kill enemies by jumping on their heads? 1 Answer

How to Change to the Same Point in Another Animation 0 Answers

2D platformer advice 4 Answers

sprite character rotation 0 Answers

Way to have 2D Sprites lit by Lights? 3 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