You are not logged in.

#1 2012-05-15 04:00:24

Frabato
Member
Registered: 2007-10-24
Posts: 267

[SOLVED] Best language for coding games

Hi All,

My son has been learning BASIC-256 and he's interested in writing games. Can someone recommend a programming language useful for that purpose. He's young so easier would be better than harder but he's quite determined so I'd be interested in knowing what people are using nowadays as the hot gaming language.

Thanks

Last edited by Frabato (2012-05-19 01:14:40)

Offline

#2 2012-05-15 04:30:52

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [SOLVED] Best language for coding games

We had a thread on this recently: https://bbs.archlinux.org/viewtopic.php?id=139643

There's no simple answer. No single programming language is either sufficient or necessary.

Does your son already have a concept for a game, or is this more about selecting skills for a future career?

Offline

#3 2012-05-15 05:37:26

Daedalus1
Member
Registered: 2011-11-17
Posts: 24

Re: [SOLVED] Best language for coding games

For a beginner writing 2d games, python2 would probably be the best choice. Since it is interpreted you can see what the code does in real time which would be more hands-on learning. The syntax is also very easy and straightforward to learn.

http://docs.python.org/tutorial/
http://eli.thegreenplace.net/2008/12/13 … me-part-i/

You could also use PyGTK to make games since all you really need for a 2d game is a way to draw graphics. The tutorial below comes with a snake game tutorial at the end.

http://zetcode.com/tutorials/pygtktutorial/
accompanying python tutorial:
http://zetcode.com/tutorials/pythontutorial/

He could also learn Java if he is really serious about game programming, it already comes with all the libraries so it's a batteries included type of deal, and libraries are easily included as they come packaged as .jar files instead of needing includes and linking which can get confusing with a compiled language such as C or C++.

http://zetcode.com/tutorials/javagamestutorial/

I'd recommend the zetcode tutorial on PyGTK so he can learn how to make GUI programs as well as games. Python is a good "gateway language" to more advanced languages, and it's useful for scripting so it has it's uses even if he moves on to the next tier.

Last edited by Daedalus1 (2012-05-15 05:45:38)

Offline

#4 2012-05-15 05:45:10

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [SOLVED] Best language for coding games

I agree that python is a good idea. For 3D games, you can use something like Python-Ogre. Learning python also transfers to other disciplines if the game programming interest proves short-lived.

Offline

#5 2012-05-15 06:21:56

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: [SOLVED] Best language for coding games

Like I did in the other thread, I will suggest Löve or PyGame, both are using scripted interpreted languages and both have strong communities which offers lots of help and examples.

löve: https://love2d.org/
lua based 2d game framework with builtin physics (running atop of Box2d)
tutorials: https://love2d.org/wiki/Category:Tutorials
(look in the forums for tons of games/demos in the .love file format which is simply a renamed .zip containing source code and graphics/sound)

pygame: http://www.pygame.org/news.html
python based 2d game framework which wraps around SDL
tutorials: http://www.pygame.org/wiki/tutorials

Offline

#6 2012-05-15 17:41:26

Frabato
Member
Registered: 2007-10-24
Posts: 267

Re: [SOLVED] Best language for coding games

/dev/zero wrote:

We had a thread on this recently: https://bbs.archlinux.org/viewtopic.php?id=139643

There's no simple answer. No single programming language is either sufficient or necessary.

Thanks for that link, there was a lot of information and even though I'm not a programmer it helped me to get some perspective on the languages that are out there.

/dev/zero wrote:

Does your son already have a concept for a game, or is this more about selecting skills for a future career?

He does have a concept for a game, he knows the number of worlds and levels, the basic story line, he has drawn a number of the characters, and he knows the basic behaviors and powers of the good guys and the bad guys. He does not have a clear concept of what it takes to make his ideas a reality though computer progamming. So, I'd say that it's about selecting skills for a future career (or hobby), or in his case, a current obsession.

Thanks to all of you for your replies. I think that I have a different perspective on my original question and so I will rephrase it. What would be the easiest and fastest way for my son to code a game that actually does cool stuff. At first I thought that I would just have him buckle down and go to the low level stuff, but he's a kid and I think that a better approach would be to have him see results, and I think that that would motivate him to get into the more esoteric stuff later on, should he care to.

Offline

#7 2012-05-15 19:26:22

bananaoomarang
Member
Registered: 2009-10-29
Posts: 180

Re: [SOLVED] Best language for coding games

Certainly Python with Pygame would be good for starting out right now, Love looks awesome to, though I find Python easier to read than Lisp, just a personal opinion.

Also, perhaps HTML5 canvas + JS if he wants to get more adventurous! Less material out there for learning though.

As for 'best for coding games', industry standard is C++, don't introduce him to C! He'll never want to code again wink

Offline

#8 2012-05-15 19:31:56

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Best language for coding games

Frabato wrote:

At first I thought that I would just have him buckle down and go to the low level stuff, but he's a kid and I think that a better approach would be to have him see results, and I think that that would motivate him to get into the more esoteric stuff later on, should he care to.

I realized a few years ago that my hobby isn't "making video games". Instead, it's "programming video games". In the former, there's more focus on creating a fun game, creating the graphics, and doing everything as simply and easy as possible with the single goal of having a finished video game. In the latter (the one I enjoy), I don't care that in the past 12 years I've never finished making a video game. I enjoy tinkering with fairly low level graphics engines, implementing simple physics, and seeing the game come together one small piece at a time. I enjoy the programming.

I mention this because I feel that it's important not to confuse the two interests. I used to get a bit depressed because I never finished making a video game, even though I had fun working on them. tongue

So! If your son is interesting in programming a video game, something like Python and PyGame will do fine (the last game I was working on was Python 3 with PyGame). If your son is, instead, interested in just drawing and throwing the things together to have a fun game to play around with, there are many options, especially for Windows. It could even be by making a Flash game.

Offline

#9 2012-05-15 19:51:48

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: [SOLVED] Best language for coding games

Even GUI tools designed for beginners require quite a bit of work and dedication to do anything substantial. There's no real way around it. But for a kid, Game Maker might be a suitable solution. I played around with it some back in High School. It's got a click-and-drag GUI for beginners, which translates pretty straightforwardly into a scripting language for more advanced beginners. Actually, I've seen a small handful of projects come out of Game Maker that are pretty sophisticated. It's a Windows application, unfortunately, but I believe it works in wine.

A native Linux alternative might be the Illumination Software Creator, but I'm less familiar with it.

Offline

#10 2012-05-15 21:04:23

nomilieu
Member
Registered: 2010-07-03
Posts: 133

Re: [SOLVED] Best language for coding games

How old are we talking about here? If ten or so (or younger), I'd say stick with BASIC for now. I used to write fun little games with QBasic when I was that age. It's well-suited for one-man projects, in my opinion.

Python is nice language, and useful as well (unlike BASIC).

Offline

#11 2012-05-15 21:32:35

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: [SOLVED] Best language for coding games

I'd say Python is at least as easy to use as BASIC is.

Offline

#12 2012-05-16 01:09:34

Daedalus1
Member
Registered: 2011-11-17
Posts: 24

Re: [SOLVED] Best language for coding games

Frabato wrote:

Thanks to all of you for your replies. I think that I have a different perspective on my original question and so I will rephrase it. What would be the easiest and fastest way for my son to code a game that actually does cool stuff. At first I thought that I would just have him buckle down and go to the low level stuff, but he's a kid and I think that a better approach would be to have him see results, and I think that that would motivate him to get into the more esoteric stuff later on, should he care to.

Sadly there is no easy and fast way to do cool stuff while being as easy as BASIC. The only step up from BASIC that I can think of that would be easy to learn and use is python. The more concepts he learns, the more cool things he can do.

The only thing I can see that might scare your son off python is that there is a lot of setup overhead for a young person. He has to learn how to create a window, learn what classes and objects are, how to load images, etc.

He can have a simple window with loaded images and key presses very quickly if he uses the pygame library with python. Here is a simple tutorial:
http://talk.maemo.org/showthread.php?t=56028

It looks like it is about a game running on a phone but python is cross platform so you can ignore that and follow the tutorial on linux or whatever. Just install python2 and pygame for him.

Python would be a great tool for introducing kids to game programming but unfortunately there doesn't seem to be many materials geared towards children of that age. It would be easily fixed if there were a simple python library that isn't object oriented and only teaches relevant functions kids would need, and a tutorial with kids as the target audience.

Last edited by Daedalus1 (2012-05-16 01:19:21)

Offline

#13 2012-05-16 05:46:13

Frabato
Member
Registered: 2007-10-24
Posts: 267

Re: [SOLVED] Best language for coding games

