Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

2D game programming tutorials in C#

Tags:

c#

.net

2d

I want to learn about programming 2D games in C#. What are the best tutorials that are beginner oriented, written for C#, and preferably use GDI+ (or something equally simple)? I am relying on the experience this community has to direct me towards the best.

like image 963
Bloodyaugust Avatar asked Feb 24 '10 22:02

Bloodyaugust


People also ask

Can you program a game in C?

Of course you can. Many games have been programmed in C (DOOM comes to mind). SDL is a game programming library written in C. Of course, it may be a little more difficult than using C++ for a big project, but it's possible.

Is C or C++ better for making games?

Direct code compilation provides better code performance, making games more efficient with a faster gaming experience. Unlike C#, C++ is efficient in dealing with low-level C and assembly languages, making games developed in C++ relatively faster.

Can I make 2D games with C++?

Using C++ and Lua, developers can create 2D and 3D games and other highly visual apps for free under the MIT license.


2 Answers

Books

Beginning .NET Game Programming

Beginning C# Game Programming

Links

Coding 4 Fun is a great .NET resource that has quite a few user-created games. They also have a book and a 2-D game primer

Tutorial Listing at C# corner

C# Game Tutorial for Beginners (video)

Link to more game programming e-books

Advanced Topics

The Farseer Physics Engine on Codeplex would be a good next step once you get comfortable with programming games. You could even end up contributing to the project if you like it enough. I'm sure they'd appreciate the help.

like image 194
Robert Greiner Avatar answered Sep 20 '22 04:09

Robert Greiner


I watched these DNR TV episodes recently and thought they were very well done and informative.

http://www.dnrtv.com/default.aspx?showNum=165
http://www.dnrtv.com/default.aspx?showNum=166

These focus on XNA, which is definitely where I'd start if I was planning on creating a game. Their tutorial take you through:

creating a 2D game with:

  • collision detection
  • texture creation and usage
  • geometry creation
  • physics simulation (They use an open-source physics engine and show you how to use it)

If you haven't heard of XNA:

The framework runs on a version of the Common Language Runtime that is optimized for gaming to provide a managed execution environment. The runtime is available for Windows XP, Windows Vista, Windows 7, and Xbox 360 [also can be played on Zune HDs].

XNA attempts to free game developers from writing "repetitive boilerplate code" and to bring different aspects of game production into a single system. wikipedia

Even if you don't want to use XNA, I think these videos will help learn about the concepts and techniques common to most (if not all) game dev. Oh, and it's all C# :)

Good luck!

like image 43
Bobby Avatar answered Sep 22 '22 04:09

Bobby