Hey stackoverflow Community! I learned the basics of C# (i can write some Form-Applications) and now I want to learn how to write 2d games. I don't know where to start. Is there a engine that's good for 2d games? After learning the basics of 2d I'll want to write simple games which work under windows and linux (that whould be cool, linux :) ).
I asked a friend who is into programming and he said I should use XNA with C# (but that would only work on windows). After googleing I found out that OpenGL with C++ whould be best to write games for linux, since there is no DirectX/XNA. And I haven't used C++ yet, that whould take some time to learn, again.
Is there something you can suggest? Maybe an other engine? I just installed XNA and took a look at the demo game (Platformer), that code isn't hard at all. Is XNA good for 2d games?
Take one step at a time. When you're starting out you don't need your code to work on every platform. It doesn't matter whether it uses OpenGL or DirectX, because you're going to have your hands full creating a game to run on one platform with one graphics API.
Second, don't worry too much about "engines". You don't need an engine to make a game, and often, it'll be more trouble than it's worth. The whole obsession with "engines" is fundamentally a bad idea. If you try to get one single software component to support every bit of functionality you need for a game, then it's not going to be worth using for any of them..
All you need is:
You especially don't need anything which is "good for 2D games". XNA is able to put graphics on the screen, so it does what you need. If you also understand the code required to use it, then XNA is good enough. Don't bother trying to find the "best", or something that has "awesome for 2D games" as a selling point.
Probably the easiest and most accessibly platform is Flash. Easily distributable and rather quick to learn for games (judging by the sheer amount of flash games available on the web).
I agree with jalf. Don't start thinking about engines. Engines are a complex beast and considering your programming experience is small, it can get very overwhelming very quickly. There's a lot of stuff that goes into games and the design patterns that are involved in them tend to be much different from those of say a typical application. And OpenGL type of stuff gets very complex when you start talking about things such as hit detection.
Another direction you could take is instead of starting your own game from the ground up, you could try making a mod to something like Half-Life 2, or Unreal. That gives you a basic platform that you can change and see how it behaves. In the mean time you'd be viewing other people's code and seeing the intricacies of game development.
Here are a quick links I pulled off of a Google search with regards to flash gaming. I'm sure there are probably quite a few books available online as well with regards to creating a game in flash and other languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With