Jump to content

  • Log In with Google      Sign In   
  • Create Account

Choosing a 2D game engine for my project


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
18 replies to this topic

#1 GamDev   Members   -  Reputation: 112

Like
1Likes
Like

Posted 17 September 2012 - 03:04 PM

First, some background: I have average understanding of C++ and I've managed to code a few simple programs, however never made a game. Maybe I would've if my PC wouldn't have broken down, I didn't have enough money to replace it for a long time. by that said, I strongly prefer C++ over any other mean of coding, I find the language significantly more comfortable to use compared to anything else I've seen (Javascript, Java, Pascal to be precise).

I'm creating a new topic because I want up-to-date information.

Project description: my project is somewhat similar to Sonic, Dangerous Dave, Megaman, Mario graphics-wise. I can do without pixel-perfect collision, however I do ramps and "divided" tiles in the tilemap. The game is obviously 2D (NOT 2.5D!), there's gonna be shooting, interacting, weapons, etc..

What I'm looking for: I need the engine to come with object and event manager (call a sprite (bullet?), destroy a sprite on events, etc.), integrated physics, graphics and sound management, and the regular features, like time manager, text, input, animations, etc.. Preferably with at least some basic A.I. too, but not necessary. Some basic LUA integration may be useful too, but it's definitely unnecessary.

P.S. I'm not looking for 10 different engines that I'd have to tie into one myself (graphics, zip, sound, physics, etc.), I'm looking for one solid product that I could use. I'm also not looking for paid engines, I'm looking for a free engine that would allow me to release commercial products.

If you have any questions, feel free to ask.

Edited by GamDev, 17 September 2012 - 03:05 PM.


Sponsor:

#2 ic0de   Members   -  Reputation: 842

Like
0Likes
Like

Posted 17 September 2012 - 06:12 PM

I know this isn't really what you want but I thought you might find it worth it to write your own simple engine if its only simple 2d. A simple api like SDL will actually handle a ton like sound, Image loading, input processing, Sprites can be done via a BLIT and there are plenty of SDL extensions that do allot more. If you want physics roughly equivalent to sonic it wouldn't take much extra programming. I even have some code samples I wrote of a very basic platformer that I could send you if you'd like, they cover animation via spritesheets and some basic physics (in C++ of course).

Edited by ic0de, 17 September 2012 - 06:14 PM.

you know you program too much when you start ending sentences with semicolons;


#3 kd7tck   Members   -  Reputation: 715

Like
0Likes
Like

Posted 17 September 2012 - 06:49 PM

If you want something like that, you will need to use an engine that costs some money. Don't be afraid to lay down a hundred dollars or so, it is well worth it. Bellow is a list that might interest you.

Torque2D
Allegro
Source Engine

#4 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 17 September 2012 - 06:58 PM

I know this isn't really what you want but I thought you might find it worth it to write your own simple engine if its only simple 2d. A simple api like SDL will actually handle a ton like sound, Image loading, input processing, Sprites can be done via a BLIT and there are plenty of SDL extensions that do allot more. If you want physics roughly equivalent to sonic it wouldn't take much extra programming. I even have some code samples I wrote of a very basic platformer that I could send you if you'd like, they cover animation via spritesheets and some basic physics (in C++ of course).


