gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > C or not C?

#30893 - Johna - Sun Dec 05, 2004 9:43 pm

Dumb question, yet the answer is just so I know, as I am a C programmer anyways, but would anyone be able to tell me if I should aim to program my AGB games in C, or instead use say Java or Perl??

I don't want to use a WYSIWYG system, as that's cheating, so come on anyone know what's better to use?
_________________
Do you want me to cook that or not?

#30895 - pyros - Sun Dec 05, 2004 9:49 pm

C!!

I don't think you'll find a java or perl gba compiler.
I guess there may be a java2arm compiler somewhere, but it's hardly a practical solution.

You could also use Dragon Basic, or straight Arm Assembler.

#30898 - sajiimori - Sun Dec 05, 2004 10:21 pm

There's nothing inherently impractical about Java on GBA, but you'll need library support for operations that require direct hardware access. Didn't somebody get it working already?

Perl is a monster... I don't know why anybody would want to program games in it. But feel free to try it out. Not sure how portable the implementation is.

I'd suggest looking into Lua for a higher level supplement to C. It's light, it's very easy to tie into a C engine, and its coroutines really bring game development to a new level.

#30948 - Johna - Mon Dec 06, 2004 4:06 pm

LOL, agree with the Perl, shock here- I tried that before I went to C, glad I did move to C in the end. Perl's a bugger to learn!
I guess I'll leave Java for now.
_________________
Do you want me to cook that or not?

#30960 - SmileyDude - Mon Dec 06, 2004 5:46 pm

I'm a big fan of using the usual C/C++/Asm mix on the GBA, but I tend to write a lot of code to pre-process assets before putting them on the GBA. I used to write that code in C, but now I'm switching over to Python for that kind of code instead. Very flexible, cross-platform, and fun to code in as well. I highly recommend it.

As for using it on the GBA, I've never actually tried. But, due to the limited memory of the GBA, I would probably avoid languages that use garbage collection. But, that's just me ;)
_________________
dennis

#30972 - sajiimori - Mon Dec 06, 2004 7:20 pm

There are some major problems with using Python on GBA, but garbage collection is not one of them.

It's a big language.

It emphasizes extension rather than embedding. That is, Python wants to be "in charge" rather than a subordinate to a lower-level engine.

It's extremely dynamic. Compilation basically amounts to pre-parsing. Try using a debugger to trace an addition sometime.

It allocates lots of things on the heap, e.g. the results of additions. (Does it use fixnums under a certain range? I seem to remember some very small number that it can hold as an immediate.)

#30999 - Lupin - Mon Dec 06, 2004 11:35 pm

I wonder when people will start trying to write HTML+JavaScript on the GBA.... prolly when i finished my Internet Explorer GBA port... =)
_________________
Team Pokeme
My blog and PM ASM tutorials

#31054 - Johna - Tue Dec 07, 2004 12:31 pm

You would think the guys making the AGB WinOS would make a IE, or well Firefox for it. Mod a linkup cable with a USB to network via your PC and there you are online with your AGB! Hmmm, saying that didn't the old GBC have an IR port that in Japan (only, I believe) have some online games? I know about 2 years back there was a talk of making a telnet for the AGB for MUDs and other MMO games.

There was once on Realms of Kaos's forums talk of someone making a verson of the game for the AGB. Who knows maybe we'll see Everquest on the AGB with online gaming next ;)
_________________
Do you want me to cook that or not?