I have a background in python and I'm looking for a new language. I am almost only intrested in making games.
I have come to 2 languages. C# and Action Script.
C# because Microsoft allows you to make Indie XBLA games programmed in C# ONLY.
Action Script so I can make flash games for new grounds and ect.
What do you think is better to learn in the long run?
I would say C#. You'll learn the basics and then be able to write games for the Desktop (XNA), XBox (XNA), Mobile Devices (XNA and XNA Touch for the iPhone), the Web (via Silverlight), etc.
Flash only gets you limited exposure to each.
I have zero experience with C#, but I'll speak to AS3/Flash's #1 advantage:
For learning game development, Flash lets you make games very quickly, but more importantly lets you get feedback from a large number of users faster than any other environment (except possibly Ajax only). I started Flash programming a little over two years ago. In my first three months I learned AS3 and wrote a TD-style game that was eventually played by over a million people. During beta testing and after release I was getting constant feedback and tweaking the game mechanics and interface with multiple "releases" a day.
While not every game out there gets that much play, with Flash it is much easier to make something and have a large number of people actually play it and tell you what they like and what they don't. Learning how to make good games is harder than learning a different programming language.
To give a comparison of the two:
Action Script is useable only in Flash games (mostly run through web browser), which may be fun for some time, but it limits what you can do. On the other hand, it is probably the best way for developing web-based games.
C# and .NET allows you to write all sorts of different games (and is also more generally useful language in case you wanted to switch from game development to some other field, including web site development and various business applications). Regarding games, you can use it on:
Web based games (similar to Flash) using Silverlight
Desktop/XBox/Zune games using XNA Game Studio
iPhone games using MonoTouch (although there are some licensing issues recently)
By learning C#, you'll also learn .NET Framework (in general), which is (I think) a useful knowledge that you can benefit from in many situations (e.g. when looking for a job :-))
Why not learn both? I think programming a good game is harder than adapting to a new programming environment.
Also, if you get into Flash game dev, you'll probably want to check out Flixel.
C# is the nicer language (although AS3 and C# are similar) and has a wider range of uses than Flash but since you mentioned games only I would tend to say start with ActionScript 3.0 then move to C#.
Firstly we can ignore the fact that C# is useful for writing business apps since that is not relevant to this question.
C# offers game programming via XNA, SilverLight, and Unity3D compared to ActionScript 3.0 with Flash.
So why do I recommend AS3 to start with? Firstly 2D games are where you should start off and I think this is where Flash excels. The development lifecycle of 2D games is much shorter and tend to produce better gameplay. A lot of indie 3D games suck since they fall short of realising what they started out developing. It is relativly simple to get a 2D game up and running and there is a lot of game engines, physics engines and tutorials available. It is also the platform of choice for artists (that can make all the lovely looking levels, characters etc). Second, the flash platform is the most accessible to your audience. No point making a great game that people never play. Third, AS3 is faily simple to come to terms with.
From my experience the web games that I come across that I think are noteworthy tend to be made in Flash. Checkout Scary Girl and Machinarium.
For 3D or anything that you need the power of the GPU then C# with XNA or Unity3D is what you should be looking at.
I will add that if you are interested in very fast action style 2D games then avoid Flash.
Related
I was wondering about the performance of using XNA in C# for developing games and not using it. Could I not use PictureBoxes instead of 2D Textures? Is it viable to go with Windows Form programming for games, or is XNA the best solution? Any advantages/disadvantages?
The more complex your game is the less likely you'll find WinForms development sustainable. XNA is geared towards that sort of thing so why not use it?
The real question you should ask yourself is "do I want my game to run on Windows Phone 7, XBOX 360, and/or the Windows desktop?" If your answer is yes then learn XNA. The best thing is it does most of the work for you to allow you to target these different platforms.
I recommend listening to a recent podcast by Scott Hanselman on the topic: Hanselminutes Podcast 240 - Developing Indie Games for Xbox 360 and XNA with George Clingerman.
It depends on your game's graphics complexity.
If you want to learn a good library that allows to make high-end games with good graphics, use XNA; it'll open more variety to your flavor.
But if you want to make a simple non-scrolling, Tetris-like, or solitaire games, double-buffered .NET controls can do the trick.
Use XNA. Aside from having significantly better performance, better supported platforms (Xbox 360, Windows Phone), other API niceness like sound and input handling, there is one very important reason:
XNA is an "immediate" style API (as opposed to a retained one; see this description).
Developing games with this type of API is significantly eaiser. The reason being, without getting into too much detial, is that in a retained API you have to ensure the external scene stays in sync with your game state. This is tedious and bug-prone (believe me, I've done it).
If you are looking for the best performance, you shouldn't be looking at c# or XNA at all, the lower level you go the better in that regard. However, lower level means you will spend more time on the programming with less results.
XNA was developed to make game programming easy. It takes a lot of the tedious low level coding and wraps it up in nice simple methods for us to call so that we don't have to deal with reinventing the wheel, while still harnessing a very powerful framework.
I'd highly suggest if you are interested in making a game, go with XNA. I think you will enjoy it much more than the alternatives.
I've been mostly programming in C++ as of late, but to be honest I think I need something else I could use. C++ being quite low level requires much more time to make things. It would be nice to know another popular language that is easier to code in. If I were to use C# I'd probably use XNA with it as well, however I'm not quite sure about Java. I know that Java is more cross-platform than C# and that C# is pretty much in Microsoft's pocket however that doesn't bother me. I'm mostly gunning for 2D ASCII/Sprite games as opposed to 3D, however 3D is indeed something I'll eventually move on to.
I want to know what the Stack-overflow community thinks.
XNA is really easy to use for 2D games. Not only does XNA give you content pipeline management within Visual Studio, which makes managing the entire build job quite easy, the framework also sets up a basic game loop and gives you the building blocks to get started. There are plenty of getting started guides and even a growing pile of books on XNA.
XNA works with the free version of Visual Studio and XNA runs on Windows Phone and the Xbox 360 (unfortunately deploying to either of these platforms requires a $100 a year license from MS).
I am sure there are good libraries for Java as well, but I can't give you any details.
I know this was answered quite a long time ago, but on the Java side of things you could have easily used libGDX. It is totally open source and simple to learn the basics. It supports Android, IOS, Desktop (Mac, Windows, and Linux via the JVM), and HTML5. The only (small) learning curb is figuring out how to set a libGDX project up via the Eclipse GUI, but if you are a command line person (and most people here are) then this is one of the most qualified frameworks out there.
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.
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.
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!
This link seems reasonable ( if a little verbose ) - it's takes you through how to code a simple tetris-like game in c# using GDI+. I has code listings and links to download the source code.
I would start with learn a little object oriented architecture - this is a key to your ultimate success.
Then learn how to design the model - the entities in the game (characters and etc) in code
and the view - the 2D representation of them, and how to connect the two (data and command binding).
I would try using WPF and not GDI+.
The code project has a lot of good articles for beginners.
I would take a look at SDL.Net it's a pretty good games library for .NET (well a binding to a good library for the pedants ;))
It has a lot of resources on its pages right from beginner stuff to more advanced things like isometric engines etc.
It doesn't seem to have been very active for a while however what is there already is more than enough for even complex 2D games.
I just learned the basics of c++ and c#,just the simple basics of the language.And I want to pursue game programming can anyone please tell me where to start off I read somewhere that Direct-X is used for game programming and I downloaded it from Microsoft's website but I just didn't understood it.From where did you people started your game programming when you were just beginners or do I need to have a deep knowledge about the language or can I just start now, please suggest me.And I am in the first semester of my cs undergraduate degree.
Start coding now. You won't get deep knowledge without, well, coding! I'd highly recommend XNA. XNA is basically a .NET wrapper for DirectX. It is very clean and well thought out (This means C# of course).
Have fun!
From reading your comments to the original question, it would seem that you have fallen into the trap of setting your sights far too high. The game 'World of Goo' did not happen overnight. It took a long time using lots of third party libraries to do the video/audio/physics/gameplay elements and a very good working knowledge of programming in general and an understanding of the restrictions doing a game often imposes.
Now, this may seem like a negative response but the point is it is better to achieve something small than to fail at something big. Failure generally puts people off doing what they really want to do.
Byron Whitlock's advice of "start coding now" is the best advice. But, start off with something simple: a text based version of Guess the Colours for example, then some easy, non-realtime graphics like Othello / Reversi / Sliding puzzles then try something realtime like Tetris and then branch out into physics, audio, 3D and so on.
The key to becoming a great programmer is to get code finished and working (shipping is a feature!), learn from the code - see if there are better ways to do stuff and so on. Start small, finish some programs, get a morale boost, firm up your foundations and gradually add complexity from there.
Introduction to Game Programming in C++ is a good start.
Introduction to Game Programming with
C++ explores the world of game
development with a focus on C++. This
book begins with an explanation of the
basics of mathematics as it relates to
game programming, covers the
fundamentals of C++, and describes a
number of algorithms commonly used in
games. In addition, it discusses
several libraries that can help you
manage graphics, add audio, and create
installation software so you can get
started on the path to making both 2D
and 3D games.
If you want to start with C#, which is recommended for beginners, you can use XNA, which is quite simple to learn, and a good book is Beginning XNA 2.0 Game Programming: From Novice to Professional
Would you like to create your own
games, but never have the time to dig
into the details of multimedia
programming? Now you don’t have to!
XNA makes it simple to create your own
games, which will run on your PC and
Xbox 360 console. Even if you don’t
know how to program at all, Beginning
XNA 2.0 Game Programming: From Novice
to Professional will teach you the
basics of C# 2005 programming along
the way. Don’t get overwhelmed with
details you don’t need to know— just
learn what you need to start creating
your own games right now!
The fast–paced introduction to XNA and
the C# language provides professional
developers a quick-start guide to
creating a commercial product using
XNA, as well as offering home
enthusiasts or hobbyists everything
they need to begin putting together
games in their spare time. You’ll
discover and understand all the key
concepts required to create smooth,
professional–looking results in a
range of gaming genres. Every reader
will come away with a firm foundation
onto which they can build more
advanced ideas.
I would recommend getting started with XNA, if you know a little C# it is an excellent way to get into game development and learn some important concepts that will help you out with other libraries. creators.xna.com There are several videos and tutorials to walk through, and it is all free when programming for the pc.
Maybe
www.gamedev.net is the best site of resources of game programming
I do not suggest XNA for learning how to do game programming. It hides many concepts that you need to have for a solid understanding of how it works from the inside.
First, learn thoroughly how to program in C++ and to understand how the Component Object Model (COM) works since this is what you will need to use in order to call the different methods in the DirectX SDK. Once this is done, learn how to create a window with C++ in Win32. After, find yourself some books on Direct3D for DirectX 9 SDK, game engines and architecture, multithreaded applications and design patterns. I would suggest DirectX 9 Graphics The Definitive Guide to Direct3D from Alan Thorn for Direct3D. This book is not a definitive guide, but rather a very good introduction to gain a solid base. Of course the book is a bit old, but the concepts remain very similar and it will be a good reference book for later on (plus it is cheap.. your budget might be tight with everything you have to pay for university :P) . Also, look at the documentation and samples from the SDK. Oh and before I forget, you will need some notions in maths (linear and vector algebra comes to mind)!
I suggest try using Silverlight as your game platform.
Check out this site http://dobbschallenge2.com/. It has a full functioning 2D platform game engine with source code and images. You can learn how parallax scrolling works, etc.
This way you can modify the game source code and slowly learn how it works. The game engine is quite simple yet the game is fun and includes awesome soundtrack :)
Check out the torque engine. It's inexpensive and takes care of a lot of the grunt work of making your game so that you can focus on making it fun. It's inexpensive and you can code in C#.
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:
a programming language you're comfortable with. It sounds like this is C#, so stick with that.
Some way to put graphics on the screen. The .NET library can do that to some extent, but some higher level library will probably make it easier. You could use XNA or SlimDX or another Direct3D wrapper. Or you can give SDL.NET a shot. Or you can write your own. The capabilities you're going to need are pretty basic and every graphics library, 2d or 3d, will let you do it.
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.
http://www.flash-game-design.com/
http://www.tutorialized.com/tutorials/Flash/Games/1
http://blog.onemorelevel.com/?p=12
Someone mentioned Flash, which is a good suggestion, but a bit expensive. If you'd like to do some Flash/AS3 development for free, I'd recommend playing with Flixel. You'll also need FlashDevelop, which is a nice (also free) IDE. The Flixel site has a lot of good resources to get you started.
If you're thinking about pursuing a future in graphics programming, I would pick OpenGL for the following reasons:
OpenGL is implemented on Windows, Mac, Linux, and even PlayStation 3. (extremely versatile)
Once you're comfortable with 2D programming, you can move onto 3D and stay with OpenGL.
OpenGL is equally as fast in terms of performance compared to DirectX.
C++ is a part of every collegiate-level programming curriculum.*
I think employers respect knowledge of C++ more than any other language.
The learning curve may be higher, but your time will be well-spent.
* If your college doesn't have C++ as a part of their programming curriculum, you are an outlier.
From my experience it's far better writing the basis of your game first in a form of simple application (perhaps text based) and then building graphics on top of that just by trying out bits and pieces from tutorials. That way you will always have a working skeleton that you can play around with and you don't immediately complicate yourself with all the graphics calls.
Other point is motivation: if you always have a working app it's far more satisfying to watch it slowly grow and develop rather than being frustrated by constant "works/doesn't work transitions" and always awaiting all the bits to come together to form something remotely complete.
As far as engines go: DirectX and OpenGL these days are kind of engines themselves. They let you do a lot of primitive work very easily (get a model from 3ds Max and load it into your app in 1-2 lines of code), for a small game you won't need anything else.
I also agree with MunkiPhD: Flash would be a very good platform for a 2d game. It's very simple and lets you get away with all the boring graphic programming. However, ActionScript-programming is not anywhere near "heavy-duty" programming with C-family languages and proper dev. platforms. ActionScript frustrates me every time I see it.
If you want to focus on 2D games and keep using C# for now, AND be able to have your friends play your games on Mac and PC, had you thought about using Silverlight?
Using Silverlight would get around some issues such as installation.
You might try a creating a few games in Silverlight and then after getting your feet wet you'd be in a better position to decide what other tools you'd like to learn next. With Silverlight 3.0 being recently released there is actually an influx of people trying to see how far it can be pushed for gaming, which might help you get questions answered. If you decide on this route you can post here or on sites like Silverlight.net
DISCLAMER: I'm not sure what the status of Silverlight for Linux
Flixel does rock - you can get a 2D game up and running with a minimal amount of code. You can find a detailed tutorial that steps you through the process of creating a simple platform game using Flixel here.