Jump to content
  • Advertisement
Sign in to follow this  
Trapper Zoid

Build my own 2D engine, or use someone else's?

This topic is 4753 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Before I begin, I'm sorry if I picked the wrong forum for this one, as it's a bit unclear whether this is "game programming", "graphics programming" or "alternative game libraries". I've got a question about engine choice that I'd like some advice on. At the moment I'm working on a simple 2D space shooter as my first real game for some time. I'm planning on working through a couple of small games, gradually ramping up the developmental difficulty until I get to games of sufficient quality to be sellable as an indie. For this first project, by building a simple game I'll be working on reviving my once adequate C programming skills (or working towards C++), since I haven't written anything complex for a couple of years. However, I'm not sure on the best approach towards the design of the engine. The programmer in me would like to design and write my own 2D engine. However, thinking about this from the perspective of an indie, it might make better sense to use an existing 2D engine that's tested and true. If this was a 3D game, this is a no brainer; it just makes sense to use an existing 3D engine because building something competitive by yourself is too time-consuming these days (unless building engines is your goal, of course). But a 2D game engine doesn't seem that hard; I've written simple ones before in a couple of weeks. Of course, I could be wrong as I'm no expert, which is why I'd like to ask people's opinion about which is best, if you were aiming to make commercial quality 2D games, since I know some of you have already been down this path. Should I start off by researching how to build a solid 2D engine and building my own, or should I start researching what existing 2D engines are out there and which one is best?
Here's what I think are the pros and cons of both methods: Write my own 2D engine Pros:
  • Get practice in writing C or C++, using SDL, engine design
  • Will understand the underlying mechanics better
  • Easier to integrate new features
  • No licensing issues (except for SDL's LGPL, of course)
  • I can ensure that it is properly cross-platform myself
Cons:
  • Takes time to learn the appropriate knowledge and to write the engine
  • I'm inexperienced in engine design, will take a couple of iterations to get right (however this is planned for; I'll be making a series of 2D games)
  • Will have to debug and test extensively
  • Will not start off with as many features as a mature engine
  • I might easily overlook something important when designing my engines, due to inexperience.
Use someone else's cross-platform 2D engine Pros:
  • Will start with a full 2D engine; no development time
  • Little need to test and debug the engine itself
  • Access to support
Cons:
  • May not have all the features that I need
  • Harder to extend
  • Harder to track down and fix any specific problems
  • I won't learn how to build a proper 2D engine
  • Underlying mechanics of game engine will be unclear
  • Licensing issues
  • Good chance the engine will be poorly commented and coded confusingly (this seems to be the case with most source code I've downloaded; doesn't anyone comment their code?!)

Any advice? Also, if you think I should make my own 2D engine, I'd welcome any tips or tutorials on how to design a good one (i.e. not just one that works, but one that is solid from a software engineering perspective). Or if you think I should use an existing 2D engine, I'd welcome recommendations about which ones are best. Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
Use an existing 2D engine, but make sure it's one that you have source for, and dispel the notion that you'll require no development time to get up to speed with it. First, you'll have to learn what the engine can do, and how best to do them. Second, you'll have to learn what the engine can't do, and decide whether to enhance it. Third, you'll have to figure out how to enhance it, and then figure out how to build your game on top of it.

Even with all that, there's the very high possibility that it amounts to less time than writing your own engine from scratch, especially when you account for refactoring your evolving design. Publicly available engines that have reached maturity and been used by other games will have been influenced by the variety of games built on top of them, and consequently will have ironed out a number of kinks you likely won't forsee.

Good luck with your game.

Share this post


Link to post
Share on other sites
It seems your goal is to get practice writing games, so it makes sense to use a third-party engine for it instead of spending potentially a few weeks to a month writing your own (possibly longer depending on how detailed you want it to be and how much you do on your own).

If you do use a third-party library, (note I have not by any means used all of the engines out there) I do recommend from my experiences ClanLib. It's a very broad library, with utilities across the spectrum of input, sound, graphics, etc. As far as features go, I doubt you'll be dissapointed. You can learn more details at its respective website here.

If you're serious enough about this and are willing to spend some money, I don't think you could go wrong with Torque 2D.

