What's the best 2D library/engine available? (eg. is XNA/C# right for me?)

Discussion in 'Game Development (Technical)' started by sofakng, Jul 28, 2008.

  1. sofakng

    sofakng New Member

    Joined:
    Sep 27, 2006
    Messages:
    21
    Likes Received:
    0
    I've been fooling around with game development for a couple of years but I've never done anything above displaying a sprite with simple box collision detection but I've always really wanted to create a Worms clone (and other 2D type of games) and I've been struggling with the decision of whether or not to use XNA/C#.

    I really, really like C# as a language (espicially with all of the prewritten utility classes, etc) but I dislike that it's 100% Microsoft specific, requires extra runtime binaries and cannot be run (in most cases) on other platforms except for the 360 and Windows.

    However, it seems like C++ is still by far the most popular language for game development (even very simple indie/hobbyist games). I know the very basics of C++ and most intermediate concepts aren't hard to learn once you know another language (eg. I know Delphi [using OOP] fairly well) it's not too difficult to tranfer your skills.

    Really though, all I want is something easy to use that will handle collision detection (eg. quad, circle, polygon), sprite drawing, and network management. However when it comes to creating high-resolution 2D destructable terrain it gets extremely difficult and I end of quitting my project and networking objects just gets extremely difficult even at the basic level. (I know that RakNet exists and can pretty much handle automatic object synchronization but it seems like NOTHING else exists like that).

    Anyways, I'm just wondering what the general opinion is for new hobbyist/indie game programmers. (not new programmers, but intermediate-level programmers wanting to create very simple games that will probably never, never make it to market).

    I've purchased several game engines: TGE, TGB, and BlitzMax, but all of them seem to fall short with two things: networking and Worms-style high-resolution (1920x1200 with multiple screens) terrain implementation.

    What are the general options for something like this? I absolutely do not want to make a single-player game... whatever I create needs to be multiplayer over the internet, etc.

    Thanks for any suggestions!
     
  2. MacMan45

    MacMan45 New Member

    Joined:
    Jul 13, 2006
    Messages:
    127
    Likes Received:
    0
    I'm not a fan of anything owned / controlled by one company either, but when it comes down to it, use the right tools for the job.

    If you never plan to release it, then code it in anything you like.
    If you eventually want to sell it and you are happy with limiting yourself (for the most part) to windows, then use C#.

    It is more important that you do *something* then get stuck in the headlights.

    If you end up making a game that is so good that you want to port to mac or linux, then you can either pay someone, or just do it yourself.

    But that won't be something to *worry* about for a long time, if ever!
    Get the important stuff done first, and if that means using C# because you are well versed at it over C++, then do it.

    There is no point at this stage learning C++ for the next 6 months & having nothing to show for it, if you could instead have a part way working game.


    Personally I would start with C++ or python & some good libraries (OGRE in my case), but that is because they are the languages I'm good with & like to code in.
     
  3. Mattias Gustavsson

    Original Member

    Joined:
    Aug 10, 2005
    Messages:
    669
    Likes Received:
    0
    You could give my engine a go if you like :D

    It's C++, and I've tried to keep it fairly simple and easy to use. And it's totally free :)
     
  4. zoombapup

    Moderator Original Member

    Joined:
    Nov 25, 2004
    Messages:
    2,890
    Likes Received:
    0
    You wont find anything that actually does the game for you. Specifically, you wont find anything that does the terrain for you.

    Thats because its essentially a bunch of pixel manipulation, which no game engine these days is going to touch (well, ok, you can do per-pixel stuff, but essentially its not very performance friendly).

    You'll have to figure out how to do the terrain yourself. So that narrows the decision down to "drawing sprites" and "networking" as your major problems.

    Weirdly, if you went for a higher end solution, you might actually be better off, if you used a pixel shader for doing the explosion blitting (essentially explosions in worms were assembly based blits into a 1 bit mask) you could do a texture render target based system to do the same thing. So XNA could definitely be a contender here. You'd have to figure out the render to texture and render target setup for it. But explosions would simply be circles renderered into the terrain texture (using a pixel shader that essentially culled the pixels covered by an explosion).
     
  5. Mattias Gustavsson

    Original Member

    Joined:
    Aug 10, 2005
    Messages:
    669
    Likes Received:
    0
    That's what I was thinking too, so if you're happy with a solution which is a bit more low-tech, my engine is a pure software engine, so it's easy to manipulate individual pixels without the overhead...

    It's not a proven engine though, as in there's no commercial games done with it, but as your goal is not necessarily to sell it, I thought it might be worth looking at.
     
  6. manunderground

    manunderground New Member

    Joined:
    Jun 16, 2008
    Messages:
    99
    Likes Received:
    0
    I highly recommend Slick: http://slick.cokeandcode.com/. It's a 2d framework that I've been using for a few months. I think it's ideal if your a hobbyist because:

    + It's written in Java and therefore runs on all platforms
    + It's integrated w/ webstart so you can easily distribute your games
    + It have an active community which will field questions
    + It's well documented
    + It's a glue framework which lets you pick components a la carte w/o forcing a style on you
    + It has components for mostly everything (tilemaps, physics, etc)
    + The community has written several high level extensions ranging from proper "game engines" to GUI systems

    The list goes on, PM me if you want to know more about it.
     
  7. electronicStar

    Original Member

    Joined:
    Feb 28, 2005
    Messages:
    2,068
    Likes Received:
    0
    These two things are contradictory, if you want to create very simple game, then you shouldn't try to do networking or very high res and/or terrain management. It becomes not so easy games.


    All these engines seem able to achieve the task. IMHO it seems that your problem is not in choosing the engine but in sticking to a task until it's done. Nothing will replace sweat and experience, and unfortunately no engine will make it easy to create a multiplayer worms.
    If your game is 2D, though, Blitzmax is the best of the list.
     
  8. sofakng

    sofakng New Member

    Joined:
    Sep 27, 2006
    Messages:
    21
    Likes Received:
    0
    Those are some good points...

    If I had to pick my main task it is to create a networked/multiplayer game. I'm flexible with changing game ideas, etc, but I really do not want a single-player game... (eg. my game needs to have some sort of multiplayer via the internet).

    Unfortunately, I think that networking is by far the hardest task, right? There are many 2D engines/libraries available that will do a LOT of the work for you but nothing like that seems to exist for networking (except RakNet which does a large chunk of work but definitely not all of it). Most people seem to respond by saying "you cannot create a generic network engine/library" but I really don't understand why when most of time all you need is object movement and state synchronization. (eg. position, velocity/acceleration, and variable synchronization).
     
  9. wazoo

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    519
    Likes Received:
    0
    only if you do real-time..

    I'm experimenting with turn-based, and using the "free" networking that is the http protocol. ;)

    You either have a token or you don't. :)
     
  10. Mattias Gustavsson

    Original Member

    Joined:
    Aug 10, 2005
    Messages:
    669
    Likes Received:
    0
    Networking is something that needs to be worked into the games design. If it's a turn-based game, you need to make decisions such as time-outs on moves, whether the opponents see every step of your move as you make it, or just the result of the whole move after it's done, etc. If it is realtime, you need to do various things in the game to cover up the effects of lag (maybe have only projectile weapons, or cover up the lag of melee attacks with clever animation work).

    It's not as easy as just transfering data. That's the easy bit, and you could do that with winsock in a couple of days. A 2d library will only draw stuff for you, it won't implement the actual gameplay. Same thing with a network library: it will just transfer data, but you need to make the game itself networked.
     
  11. Backov

    Original Member

    Joined:
    Oct 23, 2005
    Messages:
    812
    Likes Received:
    0
    As someone making a multiplayer, fast action game in XNA, I'll tell you:

    You cannot create a generic network engine/library.

    If you just want something to sync object positions, velocitys, etc - that's simple.. Use Lidgren (for XNA) and have a readsync and writesync on each object, to get the variables needed.

    The parts you don't see now and that no one can tell you in advance is all the ways this won't work the way you want it to, and all the special casing and optimization you're going to have to do to get it to work.

    There's no shortcut. You have to understand the problem and write the solution. Even the best helper like Raknet is really not doing that much. I could literally replace that kind of functionality in our game in an afternoon or two, it's trivial.

    Anyway, stop putzing around and dive right in. You'll never figure this out if you keep waiting for a magical library to fix your problems for you. Download Lidgren, get it running in GS2.0 and do it.
     
  12. JGOware

    Indie Author

    Joined:
    Aug 22, 2007
    Messages:
    1,578
    Likes Received:
    0
    "I've purchased several game engines: TGE, TGB, and BlitzMax, but all of them seem to fall short with two things: networking and Worms-style high-resolution (1920x1200 with multiple screens) terrain implementation."

    This is not related to any of the languages you posted. There are ways to achieve 2d worms like terrain handling via "tiles" and the ability to alter the pixels on a "tile" in real time. Either by other loaded tiles or directly manipulating the pixels on the tile via a locked texture. I'm sure all of the languages you mention can do this.

    TGE, TGB, Blitzmax...seriously? wow.. that's a nice dev kit there!
     
  13. voxel

    voxel New Member

    Joined:
    Oct 29, 2006
    Messages:
    176
    Likes Received:
    0
    A vote for http://www.indielib.com/ here - it's simple and clean. Throwing in Box2D was a piece of cake... and I'm sure networking (like ENet) would be just as easy.
     
  14. illuminarc

    illuminarc New Member

    Joined:
    Feb 23, 2007
    Messages:
    39
    Likes Received:
    0
    Agree with what's been said - it's just as much a design issue. For instance, a turn-based game like worms, the sim can be run on 1 client and the results pushed to the others for real-time playback. This would be a good start to understanding some of the other issues involved while you work towards your final version.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer