You are not logged in.

#26 2012-05-16 16:52:33

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

Re: [SOLVED] Best language for coding games

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)?

Let's see... Programming a video game requires two basic elements: a programming language and a media library. In my opinion, learning them are equal tasks, and many times learning a library is harder than learning a language. In fact, I often say that, when people ask what programming language they should learn next, they should actually be asking what library they should learn next. Languages share so many similarities: They all do loops and funcitons and varuables and so on. But when you want to do something specific (show an image on the screen, play background music, implement physics...) it's a library that's tricky to learn, not the language.

Every part of the game making process will be another big task that needs to be learned: The programming language, the media library, the art creation application (Blender), and so on. Consider that in the choice of video game you decide to make.

I've personally used Allegro, SDL, and PyGame. PyGame was originally the Python bindings for SDL, so in a sense they are similar, just for different programming languages. Allegro and SDL are both C libraries. I won't tell you which one I prefer because I think they're so similar that it doesn't even matter. tongue

All three of the libraries I mentioned (and I bet the ones listes above do too) have nice and simple example applications that you can read through and easily tweak.

Oh. I also tried Pyglet + Cocos2D. It's a beautifully simple library, but, after trying so hard for so long to understand it and start using it, I just could not get it and gave up. So I guess I wouldn't recommend that one. I think it's because the documentation isn't very good.

So yeah. In summary, simplicity of a language and library, documentation of a library, and a well defined and reasonable goal are important.

Offline

#27 2012-05-16 17:35:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: [SOLVED] Best language for coding games

Games are what drew me to computers in the late 1960s.  Things have changed a bit since then. 

The notion creating game animation as fledgling coder is, er, ambitious.  Projects that have static displays that are periodically updated are a more reasonable goal than a mufti-threaded, real time, 3D animated goal.

I have a prejudice against BASIC.  Whether it is the Dartmouth BASIC from the dawn of computing to whatever that thing is that Microsoft calls BASIC, they all teach and reinforce bad habits (IMHO).  This is why I lean towards Python.  It teaches objects, some functional programming, it encourages data centric thought.  it is interpreted which makes iterative experiments a bit simpler than with compiled languages.

As to projects there is a book, published in 1978, called 101 BASIC Computer Games (David Ahl) that is now available on line.  I have said I dislike BASIC, but that book might provide some worthy projects that can be ported to Python, without needing to deal with full blown GUI and graphics libraries.

Last edited by ewaller (2012-05-16 17:35:32)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#28 2012-05-17 05:52:04

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

Re: [SOLVED] Best language for coding games

OP, I just came across Flare and thought of your thread. It is C++ based and aims to produce similar games to Diablo. The README on github has more information if you're interested.

Offline

#29 2012-05-17 23:50:03

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

Re: [SOLVED] Best language for coding games

OK, I think we're going to go with python and pygame. One last question, I started my son on BASIC-256 because of this article.

http://www.salon.com/2006/09/14/basic_2/

Do you folks think these ideas have merit or should I switch my son over to python right away? I ask because of statements like:

nomilieu wrote:

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

Bellum wrote:

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

ewaller wrote:

I have a prejudice against BASIC.  Whether it is the Dartmouth BASIC from the dawn of computing to whatever that thing is that Microsoft calls BASIC, they all teach and reinforce bad habits (IMHO).  This is why I lean towards Python.  It teaches objects, some functional programming, it encourages data centric thought. As to projects there is a book, published in 1978, called 101 BASIC Computer Games (David Ahl) that is now available on line.

I noticed while looking at this last link that there are many types of BASIC, that puts me off a bit.

Thoughts?

Offline

#30 2012-05-18 01:14:20

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

Re: [SOLVED] Best language for coding games

I had a computer programming class in middle school in which we used BASIC.  In HS I wrote programs for my TI-eighty-something and worked on a robotics project with a BASIC Stamp brain.  The only things I remember from those experiences are GOTO and the need to number lines in multiples of 10 in case you needed to go back and add a line.  Today, line numbering is an anachronism and GOTO is a cuss word*.

The author of the article wrote "BASIC was close enough to the algorithm that you could actually follow the reasoning of the machine as it made choices and followed logical pathways."  As far as logic and decision making go, it seems to me that bash scripting and python can be just as educational.  But like I said, it's been a while.  The "close enough to the algorithm" bit is another story.  The control I had over the computer with those BASIC programs in middle school was more fundamental than anything I've experienced with python.  That left an imprint, and I think that's saying something.  Today though, I think the trivial things I was able to do with BASIC would seem less impressive.  If I was going to do anything with BASIC, I think something like Stamp would be more inspiring.  But then, there are programmable microcontrollers which use other languages.

