|
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 :)
(comments are locked)
|
|
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: EditorWe'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. LayeringThe 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. AnimationsWe 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: 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. OptimizationsWe 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: Time and effortI'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.
(comments are locked)
|
|
ok i've kinda figured it out i guess, just adjust the box colider? but how do i make the secondary backgrounds ( like trees and mountains) not show its ¨end¨?
(comments are locked)
|
|
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.
(comments are locked)
|
|
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?
(comments are locked)
|
|
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.
(comments are locked)
|

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).
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.
====( http://www.clothes6.us )=====
online store wholesale sneakers,Jerseys, jewelry, glasses, shirt, sports,handbags,clothes ,news, vogue,jeryse at ugg boots,luxury fashion ysl women boots, christian louboutin boots,ed hardy clothes, jordan shoes,nike shoes,hoodies,t-shirts,nfl jerseys,mlb jerseys,nhl jerseys,coach handbags,handbags,wholesale, retail, sunglasses,belts, caps, ed hardy caps,suit,fashion good,newest style goods All the products are free shipping,
====( http://www.clothes6.us )=====
free shipping
competitive price
any size available
accept the paypal
jordan shoes $32
nike shox $32
MBT shoes 48
NFL jersys 24
NBA jersys 24
Timberland boots 45
Christan Audigier bikini $20
Ed Hardy Bikini $23
Smful short_t-shirt_woman $14
ed hardy short_tank_woman $15
Sandal $26
christian louboutin $60
Sunglass $14
COACH_Necklace $18
handbag $33
AF tank woman $16
====( http://www.clothes6.us )=====