Coding a PS2 Program

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
XAN
Posts: 17
Joined: Thu Jul 15, 2004 7:08 am

Coding a PS2 Program

Post by XAN »

What programming language should I learn to program a program for the PS2? C or C++ is the only ones I can find tutorials on.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

There are only C and C++ compilers here, so...
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Although you may never use it, learn as many langauges as you can. They all help in some manner, regardless of what language you finally use to write your program. I know assembly langauge for dozens of CPUs, and dozens of low-level to high-level languages. It all helps in the end.
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

I'll echo what J.F. said. Too much knowledge is never a bad thing. C and C++ are fairly low-level languages, so it's easy to write horrible code in it if you have no idea of software engineering.

Every computer language, like every human language, is different. Some concepts are easier to describe in one language than another, and knowing more languages helps you "think outside the box." Some differences are more subtle (C++ vs. Java), others are much more profound (C vs. Prolog).

All that being said, C is probably the most powerful language you can use, aside from assembly -- there's almost nothing you *cannot* do with C. But understanding concepts from other languages -- like closures (in Lisp), rendezvous (in Ada), and interfaces (in Java) -- can help you write better code in C.

Don't know if you can learn anything useful from Visual Basic though ;-P

And don't dismiss assembly, either: not only is it the *most* powerful language (and consequently the most tedious), understanding what's going on beneath the covers is extremely valuable. I've worked with many programmers with no knowledge of assembly; consequently, they're completely clueless about how awful the code they're writing is ;-) It's valuable to examine the asm that the compiler generates to learn what's going on, either by disassembling the object files, or having the compiler generate the asm directly. Especially on a platform like the PS2, where the main processor isn't the fastest, you need to know what kind of code you're generating before you can even *think* about optimization.

You see this ignorance all over the place when programmers jump from one language to another. I've worked with Java programmers who have to work in C++, and create way too many useless classes (rather than a callback function), since that's the only way you can do certain things in Java. Or Perl programmers who only use Java's Vector and Hashtable structures (when a LinkedList or TreeSet would be more appropriate), since these are the only data structures Perl supports.

Another cliche to throw in is "When all you have in your toolbox is a hammer, everything looks like a nail." You should try to have as diverse a toolbox as you can. However, as pixel noted, currently the only thing you be able to use ATM for the ps2dev environment is C/C++, so I'd recommend you learn it...
Post Reply