Want to be a developer?
OK, so its holiday time and you don’t have much to do. I know the feeling. And then you’ve been thinking of learning a programming language. Maybe you just want to port that childhood game to the PSP. Or maybe you want to be famous, and even submit a program to our Summer Homebrew Coding Contest. Fret not! The PSP community can always use new and eager developers. But there’s always one problem – Where do you start? And I know, it’s pretty overwhelming for a newbie to jump into developing stuff.
But wait! Before you go planning something as awesome as Callisto in your lonesome, there’s a lot of help available, if you know where to look. And during the course of this article, you’ll learn a lot of things which you should know if you want to get into development. Firstly, you should decide the language you want to program in. Mainly, there are two ways to program: you can either make ‘binary’ programs, or ‘scripts’.
Read the full article after the jump!
OK, so its holiday time and you don’t have much to do. I know the feeling. And then you’ve been thinking of learning a programming language. Maybe you just want to port that childhood game to the PSP. Or maybe you want to be famous, and even submit a program to our Summer Homebrew Coding Contest. Fret not! The PSP community can always use new and eager developers. But there’s always one problem – Where do you start? And I know, it’s pretty overwhelming for a newbie to jump into developing stuff.
But wait! Before you go planning something as awesome as Callisto in your lonesome, there’s a lot of help available, if you know where to look. And during the course of this article, you’ll learn a lot of things which you should know if you want to get into development. Firstly, you should decide the language you want to program in. Mainly, there are two ways to program: you can either make ‘binary’ programs, or ‘scripts’.
A Binary program is compiled C/C++/Assembly language code (and other languages that need to be compiled.) YouÂ’ll have to learn either of those languages and set up the PSPSDK to compile your code. It will look a bit complex at first, but if you stay put, the payoff is much bigger. On the other hand, a Script is basically a text file with some code which is interpreted by an interpreter. Lua is one such example. The Lua player is nothing but an interpreter which interprets your Lua scripts. Another good example would be Python. There is a python interpreter available for the PSP, so if youÂ’ve already learned some python, how about having a go?
Now donÂ’t get me wrong. IÂ’m not an elitist. But if I were to recommend you a programming language, it would be C/C++. Yeah, so you heard Lua is much easier and itÂ’s much faster to convert your ideas into code. But if you seriously want to make something worthwhile, C/C++ is what you should learn. On the contrary, if youÂ’re only doing this for the summer and want to pass some time, you should go with Lua. YouÂ’ll be making small applications and games in no time!
Now’s the time to decide. Think hard and think clearly. Development can be a lot of fun. But it can also be hell! Scared? Don’t be. There’s a wealth of info for newbies. And I’ll get to them in a bit. Firstly, let me list some of the differences between Lua and C, the 2 major ‘PSP development’ languages.
– | C/C++ | Lua |
Pros | Fast. Small Executables. Creativity limited only by the SDK. | Easy to learn. No need to compile code. Inherently Open Source, unless you compile the script with Lua Player. |
Cons | Difficult for newbies. Need to install/setup the PSPSDK. Code is complex and can be overwhelming for first-timers. Closed Source- Checking for code-theft is difficult. | Bigger attachments since you need Lua Player on the PSP. Creativity limited by the Lua Player. Things like Movie playback can’t be done (yet). |
Remember that itÂ’s still a small list. You can still learn C/C++ even if youÂ’re a newbie and you can make a lot of good stuff even with Lua. But looking at that list, one thing is clear. If youÂ’re serious and want to make applications – like PimpStreamer or IR Shell – , C/C++ rules. If you want to make games, Lua is a lot more convenient. By now, IÂ’m sure that youÂ’ve decided which way youÂ’ll go. Now the next thing is finding your feet in all the mess.
If youÂ’ll go with C/C++, hereÂ’s whatÂ’s important for you. If youÂ’d rather go with Lua, skip directly to the Lua section below.
C/C++: If youÂ’ve developed using either of these languages, then youÂ’ll know one thing. Get your basics right! And donÂ’t get frightened by big pieces of code. If youÂ’re reading someone elseÂ’s code, make sure to read the comments, and read the code one function at a time. When writing code, please please remember to comment. ThereÂ’s nothing more annoying than coding something, returning the next day and not remembering why you inserted that piece of code. Trust me, it happens to the best of us.
YouÂ’ll find a lot of tutorials online. Listing all of them would be a foolish thing to do. Remember one thing though, Google is your friend.
Lua: Lua is pretty much what you should be using if you want to make games. Since size doesn’t matter, and you should be putting more time into the ‘front end’, Lua can make the development process a lot easier. Plus, the fact that most of the homebrew games are made using Lua should sound encouraging. Anything from a simple Tetris clone to a full-blown RPG can be made, so don’t worry about hitting the ceiling.
OK, so you know what you’re gonna be doing for some time. Now here are some ‘PSP-specific’ programming resources where you’ll be spending your time:
PSP-Programming.com – Really, the only site you’ll need if you want to learn C/C++ programming for PSP. It contains everything from the start (Installing/Setting up the PSPSDK) to helping you on your way (Sound, GUI Tutorials)
PS2DEV Forums – Serious people. Serious questions. If you’re a veteran programmer and can’t find help on other forums, this is the most likely place where you’ll find it.
PSPUpdates Development forum – Our own development forums. Go ahead, post questions or progress updates. Our forum members will be happy to help you out.
Just a small tip from me: Please donÂ’t be afraid to ask for help, granted that youÂ’re actually trying to learn something. Asking for pre-written code is bad. You should rather have a go yourself, and if you canÂ’t figure it out, post a question in the forums. And donÂ’t be afraid to read. Reading is good!