Thanks to everyone for the thoughtful replies. It looks like many are in agreement that python might be a good step up from BASIC-256. I did some reading but I would appreciate some clarification on which version to use, python, python2 or python3 (I really don't understand how significant the differences are). As companions to python many things have been mentioned: blender, allegro, SDL, PyGame, Löve, SFML, Python-Ogre and PyGTK. Any thoughts on which of these might be the easiest to deal with, (or none)?

Daedalus1 wrote:

For a beginner writing 2d games, python2 would probably be the best choice.
You could also use PyGTK to make games since all you really need for a 2d game is a way to draw graphics.Python is a good "gateway language" to more advanced languages, and it's useful for scripting so it has it's uses even if he moves on to the next tier.

That sounds pretty good.

bananaoomarang wrote:

Certainly Python with Pygame would be good for starting out right now, Love looks awesome to, though I find Python easier to read than Lisp, just a personal opinion.

Thirty five years ago when I was at university studying music composition, one of my music teachers was also teaching a class on Lisp (lots of irritating silly parentheses) I took the class and for the good of all I decided to stick with music. Actually, I've been enjoying learning BASIC-256 with my son, maybe, after all these years I should take another look at Lisp.

drcouzelis wrote:

I realized a few years ago that my hobby isn't "making video games". Instead, it's "programming video games". In the former, there's more focus on creating a fun game, creating the graphics, and doing everything as simply and easy as possible with the single goal of having a finished video game. In the latter (the one I enjoy), I don't care that in the past 12 years I've never finished making a video game. I enjoy tinkering with fairly low level graphics engines, implementing simple physics, and seeing the game come together one small piece at a time. I enjoy the programming.

Very good point, I've noticed that even though my son constantly thinks (and talks) about the details of his game creation, he seems to also enjoy just playing with BASIC-256. I also can relate to this as a composer, thinking and conceptualizing about the organization of sound has brought me as much pleasure as finishing a composition. Process rather than goal orientation.

Daedalus1 wrote:

He can have a simple window with loaded images and key presses very quickly if he uses the pygame library with python. Here is a simple tutorial:
http://talk.maemo.org/showthread.php?t=56028

It looks like it is about a game running on a phone but python is cross platform so you can ignore that and follow the tutorial on linux or whatever. Just install python2 and pygame for him.

I looked at it briefly and it looks promising for someone at my (his) level.

Thanks again to all of you for taking the time to enlighten an otherwise clueless person, drifting aimlessly on the sea of mysterious computer stuff.
I'm retired and there are only 6 more days of school here (we live in the Phoenix area and they have to stop the school year in May, otherwise the children would end up being just little charcoal blobs on the playground) so I'll have lots of time to work with my son through the summer.

Thanks

Offline

#14 2012-05-16 05:52:16

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: [SOLVED] Best language for coding games

Frabato wrote:

Thanks to everyone for the thoughtful replies. It looks like many are in agreement that python might be a good step up from BASIC-256. I did some reading but I would appreciate some clarification on which version to use, python, python2 or python3

I don't think pygame has been ported to python3. The version in [extra] depends on python2, anyway.

Offline

#15 2012-05-16 07:08:38

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: [SOLVED] Best language for coding games

python-pygame-hg in the AUR is for python 3.2.

Should also be installable with

pip3 install Pygame

.


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#16 2012-05-16 10:30:41

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: [SOLVED] Best language for coding games

Frabato wrote:

I did some reading but I would appreciate some clarification on which version to use, python, python2 or python3 (I really don't understand how significant the differences are).

They're very similar. Python 3 is probably (barely) easier, but it has fewer available modules. I'd recommend python 2 to start.


Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM

Offline

#17 2012-05-16 13:11:54

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Best language for coding games

Yurlungur wrote:
Frabato wrote:

I did some reading but I would appreciate some clarification on which version to use, python, python2 or python3 (I really don't understand how significant the differences are).

They're very similar. Python 3 is probably (barely) easier, but it has fewer available modules. I'd recommend python 2 to start.

I'll offer another opinion: The Python developers recommend using Python 3, unless a module you need is only available for Python 2, in which case use Python 2. Since PyGame exists for Python 3 (I use it), I would recommend Python 3.

...That said, Yurlungur is right. They're really not that different, especially to a beginner (like me). tongue

To further clarify your question: "Python 2" refers to the branch that is currently at version 2.7, and "Python 3" refers to the branch that is currently at version 3.2. "Python" refers to the language in general. "python", the application, is a symlink to "python3" on Arch Linux. Arch Linux is a little unique in that the "official" version is Python 3. Most distributions still use Python 2.

Last edited by drcouzelis (2012-05-16 13:12:52)

Offline

#18 2012-05-16 13:54:55

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Best language for coding games

Frabato wrote:

which version to use, python, python2 or python3

Zed Shaw, creator of the Learn Code the Hard Way series, had this to say about Python 3:

"It's disingenuous to tell people that Python3 is the future when it is largely a marketing and technological failure and most of the people advocating it don't even use it all the time."

That's no moldy quote either, he wrote it less than 24 hours ago.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#19 2012-05-16 14:32:10

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Best language for coding games

Oh, yeah? Well, Dusty wrote a book about Python 3, and he thinks it is the future!

...but on a more serious note, where is that quote from? I couldn't find it. Also, how do you feel about it personally? For example, do you think the developers will eventually "give up" on Python 3?

On a less serious note, do you believe in God? Because I think we are going to Heck for HIJACKING THIS THREAD. wink

Offline

#20 2012-05-16 15:27:48

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Best language for coding games

The quote is from a response to a reader in the discussion area here.  Sort the comments by newest first.

I'm inclined to favor Python3 myself.  In particular, I think P3 is the better path for this situation.   It seems like he'd be better off "learning forward" rather than back.  I just posted the quote to give the OP another perspective on the issue.

Thanks for the link btw.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#21 2012-05-16 15:54:43

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Best language for coding games

Thank you for the link. After reading a bit more, I found out Zed Shaw states his opinion very bluntly in his (rather popular I think) book on Python programming:

A programmer may try to get you to install Python 3 and learn that. You should tell them, "When all of the python code on your computer is Python 3, then I'll try to learn it." That should keep them busy for about 10 years.

I understand his point, although I think he has a rather poopy attitude about it. tongue Who will write Python 3 code if everyone waits until everything is Python 3 code?

Anyway, regardless if it's 2 or 3, I think Python would be a good next step after BASIC (as was mentioned), and would allow young programmers to experiment and learn pretty quickly and easily. I just gave my daughter her first desktop computer, and I checked to make sure it had Python (or any programming language) on it. It'll probably be a while before she might be interested in trying it, since she's less than two years old... big_smile

Offline

#22 2012-05-16 16:10:05

nomilieu
Member
Registered: 2010-07-03
Posts: 133

Re: [SOLVED] Best language for coding games

Another important thing to note, is to make sure your son has access to the code of some other simple games.
When I was younger, I used a Zelda-esque hack-n-slash game as an example of how to build a tile-based RPG engine.

Heck, even tweaking the existing game could be fun and educational.

Offline

#23 2012-05-16 16:16:19

Frabato
Member
Registered: 2007-10-24
Posts: 267

Re: [SOLVED] Best language for coding games

drcouzelis wrote:

Oh, yeah? Well, Dusty wrote a book about Python 3, and he thinks it is the future!

alphaniner wrote:

I'm inclined to favor Python3 myself.  In particular, I think P3 is the better path for this situation.   It seems like he'd be better off "learning forward" rather than back.

While a toss of the coin might do just as good a job as my rational mind in making a decision on this, I'll say that I like the forward learning idea. And, if it turns out that python3 sucks hard, the issues can always be addressed in python4, after all, Windows 7 was preceded by Vista.

Frabato wrote:

As companions to python, many things have been mentioned: blender, allegro, SDL, PyGame, Löve, SFML, Python-Ogre and PyGTK. Any thoughts on which of these might be the easiest to deal with, (or none)?

Any thoughts on this one, anyone?

drcouzelis wrote:

On a less serious note, do you believe in God? Because I think we are going to Heck for HIJACKING THIS THREAD. wink

Relax, this is a minor offence, that's why I invented purgatory.

Thanks to All

Offline

#24 2012-05-16 16:33:05

Frabato
Member
Registered: 2007-10-24
Posts: 267

Re: [SOLVED] Best language for coding games

nomilieu wrote:

Heck, even tweaking the existing game could be fun and educational.

Yes, some of the games have level editors (I know it's not code but it's tweaking none the less) and that really piqued my sons interest, right now he's into the chipw level editor for tile-world. Anyone know of any other good ones?

Offline

#25 2012-05-16 16:49:43

nomilieu
Member
Registered: 2010-07-03
Posts: 133

Re: [SOLVED] Best language for coding games

I'm long out of the loop on the game scene, so I can't think of any cool ones with relatively easy level editors. (I was originally talking about code, but you raise a good point.)

It depends on what kind of games he likes. Most RTS games will have nice map editors which are easy to use. FPS map editors tend to be more complex, but can be rewarding to master (I have made some JK2/JKA maps with minor success, back when people actually played those games).

As for RPGs, there are tons of toolkits on the internet, but I haven't looked at any of them in years. If he's into interactive fiction, there are some text adventure systems as well. (I think there are some links on the Wikipedia page) Those are nice as you can design an entire game without having to code (much, if any) or draw graphics.

I think it would be healthy to experiment with the toolkit sort of stuff, map editors and such, (to get some encouraging immediate results) and also to code (for more control and personal satisfaction).

Last edited by nomilieu (2012-05-16 16:52:16)

Offline

Board footer

Powered by FluxBB