views:

146

answers:

5

I want to make a simple game: 2d, single-player, without tons of animations and special effects. I am not interested in ready to use game engines, I want to learn to write some code in a quite universal language. I am using Linux (AMD64) and looking for something easy with nice library for games. I do not want to mix few languages, most of them are in fact fast enough themselves for my needs. Cross platform would be an advantage, however all I need is a good Linux support.

I have been considering few solutions.

Ruby
+ Language looks very nice.
+ I am going to learn Ruby.
- I am afraid I can have problems with additional libraries.
- This thread about game libraries for Ruby could be longer.

SDL + C
+ It is used for games.
+ It is very easy to set up.
+ There is a lot of additional libraries.
+ It is cross-platform.
- The solution is quite low level.
- The language is sometimes quite hard to read.

QT + C++
+ It is very easy to set up.
+ The standard QT libraries supports everything I can possibly need.
+ It is cross-platform.
+ The documentation is good.
- The compilation is slow.
- The language looks horrible.
- The size of standard QT libraries is too big to comprehend.

Environment of web browser
+ I am going to learn something more about this environment.
+ It is somewhat used for games.
+ It is quite cross-platform.
- It would be too much experimental.

Java
+ It is used for games.
+ The standard Java libraries supports everything I can possibly need.
+ It is cross-platform.
- It is quite hard to set up.
- The size of standard Java libraries is too big to comprehend.
- The source code in Java could look better.
- I think I do not want to learn Java.

Google Go
+ I am going to learn Google Go.
- There is big problem with libraries.
- The solution would be quite low level.

Python
+ It looks some people do games in Python, according to this thread.
+ It looks there are probably more libraries than for Ruby.
- The Ruby language looks better.
- I think I do not want to learn Python.

C++ + something else
+ It is used for games.
+ It would be probably cross-platform.
+ There is a lot of libraries.
- I do not need C++ extensions over C.
- Compilation could be slow, there are fast compilers for C, not for C++.

Haskell
+ I am going to learn Haskell.
- Many things about programming computer games looks too much imperative.
- It looks I can have some problems with libraries.
- Compilation (GHC) looks slow.

There is probably something more to consider. Does anyone have experience in making small games for Linux in non mainstream solutions? Does anyone have an advice for me?

+7  A: 

This may not be exactly what you were looking for but I would say this is what you need most: "stop planning, start building."

You're trying to compare A to B to C to D, when you apparently don't really know any of them as well as you want.

Start by picking one of them that you want to know (say Ruby, since it's at the start of your list), and start trying to do what you want. You will partially succeed, and partially fail, and both of these outcomes will contribute both the programming knowledge you want, and you'll either finish your game, or gain enough knowledge that you can make an educated choice about moving to another platform.

Beska
It sounds inefficient but will save you time in the long run, trust me (and Beska).
Ricket
+5  A: 

Some Python recommendations (I seriously think you will not regret it as a language choice ; given your needs):

Pygame would be terrific for writing a small game (especially for 2D). Good (community based) support, documentation, examples, cross-platformness for free...

If you want to go 3D Ogre3D may be worth a look.

ChristopheD
But neither of these suggestions fits with what he wants. He doesn't want a game engine, or 3D.
Beska
Pygame isn't exactly a game engine...
ChristopheD
@ChristopheD: Fair enough.
Beska
A: 

there are fast compilers for C, not for C++

This isn't quite right. Rather, there are features of c++ which make for slow compilation. Write c-like c++ and you get just as fast compilation as if you had written plain c in the first place. That's one of the advantages of c++.

Not that a really recommend this, and serious c++ people will wince if you do.

dmckee
There are Tiny C Compiler and Clang.
Michas
+1  A: 

Python + PyGame.

MK
A: 

Working in a browser with Javascript and HTML5 is actually not experimental! Since the canvas element was introduced, you can use it to just draw into the browser. A game loop can be implemented by Javascript timers.

With Javascript and HTML5, you can built cross-plattform games without any framework (though you might want to use jQuery or the like for convenience).

About the canvas element:

http://diveintohtml5.org/canvas.html#divingin

hendrik
The canvas is quite stable. Local storage (file access), hardware acceleration, sound and so on are not.
Michas
Good point. But simple 2D games with sound are quite possible (I've done that myself). But yes, <audio> is not well supported by all browsers (Firefox and Safari work fine, Chrome is buggy) and <embed> has its own limitations.But Javascript has a cool future as the Quake2 Javascript port clearly points out.http://code.google.com/p/quake2-gwt-port/
hendrik