I’ve been playing Castle Crashers on XBLA and it’s really an amazing game.
I’ve tried doing something similar in Unity but I’m facing some hurdles… doing stuff in 2D is easy in Unity, but in Castle Crashers there’s a definite 3D feeling to the 2D art. I mean, the art is 2D, but some objects have openings in them where you can go through, you can jump on top of tables, etc.
How can I do something similar in Unity? All I’ve tried so far is an ortographic camera. It’s easy placing 2d art on a level, but I have no idea on how to make that 2d art feel 3d.
I haven’t played the game but as far as i can tell from the videos, my guess is that if you want to do the same inside Unity, you could use some quad textures to draw the characters and then modify the three axes of the quad to give that 3D feeling (which is the depth).
I wouldn’t use an ortographic camera. You actually want to modify the Z axe so that the characters (which are just quads) are getting smaller or bigger depending on the Z value.
Maybe there is a better way but I think it would work quite well that way.
Anycast, if our 2D Platformer tutorial was made for anyone, it was made for you. It deals with pretty much the same thing you describe wanting to do:
Check it out and run through the tutorial. There’s a very concise PDF which explains how it’s working, and the project is already set-up for an easy start.
Except the 2D Platformer tutorial actually uses 3D models on a fixed axis. I think what he wants to do is to use sprites in order to have that real 2D look but still be able to move the characters/objects in a 3D environment (which would kind of be the opposite of the 3D Platformer tutorial).
That being said, it’s always a good thing to have a look at the tutorial to see how things work
"Except the 2D Platformer tutorial actually uses 3D models on a fixed axis. I think what he wants to do is to use sprites in order to have that real 2D look but still be able to move the characters/objects in a 3D environment (which would kind of be the opposite of the 3D Platformer tutorial). "
This is exactly it. I want to have a designer doing cute 2D stuff that I’ll be able to plug into the game with little effort, while maintaining a 3D feel.
I’ve been through the tutorials and I’m already “comfortable” with Unity, though on some issues I feel a bit lost (this issue is one example )
I’m now thinking about using quads, with an ortographic camera, but with box colliders to keep the 3d feel… I’ll try it to see if it works.
In the meantime if there are any more ideas, they’re very very welcome, particularly if you’ve already try them out
"I wouldn’t use an ortographic camera. You actually want to modify the Z axe so that the characters (which are just quads) are getting smaller or bigger depending on the Z value. "
In Castle Crashers everything remains the same size, despite the depth. So I think it maps really well to an ortographic camera.
Yeah but making the camera ortographics remove the perspective which is something you want to keep. You’re right when you say you don’t want your chars to be bigger or smaller but you still want the player to see they are going nearer or further the camera.
Come on, have you seriously never played one of the thousands of beat 'em up games that have existed through the ages?
You know how near or far they are because of where their feet are on the ground, and if they’re jumping, where their shadow is. Realistic perspective has never been a staple of this genre.
The perspective can be given by the 2D artwork. It seems like this was how they did it in CC. I don’t actually see any 3D objects there. That being said, there are some 2D objects (e.g. tables) that despite being 2D allow you to jump on top, as there are stairs you can go up and down.
There has to be a way to do this easily (read elegantly), without checking 2D coordinates and types of objects…
I’m not saying this can’t be done using 2D only. I do remember games like Street of Rages (:P) etc but since you have a 3D-oriented engine, I think it’d be easier to actually use what the engine offers instead of coding what you need to have pretty much the same results.
Especially considering that it’s really easy to give that 3D feel just by rotating the quad…
I just think that it’s best to use the most out of what the engine offers as it’s already been tested and it works.
My next iPhone game is very much in the same genre and visual style that you’re describing. The way I’m approaching it is as follows:
My environments are constructed like a pop-up book. My ground plane is flat relative to the world (x = left and right, z = depth or “up and down” from the main game camera.
The camera is pointed down at my ground plane at a 30 degree angle, and has a very narrow FOV to reduce perspective and make the view NEARLY orthographic. This is to make the ground occupy a large amount of screen space (as is customary in beat em ups).
All elements that are would rise up in the “y” direction are angled 30 degrees as well, to face the camera flat. This includes characters, the back wall of the environment, visual effects, etc. Basically anything that isn’t aligned with the ground and needs to look like the original sprite.
So, it looks something like this from the side…
Camera*------------
\
\
\ ______/_____/ - Back Wall
|
Player
This lets you make use of unity’s inherent 3D capabilities to manage depth sorting between different characters as well as the environment, while maintaining a very non 3d perspective. The only downside to this is that your artist needs to paint the ground texture from a top down perspective.
Thanks for your answer. I’m going to test it now. It does seem like a good way to go.
Does this mean that Zombieville USA 2 (you can use the original title suggestion if you like it ) will also be using 3D objects instead of purely 2D art? If so, what made you change your mind from the pure 2D approach?
Hey, now! I’m 26, but I’ve been a gamer since the age of 3-4, right about when these kinds of games really started to take off. I was big into
TMNT 23, Double Dragon 12, and Battletoads on the NES,
Maximum Carnage, and the Golden Axe and Streets of Rage series on the Genesis,
TMNT IV, Batman Returns, and The Death and Return of Superman on the SNES,
and TMNT, X-Men, and The Simpsons in the arcade.
Ever play the version of X-men with 6-player mode, on two CRT screens jutted up next to each other? :o
Unfortunately, I don’t like Castle Crashers :-(. It’s my opinion that the enemies take too long to die. That make it boring to me. Oddly enough, I found that Bandito Chinchilla, from Thrillville: Off the Rails (which I rented but didn’t have the time to get into) was a lot more fun. Go figure.
We’re still using 2D art and animation, just with a little perspective/depth this time not unlike the beat em ups you all have listed. It just suits the gameplay we’re shooting for better than the strictly flat, side scrolling style of Zombieville.
I agree with Jessy that Castle Crashers’ actual gameplay is pretty unremarkable - its made fun by its style and sense of humor more than anything.
Hi, how narrow would you make the camera FOV? I like your approach because I won’t need to make strange calculations when jumping or something like that. What I don’t like is the inherent “size change” because of the perspective view.