Either way, good luck.

Share this post


Link to post
Share on other sites
I am currently working on one: JEngine SSE. In the next couple of days I am going to release build 0.30 which is quite powerfull already and is crossplatform, open source and contains a client/server network layer (still under development).

I am currently writting a game with it. The complete game logic is written in Lua script. Adding functionality to the engine is very easy, and there is a lot of comments in there.

See my website for more information: http://jengine.homedns.org

Share this post


Link to post
Share on other sites
Quote:
Original post by blankdev
Anyone know any OpenGL 2D engines that are free?


ClanLib is written on top of OpenGL, and is completely cross-platform. You can easily use both ClanLib and OpenGL simultaneously.

Share this post


Link to post
Share on other sites
Thanks for the replies from everyone!

Quote:
Original post by Oluseyi
Use an existing 2D engine, but make sure it's one that you have source for, and dispel the notion that you'll require no development time to get up to speed with it. First, you'll have to learn what the engine can do, and how best to do them. Second, you'll have to learn what the engine can't do, and decide whether to enhance it. Third, you'll have to figure out how to enhance it, and then figure out how to build your game on top of it.


That's true. After thinking about it for a bit, I think it might be best to start off my building the interface to an engine, but just coding that up as a wrapper to an existing 2D engine. That way I can add my own functionality or swap out to another engine in the future.

Quote:
Original post by nilkn
If you do use a third-party library, (note I have not by any means used all of the engines out there) I do recommend from my experiences ClanLib. It's a very broad library, with utilities across the spectrum of input, sound, graphics, etc. As far as features go, I doubt you'll be dissapointed. You can learn more details at its respective website here.

If you're serious enough about this and are willing to spend some money, I don't think you could go wrong with Torque 2D.


I've had a look at the documentation to ClanLib, and it does seem to cover many of the areas that I think it would be troublesome to implement (such as the resource manager), so it's currently my front runner for starting engine to try out.

I've heard about Torque 2D and read a bit about it, but I'm not sure if it compatible with compilers other than Microsoft Visual C++. At the moment I'm thinking about using Dev-C++ as my compiler, but I'm still not sure; I remember Visual C++ being pretty good when I used it a couple of years back. Torque 2D does look pretty good though, and $US100 dollars is not a large amount of money for what it seems to do. Has anyone tried it out, and can tell me how good it is?

Edit: By the way, the reason why I'm picking Dev-C++ is mainly because its free, and so far it seems to do what I want it do for the simple demos I've tried out. I used to use Watcom's compiler years ago, but that's now very obsolete. Microsoft's Visual C++ seems a bit pricey for the full commercial edition, but it might have a lot of useful features that I don't know about. Is it worth the cost? If I spend a few hundred bucks now on a new compiler and Torque 2D would I save a huge amount of time?

Although I'm not sure in that case whether it wouldn't be better to just get the full Torque 3D engine, and just use it in 2D to start with. I'm starting to get a bit confused by all the available options!

[Edited by - Trapper Zoid on October 10, 2005 12:18:34 AM]

Share this post


Link to post
Share on other sites
Hey buddy, as a professional compiler converter myself, I can convince you to get visual studio. IT saves you so much time programming, it has autofill feautures where you type the classname and a dot (to access a member/function, and it gives you a drop down list so you could just type the first letter and press TAB and it types it for you, it's hard to explain and might not seem like much but it's really helpful, also the debugger is nice, as well as the error handling, It gives you millions of things you can configure (I've never done so myself), if you have any more questions let me know. And yeah I think torque 2D is really good, and let alone if you get MSVC, the engine comes with project files for it, so it would be very...very easy for you to use it.

Share this post


Link to post
Share on other sites
Quote:
Original post by blankdev
Hey buddy, as a professional compiler converter myself


What the hell is a professional compiler converter...

I don't really agree with any of this advice. Roll your own. You will gain valuable experience from the utter frustration.

And than use someone elses to do a real game.

Share this post


Link to post
Share on other sites
lol I was playing I ment that I converted everyone to use visual studio, but yeah what the guy above me said, it's up to you, but in my opinion, visual studio is great.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!