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 Alaro · Sep 20, 2011 at 03:02 PM · 2d gameexplanationdevelop

Is it passible to make a ¨2D¨ sprite game with unity?

Hey, i'm currently trying to develop at 2D game made with only sprites, and i'm looking for a kinda oldstyle feeling to it, something like ¨owlboy¨ ( http://www.youtube.com/watch?v=kTfXfmtoEXU ) or like ¨Earthworm jim¨ (http://www.youtube.com/watch?v=5KA9S91A66k) Its not like plain 2D games like Megaman and Mario,but its more of a 2,5D feel to it And i were just wondering if it's even possible to make something like this with unity, and if so, what have these guys done to make it like that?

Would love to get a explanation about these kinda games :)

Comment
Add comment · Show 2
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 syclamoth · Sep 21, 2011 at 09:32 AM 0
Share

It's probably not a good place to say this, but you should probably be looking at an engine like Torque2d or the like which is actually made for making 2D games (not like Unity which is made for 3D and is not very good with hacking it into making 2D games).

avatar image SilverTabby · Sep 21, 2011 at 09:58 AM 0
Share

The only difference between a 3D game and a 2D game is the angle of the camera.

There are a few 2d pure-sprite based tutorials floating around the internet, but I can't seem to find the one I'm looking for right now.

6 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by save · Sep 21, 2011 at 10:35 AM

We're currently developing such a game and Unity 3d could equivalent be named Unity 2.5D.

To give you a good answer a little insight in the development process might be handy:

Editor

We've created a tile editor which handles level building using editor scripts. The actual tiles are made out of polygon planes with different collider meshes depending on their texture made into prefabs. They are put into a resources-folder. We can then paint using raycasting directly into the scene. In the tile editor we also have game mechanics so that a level designer never have to touch scripting or an inspector over the whole process. Certain game mechanics can be attached to an existing tile in the scene or stand alone as trigger areas.

We make use of Unity's own level system, this way we can save time and don't have to serialize things. A scene in Unity doesn't weigh much at all looking at file size. Loading and listing levels is all Unity's system where we've listed information in an array-class. This remains quick both in development and in-game.

Layering

The scene is separated into different layers, we have a foreground-, background-, decor-, prop-, ai- and walls-layer. For all the layers we've written special shaders that uses only what the layer needs, to keep them at a low cost. Each layer is separated to different z-depths. The camera still uses a perspective view to get that beautiful depth feeling of background moving slower than the foreground while moving. We then lerp the camera to the player position on the XY-axes and use Z-axis towards another variable.

Animations

We use separate texture atlases that loads into an invoked texture offset-function when needed. This way we can animate any non-static sprite at any given point at a low cost.

Basically: animationSystem.Animate(atlas, tiles, speed, repeat);

The Animate-function checks whether it's a different atlas than the current one and switches if is. These are already loaded into memory to keep things fast.

Optimizations

We use a sprite manager system that combines all static layers into single separate draw calls. Every layer has their own texture atlas that gets baked into the layer. At start we remove all static tiles and let the sprite manager take care of them instead. This keeps us in about 20 draw calls for the current frustrum scene whilst not having any serious impact on fps.

We use a game manager to keep track of the current level, score, music and other settings that functions as the overhead for the game. This manager follows the game from start to end.

Basically: DontDestroyOnLoad (this);

Time and effort

I'm the only programmer and we have one graphics artist and one sound engineer. We all have other jobs on the side but we're about ready to construct all levels for the game, create menus, scoreboards and finish up after one month of nightly development.

The sum is that, Unity has a great way of dealing with 2d-games as long as you think 2d the whole process. It's more of a camera- than platform-issue.

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 IgorAherne · Oct 23, 2016 at 05:42 PM

you can only make 7D games man, 2D is like another world

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 BiG · Sep 21, 2011 at 10:40 AM

Hi Alaro, to create a game like those, instantiate a "fixed" camera, that looks at main character's profile (and not viewing at main character's back, as in 3D games). Then, you make the camera "scrolling" just through one axis, as the axis on which the main character moves. As an example, if the player press "->", to move the character in right direction on the x axis, also the main camera has to move that way (this is a Mario-style approach; if you want to mantain fixed scenarios, you have to move the camera only when the character exits from screen...). Then you can create your "2.5 D" instantiating 2 different sets of textures/models: one on which the player interacts and another one a little far from it, in a way that you can just see it, and no interact with it. This "far" scene could be implemented just in textures (it will be a sort of "painting" - an image attached to a flattened cube, for example...); the nearest scene, on the other hand, will be a "complete" scene, with models and (elementary) physics on which you can move.

This is a general guideline, of course: hope to give you an idea to start with.

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 Alaro · Sep 21, 2011 at 02:46 PM

Thanks alot for the answers, I'll try to explain what my problems are alittle more clearly, I'm currently at the stage where i have fixed my camera, where i'm using perspective view and also attached a script for scrolling and focusing, I have also added a ¨background camera¨ for a fixed background image, so i kinda got the 2D game going on right now, I also have sprite manager 2. I'm also aware of how to use unity's level system. So my real problems are how to get the layers going, or more like how i can get my character to ¨move in the middle¨ of the grass-platform ( like you saw in Owlboy) I get that you need different layers of background and foreground, but what how i make a texture ( or platform) that goes above where i can move?

I guess that would be the The scene is separated into different layers, we have a foreground-, background-, decor-, prop-, ai- and walls-layer. For all the layers we've written special shaders.

So I guess my real question is how do i make these shaders?

Thanks alot though you've already helped me out alot.

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 Alaro · Sep 21, 2011 at 04:20 PM

Thanks alot for the awnsers, helped me understand it abit better, but let me try to explain abit better what my problems are, I am currently in the state where the basics of a 2D game is done, i have fixed the camera, with both scroll scripts and focus scripts, i've also added a background camera which fixes the background texture, and the scene parts of unity i know about ( i also have sprite manager 2 ) So what i'm looking for is the kinda of texture-platform balance, which you kinda explained for me Save.

The scene is separated into different layers, we have a foreground-, background-, decor-, prop-, ai- and walls-layer. For all the layers we've written special shaders

So i guess that's what i'm looking for, a special written shader for my backgrounds/ foregrounds? I basicly want the character to stand in the middle of a field of grass ( like you saw on owlboy) instead of getting that plain 2D feel, so all that is to it is special made texture and shaders?

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
  • 1
  • 2
  • ›

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Moving from "classic" game engines to Unity for 2D games. 0 Answers

Isometric diagonal movement (not 45 degrees) in a 2D game C# 0 Answers

Top down real-time strategy. 1 Answer

Limit number of spawning for certain prefabs 0 Answers

Trying to make a side scroller. I'm following a tutorial and getting this error. 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