Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411431 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 20, 2024, 03:18:20 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Alternative languages
Pages: [1] 2
Print
Author Topic: Alternative languages  (Read 8042 times)
jankoM
Level 0
***


Beat around the bushes


View Profile WWW
« on: December 28, 2007, 11:39:15 AM »

Hi, do any of you have any experiences with using a more alternative (mostly not imperative) languages for game-dev.

To name few that might be quite appropriate because of speed also... D, Ocaml, Haskell, Clean, Scala, (Forth?, Felix?).. Java (well it's not so alter)..

Ok there is another group of interpreted dynamic languages which is more common and I would use them for lighter game from processing side... python, lua, ruby, haxe, perl, (Erlang?), stackless python, io, (smalltalk?) ..

If you did, what were your experiences?

I am currently fiddling with Ocaml a little, in general the biggest issue seems the support for libraries, openGL and SDL are quite commonly accessible though...

BR
« Last Edit: December 28, 2007, 11:47:09 AM by jankoM » Logged

Ryan
Level 1
*



View Profile
« Reply #1 on: December 28, 2007, 02:13:11 PM »

Of those I've had experience with D and Java.

I'll start with Java first because it's more common than D and there isn't really much to say about it. I am forced to use Java in CS courses and I like a lot about the language, (how it handles Objects & pointers makes sense in my mind). The thing is, I'm a 'neat-freak' with code and Java has soooo many classes and soooo much "filler" that you have to write before you can get anything done. Because of this I've never really experimented with it in games, rather than just getting OpenGL on the screen with keyboard input.

I like D quite a bit. Setting up OpenGL / SDL with D didn't take very long, and it's easy to write clean code. The problem is there is very little documentation for the language, and I was always wondering in the back of my mind "is this the right way to do things?". Also, there a lot of libraries and projects on dsource.org (pretty much the place to go for all things D) that are abandoned. I think the potential is there, but it's somewhat underdeveloped / unorganized. Also, there are two standard libraries in development. Some projects need Tango, some need the default, it's confusing to me.

Also now that I'm thinking of it there are many people recently saying how awesome and rapid python + pyglet is for game development. I've downloaded a lot of projects, and all seem to run pretty damn slow (at least on boot-up) for even simple games. This is probably just due to it being interpreted, but still. I don't really like taking huge performance hits in exchange for clean code.

Finally, I'd like to put in a disclaimer. Whenever talking about languages there are always fans of a particular language who yell things like "you are doing things wrong" and "__________ isn't a problem, YOU are the problem" and such. There probably aren't really any crazies on TIGSource but I'd just like to throw that out there real quick to cover my skin. I'm a crappy programmer, my opinions are just my opinions, etc.

Finally + 1, I am working on a "language" of my own at the moment. Why I put it in quotes is basically, the process is:

my source file -> my "compiler" / error checker -> generate c++ code -> call g++ exe -> yay!

I'm interested if anyone has any experience doing this, (though I know handling things this way is pretty much just a total hack-job).

In conclusion, languages are interesting haha. Good topic.
« Last Edit: December 28, 2007, 02:15:00 PM by Ryan » Logged
spellcaster
Level 0
**



View Profile
« Reply #2 on: December 28, 2007, 03:09:07 PM »

Not sure if Python can be considered an alternative language - but it's well suited for game dev.
Logged
ravuya
Level 7
**


Yip yip yip yip yip


View Profile WWW
« Reply #3 on: December 28, 2007, 03:36:57 PM »

I've used Haskell before; the hsdl bindings are a bit of a hair-raising experience to get working, but once you do it's pretty cool. Cross-platform support was iffy.

I also tried D, but not as a game programming language.

I've used F# extensively with GL and SDL through the Tao libraries.
Logged

jankoM
Level 0
***


Beat around the bushes


View Profile WWW
« Reply #4 on: December 29, 2007, 08:48:01 AM »

yes python is not so alter for game dev. It is probably the most used dynamic lang for games (as a primary lang). I will prob. use it with pycap for some more casual game. Pyglet and Rabyyt both seemed very cool to me for not processor intensive not casual games (because they use openGL).

I am sort of a language nut myself Smiley, I haven't still really got the functional paradigm but I am slowly scraping the surface... F# is like OCaml on .NET? too bad it's for .NET

I am now jumping between using Scala (JVM) + LWJGL --or-- OCaml + it's libs for some action game similar to waterisk. D would be my first choice but I want to learn about functional concepts of programming.
Logged

Madgarden
Level 1
*


C=


View Profile
« Reply #5 on: December 29, 2007, 02:08:55 PM »

Forth rocks my socks! Syntaxless RPN, direct control of the compiler, interactive testing, each word you write is an extension of the language. If even just for the concepts, play with and learn some Forth. You'll be better off.
Logged
jankoM
Level 0
***


Beat around the bushes


View Profile WWW
« Reply #6 on: December 29, 2007, 03:39:01 PM »

Forth with it's stack approach seems something I want to at least see how it works... can you make games in forth or forth like langs -- do they have the libs needed?
Logged

ravuya
Level 7
**


Yip yip yip yip yip


View Profile WWW
« Reply #7 on: December 30, 2007, 12:13:07 AM »

There's a Forth interpreter in the Open Firmware BIOS in PowerPC Macs -- I've seen people write Pong in it before :D

Open Firmware Pong. Of course that's direct hardware access, but presumably a modern Forth interpreter will let you have access to C libraries.
Logged

Madgarden
Level 1
*


C=


View Profile
« Reply #8 on: December 30, 2007, 09:18:34 AM »

Yes, of course you can make games in Forth. There are really tons of options. You can go for Lua-like scripting-type solutions such as FICL, and hook/compile that up to whatever libs/engine you desire. I've also got my own similar Forth-like VM system that I use this way. Also, there's Win32Forth from which you can load DLL's and libraries, and turnkey your app from the IDE into a standalone executable.

If you google around for Forth and Forth-likes, you'll get a million hits. Forth is sort of an anti-language in this age of strict-syntax uber-languages, as it really just lets you mold it into whatever the hell you want. I love that about it. Smiley It's the experimenter and inventor's dream. And that's one reason there are so many flavours... people create their own dialects using the Forth concepts. Just look at languages like Factor, Joy, Cat, Raven, Retroforth, etc. Slava Pestov's Factor is quite impressive... the guy is a smart dude. Wink

Anyway, enjoy!
Logged
SplinterOfChaos
Level 3
***



View Profile
« Reply #9 on: December 30, 2007, 03:46:47 PM »

Has anyone else here hacked around in Ruby? I only dealt with it when a friend wanted to make a game with me using RPG Maker half a year ago...I wonder if he forgot...

Anyway, I thought it was a neat language. It has some features that give one the ability to make it much more natural-language programming...but all the code I've read in Ruby used the syntax to make it less natural-language. It was short and witty, but not as readable as even c++ some times!

But the syntax was quite intuitive. I really liked how you could overload operators faster than it took call them.
Logged

jankoM
Level 0
***


Beat around the bushes


View Profile WWW
« Reply #10 on: December 30, 2007, 06:28:49 PM »

I am web-dev where they talk a lot about ruby (Ruby on Rails..). I heard that ruby as a language is very interesting (even lispers say cool things about it), but I also heard many times that it is "like few times slower" than python (which is an aprox same level language) - but I can't verfy that. (python compiles to bytecode for example, I think ruby still parses text at runtime or at least did last time they talked about it, this will probably be improved in future though..)

Aha the shootout places it on 1 before last position so it is on the slow side
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all
Logged

raigan
Level 5
*****


View Profile
« Reply #11 on: January 02, 2008, 06:25:12 PM »

I'm interested if anyone has any experience doing this, (though I know handling things this way is pretty much just a total hack-job).

During our never-ending quest to avoid having to use C++ for our next game, we came across LazyC++, you might want to email the author as it seems similar (generates c++ ): http://www.lazycplusplus.com/


I would _love_ it if we could use D, however the alpha-ish-ness of GDC (which is the only way to get things running on Mac AFAIK) has scared us off for the time being.. it's at like v0.2 or something stupid. Does anyone know about cross-platform D at all? This would be my language of choice if there was a good cross-platform solution.

I tried to get Gwydion Dylan working last year to no avail.. that's another pretty interesting one I'd love to see become more friendly to use.

FreePascal/Lazarus is another interesting option I've tinkered with -- very good/easy for GUI stuff.

Has anyone tried cross-platform C#+Mono+Tao?

« Last Edit: January 02, 2008, 06:29:21 PM by raigan » Logged
Ryan
Level 1
*



View Profile
« Reply #12 on: January 02, 2008, 07:15:00 PM »

I've used Mono / Tao for SDL/OpenGl.

On the OSX side I used Mono + Tao. Everything is pretty good, except there are some SDL things that are extremely wonky and I've never figured out (having to do with how SDL_Surfaces are handled under C#). Easy to set up, though was never able to figure out how to package it properly so I could run the .app on computers without mono. (You need to bundle a slimmed-down mono .framework I think).

On the Windows side I used just visual studio express and Tao. My code worked on Mono+Tao (OSX) and VisualStudio+Tao (Vista) without having to change anything.

Cheers!

Edit: reworded last sentence better. I can't explain things.
« Last Edit: January 02, 2008, 08:21:36 PM by Ryan » Logged
oneup
Level 1
*


worth 1000points


View Profile WWW
« Reply #13 on: January 02, 2008, 07:33:18 PM »

i'm using python + OpenGL (via pyglet) for my current game cute-wars...

works quite fine so far. while the performance sure could be better, i wouldn't be developing nearly as fast as i do now.

rapid game development ftw :D
Logged
ravuya
Level 7
**


Yip yip yip yip yip


View Profile WWW
« Reply #14 on: January 02, 2008, 10:07:38 PM »

On the OSX side I used Mono + Tao. Everything is pretty good, except there are some SDL things that are extremely wonky and I've never figured out (having to do with how SDL_Surfaces are handled under C#). Easy to set up, though was never able to figure out how to package it properly so I could run the .app on computers without mono. (You need to bundle a slimmed-down mono .framework I think).
I'm also on this problem; it's the only thing keeping me from moving to Tao full time. I've actually ported most of my C++ game library to C# (with a bunch of language-level improvements) and I just keep waiting to pull the trigger on the packaging script and start working in C# full time.

I did manage to get the Mono framework down to five megs; I wrote about it here. But it seems that Unity and the like have rigged up the mkbundle tool with Mono to work under OS X, which I've never managed.
Logged

jankoM
Level 0
***


Beat around the bushes


View Profile WWW
« Reply #15 on: January 03, 2008, 06:26:16 AM »

Yay! I managed to compile sdlcaml and glcaml samples on windows... I will write a quick tutorial how to do it. I promissed it to the extension maker who was kind enought to help me a little.
Logged

Drew
Level 0
***


Hooray


View Profile
« Reply #16 on: January 03, 2008, 08:46:16 AM »

I'm another Python person.  Coming from a C background, I was really skeptical until I tried it.  Now I don't really use anything else.

Has anyone used Lisp or Scheme for game development?  I've always wanted to learn a Lisp-like language, but I know I probably would lose interest if I couldn't use it to make games. Smiley 

As far as other oddball languages go, Wings3d is written in Erlang, so that could probably work for games too.
Logged
ravuya
Level 7
**


Yip yip yip yip yip


View Profile WWW
« Reply #17 on: January 03, 2008, 08:48:31 AM »

I used mzscheme internally as a scripting language for one of my games.
Logged

Drew
Level 0
***


Hooray


View Profile
« Reply #18 on: January 03, 2008, 08:56:21 AM »

That's a good idea, I'll have to look into that.  Although, I'm sure it'll end up causing trouble  :D
Logged
raigan
Level 5
*****


View Profile
« Reply #19 on: January 03, 2008, 10:16:40 AM »

On the Windows side I used just visual studio express and Tao. My code worked on Mono+Tao (OSX) and VisualStudio+Tao (Vista) without having to change anything.

Are you using the 1.1 or 2.0 runtime? Did you have to go out of your way to get this working (i.e specifically avoid certain parts of .Net) or does Mono simply support all the parts that might be used in gamedev?
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic