Teen Programmers Unite  
 

 

Return to forum top

Conway's Game of Life

Posted by split [send private reply] at April 19, 2003, 07:23:46 PM

A friend and I are planning to write a version of Conway's game of life because he is really into celluar automata stuff. He doesn't have any experience programming really and I was wondering what the best language for this would be.

We will be using Windows 98 or XP, so Win32. It would be nice to stay away from the Win32 API because it is so complicated (especially for someone who, like I said before, has had no prior programming experience.) Do you think Java would be best for this? C/C++ in graphics mode? Are there any more elegant languages for this project?

Thanks for any help.

Posted by Neumann [send private reply] at April 19, 2003, 11:19:31 PM

Don't touch C/C++, that's all I can recommend. Any other higher-level language will do: Java, C#, VB.NET, Smalltalk, Delphi, VB, SML, OCaml, Lisp, Scheme, etc.

Java and C# are probablement the easiest languages to learn in the bunch since they can both be considered as subsets of C++.

Posted by split [send private reply] at April 19, 2003, 11:58:04 PM

Alright, the list of recommended high-level languages is good, but what kinds of things would I use for the graphics in these langs? I know with the ones that use GUIs such as Delphi, VB, Java, C# etc you could do it inside a dialog box/window, but what about the others (scheme, SML, etc)? Which have the best support for this kind of thing?

-Split-

Posted by Neumann [send private reply] at April 20, 2003, 01:06:11 AM

Okay. Here is my revised list:

Java, C#, VB.NET, Delphi, VB, Ada, Smalltalk, Python, Perl, Scheme, Haskell

All those languages have implementations that supports well Win32 GUI and can do graphics nicely.

SML, Scheme, OCaml, Haskell and Lisp

Implementations of those language minimally provide an interface to the Tk GUI library, which is alright for simple GUI app but I'm not sure how well it performs for graphics. Writing apps using the Tk library usually make your application portable altough it may also be the case for language I listed above. That depend on the implementation and the module the programmer use. (Example: Python has a Win32 module but you can use the portable TkInter GUI based on Tk)

You might also check:

http://www.libsdl.org/languages.php

That's the SDL Languages page, listing all implementations of the SDL Graphic library in quite a few languages.

[If I'm wrong on any infos I provided please someone correct me.]

Posted by buzgub [send private reply] at April 20, 2003, 05:51:31 AM

If it were me, I'd be using python with pygame.

That's every inch two cents, by the way.

Posted by rafik_rezzik [send private reply] at April 20, 2003, 11:22:48 AM

I agree with buzgub. Pygame would be good. It uses the SDL library with Python. Both are very simple. I myself have only used SDL with C, but I would imagine it would be even easier to use it with Python. Plus when your done with the game us Linux users can try it out :)

Rafik

Posted by split [send private reply] at April 20, 2003, 12:38:05 PM

I would use Python if it would get rid of the annoying indentation instead of parenthesis idea. It's quite painful for me to use it with anything other than the included IDE. Nevertheless, I've narrowed it down to either Python or Java. Any further comments would be appreciated.

Posted by Neumann [send private reply] at April 20, 2003, 01:59:00 PM

Compiled Java is faster than Python. But you could use a Python to C translator called Psyco. It's on SourceForge. I'm not sure how it'll work with graphics and such though...

Beside, with Vim or Emacs, Python identation is probably no big deal.

Both Java & Python should be portable to other platforms.

Posted by gian [send private reply] at April 21, 2003, 08:26:37 AM

Nearly any program with autoindentation (eg. gedit, jedit, vim, emacs, ultraedit, kate and so on) all make doing python quite allright. I too had reservations about a language which uses whitespace as a control structure, but I had it explained to me like this:

"You indent your code and use braces, so why not just drop the braces and keep the indentation?". It makes sense.

Posted by regretfuldaydreamer [send private reply] at April 21, 2003, 11:45:19 AM

I'd go for Java.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.