Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do I need to write a small game on Linux?

Tags:

linux

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?

like image 534
Michas Avatar asked Mar 29 '10 13:03

Michas


2 Answers

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.

like image 71
Beska Avatar answered Oct 13 '22 04:10

Beska


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.

like image 44
ChristopheD Avatar answered Oct 13 '22 03:10

ChristopheD