In the end, ewaller says all that really needs to be said.  Whether or not the habits encouraged by BASIC are really 'capital b bad', they have no place in today's world of structured programming.  And ultimately, there's not much worse than picking up bad habits at the very beginning of one's education.

*Though I've read some interesting contemporary articles questioning the fundamentalism of structured programming.  Not one of the best, but The Religion of goto-less Programming is a fun contrarian read.

Last edited by alphaniner (2012-05-18 01:15:16)


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

#31 2012-05-18 04:57:31

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

Re: [SOLVED] Best language for coding games

Frabato wrote:

OK, I think we're going to go with python and pygame. One last question, I started my son on BASIC-256 because of this article.

http://www.salon.com/2006/09/14/basic_2/

Do you folks think these ideas have merit or should I switch my son over to python right away?

The problem with python is that there are lots of features. This makes it versatile, but also requires that a programmer learn all those features beforehand so that he can understand how to use python and python libraries like pygame. This introduces a requirement that he must learn a lot about python before he even starts making a game, or he will get confused when he encounters features he doesn't know about. BASIC only has few features so there's nothing from scaring beginners away. It would be better if someone who already knows python were to guide him.

Offline

#32 2012-05-18 05:14:01

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

Re: [SOLVED] Best language for coding games

Frabato wrote:

we live in the Phoenix area

Daedalus1 wrote:

It would be better if someone who already knows python were to guide him.

I see Phoenix has a python user group meeting next week: https://groups.google.com/group/desertp … dbbb48cfb1

Offline

#33 2012-05-18 13:41:45

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

Re: [SOLVED] Best language for coding games

Daedalus1 wrote:

The problem with python is that there are lots of features. This makes it versatile, but also requires that a programmer learn all those features beforehand

Math has a lot of features, but you don't need to learn calculus before you can balance a checkbook.  A beginner-friendly textbook is all he needs.


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

#34 2012-05-18 15:49:00

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

Re: [SOLVED] Best language for coding games

alphaniner wrote:

GOTO is a cuss word*.

Usually, but those wild and crazy GNU guys have no shame.
I was recently tweaking the echo utility (to recognize some escape codes, rather than always all or none) and was like "wtf, there are goto statements all up in their code!"

Offline

#35 2012-05-19 00:10:21

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

Re: [SOLVED] Best language for coding games

alphaniner wrote:

*Though I've read some interesting contemporary articles questioning the fundamentalism of structured programming.  Not one of the best, but The Religion of goto-less Programming is a fun contrarian read.

Can't say I disagree with the guy. I use break and continue all the time.

Daedalus1 wrote:

The problem with python is that there are lots of features. This makes it versatile, but also requires that a programmer learn all those features beforehand so that he can understand how to use python and python libraries like pygame. This introduces a requirement that he must learn a lot about python before he even starts making a game, or he will get confused when he encounters features he doesn't know about. BASIC only has few features so there's nothing from scaring beginners away. It would be better if someone who already knows python were to guide him.

I wouldn't say that's strictly true. He can learn a little at a time while still doing useful things with the language. It might be difficult for a child to teach himself, but with some guidance it should be fine.

Last edited by Bellum (2012-05-19 02:12:17)

Offline

#36 2012-05-19 00:29:42

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

Re: [SOLVED] Best language for coding games

Well I've stumble onto something that I think will be perfect.

http://inventwithpython.com/

It uses python3 and the instructions clear, simple and perfect for my son and me. So here we go...........

Offline

#37 2012-05-19 00:45:49

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

Re: [SOLVED] Best language for coding games

Frabato wrote:

Well I've stumble onto something that I think will be perfect.

http://inventwithpython.com/

It uses python3 and the instructions clear, simple and perfect for my son and me. So here we go...........

Hey, that looks good!

If you have your answer, don't forget to mark the thread solved wink.

Offline

#38 2012-05-19 02:03:24

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

Re: [SOLVED] Best language for coding games

Bellum wrote:
drcouzelis wrote:

The problem with python is...

For the record, I totally didn't say that. wink

Frabato wrote:

Well I've stumble onto something that I think will be perfect.
http://inventwithpython.com/
It uses python3 and the instructions clear, simple and perfect for my son and me.

That book is quite popular on the Python subreddit. smile

Offline

#39 2012-05-19 02:11:50

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

Re: [SOLVED] Best language for coding games

Ah, sorry, copy+pasted the wrong name. tongue

Offline

Board footer

Powered by FluxBB