What pros or cons should a beginner be aware of when deciding between a 2d game engine (like Slick2D/Flixel/FlashPunk) and a 3d engine (like Unity) for 2d game development?
I am just getting started in indie game development, though I have dabbled a bit with Game Maker, Flash, and XNA in the past. I've heard a lot of positive things about Unity, and its cross-platform nature makes it appealing, but as I understand, it's a 3d engine at its core.
For a strictly 2d game, are there any compelling reasons to work with a 3d engine like Unity? Or would it just add unneeded complexity to my initial learning experience?
Answer
It depends on the game, but for the most part, it will be easier to make a strictly 2d game using an engine that is specifically designed for 2d.
Now for some of the pros and cons (some of these will be related to Unity specifically, some of them are more general)
Cons
3d engines are usually designed around game objects being 3d models (polygons and textures). While it's certainly possible to make a flat plane and apply a texture to it, you're actively working against the engine when you do that.
Additionally, many 3d engines lack the ability to deal with sprite sheets (all frames of animation on one texture), because they expect animation to act on the model (though rigging and other methods), not the texture. Again, there's ways around this, but again, you're actively working against the engine to accomplish this.
Added complexity. As mentioned in Josh Petrie's answer, 3d is a huge bit more complex than 2d, mostly in math and scene management. Moving objects and handling 3d space is tough, and if this is one of your first games, it's just going to be all that much harder. The good news: Unity abstracts away some of these issues, though there's going to be some things you still have to handle (and much of the abstraction is, yet again, meant for 3d models, not 2d sprites)
Most libraries that Unity comes with or that you can get for it are meant for 3d objects. This includes stuff like lighting, pathfinding, physics, etc. In the meantime, box2d will easily work with Flash, or XNA, or something (well, maybe).
Pros
3d Acceleration. Graphics cards are a lot better at handling lots of objects in a scene than a CPU, and with Unity you can get that benefit really easily. This lets you display thousands of sprites on the screen, or include particle effects easily, or add in something fun like shaders to support cool effects like warping space and time to your will. Unity has many of these effects built in, which makes it really easy. Note that a lot of 2d engines use OpenGL or DirectX behind the scenes, and in many cases can be hardware accelerated, as well.
Support for models. Remember that thing that was a problem earlier? Yeah, it can be a benefit, too. Depending on the game, being able to include rotating spheres or something cool like a 3d object in the background can be a benefit. You can also have a game made out of 3d, but simply forced into a 2d perspective, which can give you the option of rotating the world geometry without having to do tons of extra graphics to handle it.
Learning 3d. Let's face it, lots of games are written in 3d, and if you learn how to use Unity, you'll be able to apply many of those skills to the next game which might require 3d. Additionally, a lot of artists coming out of school right now are being taught 3d modelling, so it's "easier" to find a 3d artist than a traditional 2d game artist (whether said artists are any good....)
Conclusion
There's a lot of cons, there's also a decent amount of pros. It's all going to depend on the sort of game you want to make, it's up to you to decide if it's worth it. Flash is still an extremely viable option, so there's nothing wrong with going with a 2d engine if that's what fits your game better.
No comments:
Post a Comment