What language/API should I use?

Started by
11 comments, last by DevFred 15 years, 5 months ago
My problem relates to several programming languages, and it's a beginner problem, so I found this section the most appropriate to post this thread in. I want to start developing small games so I can experience common game developing problems and learn new things about game development. Until recently I've been using XNA for my game development needs, because C# is my main language and XNA is easy to use and has a large community for support. But it got it's limitations. First of all, if I want to let my friends test my games, they have to install the XNA redistributable and the latest .NET framework. It's not a big problem, but I don't like making my friends install things they probably won't use just to see my experiments. apart from that, XNA makes me feel limited for reasons I won't bore you with. *I have considered moving to C++ and have learned to use it, but it's still a bit complicated for me. *I also know Java, but I couldn't find any good 2D APIs for it. *Python with PyGame is the third option. But after using C-like syntax languages for so much time Python feels extremely unfamiliar and I don't want to waste my time on syntax issues. On the API side of the problem, I have looked at SDL, DirectX and OpenGL. *I've heard OpenGL is a bit complicated and isn't suited for 2D game development. *SDL looks good for 2D development, but I couldn't find any good Windows game developed with SDL, so I figured DirectX is a better option as long as I'm developing for windows. *DirectX is a good option because all my friends have it installed anyway. But I couldn't find any good tutorials for 2D game development with DirectDraw, which looks like the 2D part of DirectX to me. As far as I can tell, people use Direct3D for 2D development. is this correct? So, after all the useless information here's my question: What do you suggest I use for game programming, C++, Python or Java? and if I go with C++, which API should I use? P.S.: I'm an open source supporter. If OpenGL or SDL are as good as DirectX, I'll prefer using them over DirectX.
Advertisement
Quote:Original post by SaiaGo
*Python with PyGame is the third option. But after using C-like syntax languages for so much time Python feels extremely unfamiliar and I don't want to waste my time on syntax issues.

Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.
Quote:Original post by SaiaGo
P.S.: I'm an open source supporter. If OpenGL or SDL are as good as DirectX, I'll prefer using them over DirectX.
Good for you but OpenGL is not anything vaguely resembling open source.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by Sneftel
Quote:Original post by SaiaGo
*Python with PyGame is the third option. But after using C-like syntax languages for so much time Python feels extremely unfamiliar and I don't want to waste my time on syntax issues.

Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.


Eventually at least.

Redistribution issues are not really enough to disrupt your learning if you think you've still got progress to go beyond 'experiments'. IMO and everything; stick with C#. If you really dislike XNA, try slimDX. It's got its own downsides though. Everything does.
Quote:Original post by Sneftel
Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.


I guess you're right. I'll try to use Python a bit more to get familiar with it.

Quote:Original post by Promit
Good for you but OpenGL is not anything vaguely resembling open source.


What I meant was that it's cross platform, so I can use it with an open source operating system.

Quote:Original post by Telastyn
Redistribution issues are not really enough to disrupt your learning if you think you've still got progress to go beyond 'experiments'. IMO and everything; stick with C#. If you really dislike XNA, try slimDX. It's got its own downsides though. Everything does.


SlimDX looks like a very good alternative. I'll check it out later.
SlimDX is subject to basically identical distribution issues as XNA 3.0, for what it's worth. Both are vastly better than earlier versions of XNA though, and arguably much better than native C++ though, which require much bigger redistributables. The DirectX redist is like 70 MB if you don't customize it yourself, and you almost certainly need the Visual C++ redist as well. Compare to 22 MB for the .NET Framework 2.0, and a little under 8 MB for either XNA 3.0 or SlimDX.

[Edited by - Promit on November 22, 2008 5:41:33 PM]
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
You might want to have a look at the Ogre3D rendering engine http://www.ogre3d.org/

It's written in C++ but there are existing solutions for using it with other languages like Python or C#.

With it you can easily switch between OpenGL and DirectX. It abstracts that away from you.


Then, I want to comment on one thing. You mentioned you don't want to make your friends install redistributables. Well, you can create an installer for your game and integrate the redistributables into that. So your friends only need to start one installer and it will install the required components. You can (should) streamline such a thing so that there are a minimum number of steps in the installation, show one EULA screen only, and do not ask confirmation from the user if DirectX/XNA/whatever should be installed, because you know they should be, so just install them without bothering the user at all.

It's a sure thing that the installer size will go up somewhat. But it is up to you if it is acceptable or not. Let's say that the total size of the installer is 100 MB, and possibly 20 MB of it are the redistributables. 20 % is not too much imho, for the added convenience and reduced complaints that your game doesn't work (because people didn't install something). For a game which is 10 MB, it would be harder to accept the redistributables in the same installer but it's your choice, do you want to provide as smooth as possible experience for the people who want to play or not. Increasing the size of the package from 10 to 20 or to 40 MB might not be significant at all even though the redistributables would take more space than the game itself. Most users likely will not notice what exactly was in the installer so they don't care about the game / redistributables ratio.

If you need to integrate for example the DirectX redistributable into your game's installer, you can strip a lot of the files out from the redistributable Microsoft gives to you. Read about it from MSDN. An example I can give is that an installer which does not require that the user has some version of DirectX already installed, can go down from 83.2 MB to 16.4 MB by stripping out all files which are not needed for this particular 3D game.
Quote:Original post by Sneftel

Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.


Achooo, sorry I'm allergic to bullshit. Python is just the latest flavor of the decade language. C/C++ has been around for like 40 years, for a reason. That said, python has its uses, but I wouldnt say that its better than C/C++ for games. Sure, you can develop games in it, but then you can develop games in LOLCODE, so capacity doesn't justify its use.
Quote:Original post by abachler
Quote:Original post by Sneftel

Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.


Achooo, sorry I'm allergic to bullshit. Python is just the latest flavor of the decade language. C/C++ has been around for like 40 years, for a reason. That said, python has its uses, but I wouldnt say that its better than C/C++ for games. Sure, you can develop games in it, but then you can develop games in LOLCODE, so capacity doesn't justify its use.


Have you ever used Python - or similar, dynamic, languages? Have you seen the invisible shackles C++ puts around you? It is another Blub language.

That said, I still kind of like C++. C++ is an odd language IMO, beautiful yet ugly, powerful but weak.

Remember always: the right tool for the job. C++ is not always the right tool, even when just talking about games.
Quote:Original post by abachler
Quote:Original post by Sneftel

Wwwwow. You need to learn Python. A programmer who is a slave to the C syntax is an ineffective programmer.


Achooo, sorry I'm allergic to bullshit. Python is just the latest flavor of the decade language. C/C++ has been around for like 40 years, for a reason. That said, python has its uses, but I wouldnt say that its better than C/C++ for games. Sure, you can develop games in it, but then you can develop games in LOLCODE, so capacity doesn't justify its use.


You missed the point...

The suggestion was not to use Python because it's better for games, it was that avoiding python because you (the OP rather) don't want to learn a new syntax is a dangerous stance. Programmers inherently become better when they know different syntaxes. It allows them to think of problems more abstractly, and to describe a problem in the language that best describes the problem.


And don't give us that 'for a reason' crap. We've been over that thoroughly before.

This topic is closed to new replies.

Advertisement