I find the entity (bullets, etc.) system rather difficult, and pixel-perfect collision (which I assume I'd have to use for ramps) immensely difficult. I remember struggling a lot with them. A lot!

Anyway, I also remember shaking SDL, as I remember that it wasn't updated for a long time, and is half C, half C++.

I would appreciate if you'd send me the source code of your platformer though, I guess we should take this to PMs?

If you want something like that, you will need to use an engine that costs some money. Don't be afraid to lay down a hundred dollars or so, it is well worth it. Bellow is a list that might interest you.

Torque2D
Allegro
Source Engine


Be afraid? I'm not afraid, I don't have the money! I couldn't even afford to fix my PC until recently!

Allegro's free and it offers only outdated C code as a graphics wrapper.

Source Engine is 3D.

#5 kd7tck   Members   -  Reputation: 715

Like
3Likes
Like

Posted 17 September 2012 - 07:08 PM

Just so you know, Source engine has been used many times in the past to make 2d/2.5d games.

I know many of the people who write patches to allegro on an ongoing basis, Allegro and C are anything but outdated.
Allegro is actually a highlevel SDL wrapper, and there is a c++ wrapper written for it.

Don't cringe at wrapping C code into a c++ game. Often this is the fastest way to get things done.

#6 GamDev   Members   -  Reputation: 112

Like
-2Likes
Like

Posted 17 September 2012 - 07:36 PM

Just so you know, Source engine has been used many times in the past to make 2d/2.5d games.

I know many of the people who write patches to allegro on an ongoing basis, Allegro and C are anything but outdated.
Allegro is actually a highlevel SDL wrapper, and there is a c++ wrapper written for it.

Don't cringe at wrapping C code into a c++ game. Often this is the fastest way to get things done.


As I've stated in the OP, I'm not looking for a 2.5D engine. As for using a 3D engine for a 2D game, it is counter-productive and overly-complicated, often it's also a overkill for the end product as well.

Interesting, I'll have to take a look at Allegro and SDL. However, I am against C code, when there's C++, up-to-date is my preference, and often is more productive and has better performance. I can't comment ont his particular situation though, as I don't have enough knowledge about it. But anyway, as far as I know (now), SDL offers various plugins, maybe even those that I need - entities, physics, sprites, tilemaps, etc., while Allegro doesn't, in which case, SDL has a huge upside over Allegro for me.

#7 ic0de   Members   -  Reputation: 842

Like
3Likes
Like

Posted 17 September 2012 - 07:53 PM

Allegro's free and it offers only outdated C code as a graphics wrapper.


Don't ever forget that C is C++. Any C is perfectly valid C++, and C isn't really outdated Its still used for a lot of modern programming.

you know you program too much when you start ending sentences with semicolons;


#8 html5dev   Members   -  Reputation: 116

Like
0Likes
Like

Posted 17 September 2012 - 10:00 PM

These are html5-Javascript based 2d engines with full cross-platform support. Worth checking these out:

http://impactjs.com/

http://craftyjs.com/

http://www.melonjs.org/

#9 frazchaudhry   Members   -  Reputation: 1146

Like
1Likes
Like

Posted 18 September 2012 - 12:28 AM

since you are considering Allegro and SDL, I would advise you to have a look at SFML as well. It is entirely C++ based and is a modern object oriented alternative to SDL or Allegro. I have found it very intuitive and easy to get into. check it out at http://sfml-dev.org .

#10 Overdrive   Members   -  Reputation: 187

Like
1Likes
Like

Posted 18 September 2012 - 02:22 AM

I had this same problem ( not knowing what 2D engine to use ) and I ended up writing my own.
My main issue with most 2D engines is that they don't support shaders.
Even Torque 2D has just some silly blend modes that makes me think that they just use fixed pipeline when rendering everything in there.
Using a 3D Engine for 2D games might give you a lot of work too. You will need to change the way physics works if you wnat to make a sprite based engine ( not just a 3D game where you see the character from the side). This can be easy or not depending on what you choose here. For example for UDK it's nearly impossible to change the physics code and replace it with Box2D since you don't have access to the sources.

In the end you need to ask youself what is the end goal.
Do you want to make a game in order to sell it? I doubt it can be successfull given the huge amount of first-project flops that come even from experinced programmers.
Not wanting to discurage you here, but since you mentioned PASCAL I start to believe that you're not that experienced with game development or programming in general.
If you want to make it for your portofolio, you could impress people more if you do your own engine. It would also be a really nice learning experience.

#11 GamDev   Members   -  Reputation: 112

Like
1Likes
Like

Posted 18 September 2012 - 05:55 AM

I had this same problem ( not knowing what 2D engine to use ) and I ended up writing my own.
My main issue with most 2D engines is that they don't support shaders.
Even Torque 2D has just some silly blend modes that makes me think that they just use fixed pipeline when rendering everything in there.
Using a 3D Engine for 2D games might give you a lot of work too. You will need to change the way physics works if you wnat to make a sprite based engine ( not just a 3D game where you see the character from the side). This can be easy or not depending on what you choose here. For example for UDK it's nearly impossible to change the physics code and replace it with Box2D since you don't have access to the sources.

In the end you need to ask youself what is the end goal.
Do you want to make a game in order to sell it? I doubt it can be successfull given the huge amount of first-project flops that come even from experinced programmers.
Not wanting to discurage you here, but since you mentioned PASCAL I start to believe that you're not that experienced with game development or programming in general.
If you want to make it for your portofolio, you could impress people more if you do your own engine. It would also be a really nice learning experience.


Well I don't need shaders, I'm not looking to create a game of high-end graphics. I'm looking to create a game that looks like it has been created in '91, they don't have shaders and possibly other features that you needed for your project. :)

I've mentioned Pascal because I had to work with it at school. It was absolute horror! The primitive way how it works... Horrible experience. So in short, that's unrelated to my own choices, it was an enforced enforced by school, I will never lay my hands on it again. However that is true, I'm not very experienced programmer in general, I am good with the logic, but writing it down is hard for me.

I do understand that I'm not experienced, however when I work on something, I always do my best and then some, I never leave it half-way. I've seen many projects and (no offense), but most of them are horrible. I think the commercial way is the way to go for me, due to the lack of money mentioned in real life. But as the first project, I don't think writing an engine is the right way to go, it is a lot of work and has a great potential for a lot of bugs and inefficiency compared to what's already written and is proven to work.

#12 web383   Members   -  Reputation: 773

Like
0Likes
Like

Posted 18 September 2012 - 11:49 AM

I would also suggest SFML

#13 GamDev   Members   -  Reputation: 112

Like
1Likes
Like

Posted 18 September 2012 - 01:52 PM

It's only a graphics library.

#14 BeerNutts   Crossbones+   -  Reputation: 2944

Like
0Likes
Like

Posted 18 September 2012 - 03:53 PM

SFML is a great API for graphics, Input, Windowing, and Audio. I combine that with a 2d physics library to handle all my movements and collision detection. I use chipmunk-physics but Box2d is a popular one as well.

My old blog (linked in my sig) outlines the steps and has all the source code I took to make a top-down game using SFML and chipmunk-physics.
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#15 uglybdavis   Members   -  Reputation: 922

Like
0Likes
Like

Posted 18 September 2012 - 04:17 PM

What you are looking for simply isn't out there. The closes you are going to come is Cocos2d-x (The C++ port of Cocos2d) http://www.cocos2d-x.org/
Maybe game-maker? The issue with game-maker being it uses a scripting language, not C++. http://www.yoyogames.com/gamemaker/studio/standard

Anyway, if you find entity management a challenge you probably don't have a solid enough understanding of C++ to make a game without shooting yourself in the foot.
I understand the make games, not engines mentality; but making games without enough understanding of what is under the hood leads to bad games.

My opinion mate, spend some time studying, it's worth it in the end. Either write your own data structures, write your own memory manager, your own entity handling framework, render code, actually understand what it is you are doing, or admit to yourself that your understanding of C/C++ is too minimal for a game, learn a scripting language and script games in engines.

#16 kd7tck   Members   -  Reputation: 715

Like
0Likes
Like

Posted 18 September 2012 - 04:22 PM

You will not find what you are looking for sir. Based upon your responses thus far, it seems you and I are after the same thing. Why do you think I am in the process of converting SFML into a full fledged game engine. I expect this little project of mine to take years to complete.

You can find it at https://github.com/kd7tck/SFML, still just an early prototype though.

#17 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 18 September 2012 - 05:32 PM

SFML is a great API for graphics, Input, Windowing, and Audio. I combine that with a 2d physics library to handle all my movements and collision detection. I use chipmunk-physics but Box2d is a popular one as well.

My old blog (linked in my sig) outlines the steps and has all the source code I took to make a top-down game using SFML and chipmunk-physics.


Thanks, I'll definitely check it out! When I was a kid, my dream was to make an isometric RPG, but as I looked into actual programming, a side-scroller seems like a solid starting point instead. :)

What you are looking for simply isn't out there. The closes you are going to come is Cocos2d-x (The C++ port of Cocos2d) http://www.cocos2d-x.org/
Maybe game-maker? The issue with game-maker being it uses a scripting language, not C++. http://www.yoyogames...studio/standard

Anyway, if you find entity management a challenge you probably don't have a solid enough understanding of C++ to make a game without shooting yourself in the foot.
I understand the make games, not engines mentality; but making games without enough understanding of what is under the hood leads to bad games.

My opinion mate, spend some time studying, it's worth it in the end. Either write your own data structures, write your own memory manager, your own entity handling framework, render code, actually understand what it is you are doing, or admit to yourself that your understanding of C/C++ is too minimal for a game, learn a scripting language and script games in engines.


I do understand the concept, I could tell you how it works step-by-step, what's used and how, the thing I cannot tell you is the code. So no offense, but starting with an engine for me is irrational. Building an engine is good if you are bad at understanding the theory and/or analyzing it in-depth.

You will not find what you are looking for sir. Based upon your responses thus far, it seems you and I are after the same thing. Why do you think I am in the process of converting SFML into a full fledged game engine. I expect this little project of mine to take years to complete.

You can find it at https://github.com/kd7tck/SFML, still just an early prototype though.


I see. Well prototype isn't useful (no offense), but thanks for the link. I'll follow your progress. ;)

#18 stevo58   Members   -  Reputation: 243

Like
0Likes
Like

Posted 19 September 2012 - 04:24 AM

SDL, Allegro and SFML are not game engines!!

SDL 2.0

Latest SDL port for Windows, Linux, Mac OSX, iOS and Android. Improvement to the last 1.2 API. Offers 2D hardware Acceleration. Still in development but last I checked they where talking about releasing it. Don't let the still in development fool you, it's been for a while now and it's near release I would say. Many improvements and functionality have been added to it. Note you will have to download SDL from mercurial if you want the latest, you can also get all the other extensions from there SDL_image, SDL_mixer, SDL_ttf, SDL_net

SFML 2.0

Support for Windows, Linux and Mac OSX, built in features like audio, networking... Higher Level then SDL.

Allegro 5

Supports for Windows, Linux, Mac OSX and iOS. Allegro 5.1 supports Android.

addons are:
Audio addon
Audio codecs
Color addon
Font addons
Image I/O addon
Main addon
Memfile addon
Native dialogs addon
PhysicsFS addon
Primitives addon
Shader addon

Really any of the 3 could be used to make your game note you can use Box2D for physics with any of the 3. Also like to say SDL is written in pure C not half C half C++, if you decide to use C++ with it it's completely up to the coder. C was just the language preference of the creator.

Ive heard great things about all the above, SFML I have never used.

I'm currently using SDL 2.0 on iOS, and it's doing a pretty good job, if you needed anything for SDL I could provide example code or even a game template. If so also let me know what platform you will be working on

#19 GamDev   Members   -  Reputation: 112

Like
0Likes
Like

Posted 19 September 2012 - 05:04 AM

@stevo58 Thank you, I will definitely consider contacting you if I'll choose SDL to work with.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS