Posted Jun 20, 2006 at 02:12AM by Pranav T Listed in: Homebrew Development, How-To, Opinions & Analysis Tags: Lua, Google, Python, Lua Player
Ó

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’.

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!


Permalink  |   Email this  |   Linking Blogs   |   Digg It!

Bookmark / Find this article on:


25 Comments


Sort by:
   by no (Unregistered) - 2006-06-20
 » no

noooo

   by RaiderX - 2006-06-20
 » nice

good informative article

   by lukahn - 2006-06-20
 » A good use of my spare time

Sounds good, can't wait til exams are over so I can give it a go.

   by zx-81 - 2006-06-20
 » good article !

Keep it up Pranav :)

   by J-Bee (Unregistered) - 2006-06-20
 » -

where can i download the program for c++? nice article btw

   by slompen (Unregistered) - 2006-06-20
 » dev-cpp

http://www.bloodshed.net/devcpp.html

this is a good IDE for c++, and its free if that was what #5 ment. =)

   by Nietzsche - 2006-06-20
 »  .

And this article just happens to be posted while their summer coding competition is going . . .

   by youresam - 2006-06-20
 » .

"Open Source, unless you compile the script with Lua Player."

Even if you do that, you can view the source code in notepad ;)

   by Advertising -
   by hua ha ha ha (Unregistered) - 2006-06-20
 » I want 2

Why don't we have a contest about Flash Game ?
Cuz, 2.60+ can't play any homebrew
PS. I'm just a person who play FW 2.71

   by A Hero - 2006-06-20
 » What about Flash Programming?

I just updated my PSP to 2.71 because I liked the idea of being able to use the Macromedia Flash Player. I have been looking all over for websites that have tutorials on how to program in flash for the PSP but I haven't have any outstanding results. If any Flash veterans like JoeySmith could point me in the right direction, that would be great. Thanks.

   by ultimax - 2006-06-20
 » eh?

i didn't know that you can compile LUA scripts...

   by ' (Unregistered) - 2006-06-20
 » '

/ /( . )( . )

   by ????? (Unregistered) - 2006-06-20
 » Help please!

I wanna learn how to code & stuff like that, but i don't understand how to do it. I downloaded it from the website that #6 posted. Can anyone give me a website where it can tell me how to code & read coding, or can some tell me how? please?

   by Zettablade - 2006-06-20
 » LUA and Flash == Crap

Don't even begin promoting that gay ass lua! c/c++ all the way. it's teh bombshell!
And you posted one good site, but it's not good enough to teach you c/c++.
www.cprogramming.com is the best place. literally. it's perfect! Go there, study just c, then read yeldarbs tuts. Don't ask for help on qj, ask for help at www.psp-programming.com. that's the only place that isn't to snobby to help or to noobish to understand.

   by eggwonder - 2006-06-20
 » ...

well pspprogramming.com is not just for C/C++ it also is there for flash and lua help(not that i promote either of them) just thought i would be nice fyi to the person who wrote in the article "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)"

p.s: just out of curiosity... which language is better for net apps. lua or C?

   by fdove (Unregistered) - 2006-06-20
 » ....

it is goooooood!!
but where can i learn?

   by x (Unregistered) - 2006-06-20
 » learning is bad

ignorance is bliss

   by Advertising -
   by question (Unregistered) - 2006-06-20
 » Umm..

Is it possible to connect to the internet via wifi with lua? I haven't run into any apps so far that can.

   by Soulkiller (Unregistered) - 2006-06-20
 » To #22

Yes netlib would be a good example

   by Appleseed629 (Unregistered) - 2006-06-20
 » In PSP-Programming.com...

I'm reading the first tutorial page right now, but I can't seem to find the toolchain from ooPo that's dated 20051202. Can somebody help me find it? Because other toolchains don't seem to work as whta it says in the tutorial.

   by gamer (Unregistered) - 2006-06-20
 » great!

I tried to learn coding, but ... kinda give up, i guess this is my motivation to try again?

   by xsouthpole - 2006-06-21
 » Can I convert from a different coding to LUA?

I am serious about this. I have made a few games myself. 2 of them happen to be RPG gmaes. Called Time Path. I made them using RGSS-RTP coding language. I was wondering, since LUA and RGSS seem somewhat similar, is there a way someone can help me convert these games into a LUA game? They are honestly good. You can go to my website to try them out. However, you will need a console, which is included in the download of Time Path 1.

Time Path 1- My first ever attempt at making a game. I admit, a few minor graffical and sprite screw ups. (Honestly, I did'nt know how to use sprites at this point). All sprites and models are based entirely off of the engines standard package. However, it has a great storyline and alot of time was put into it. After playing it for about 30 min., you will get the groove of the storyline and will be asking for more. Like I said, a few glitches here and there( probably wont run into any after the first mission). I have been thinking of making a revised Time Path I game. After you gety past the first mission, it will just get smoother. Remember that, and dont put the game down for its glitchey and badly made first mission! There are a total of 9 missions! Average time to beat the game would be 5-6 hours. Great storyline.


Time Path II Demo- Since development for this awesome (as said by players) game has been on hold, I need suggestions. It has a survey at the end of this demo. The demo is a sequel to Time Path I, and it is a staggering improvement. Now that I had experience 38 hours working on Time Path I, I am more experience. Alot of custom models used in this game. Really original. The difficulty was raised alot, you start on Level 50 to continue from the last game. New ultimate moves added. It is on the hard side to beat the demo, but, it IS possible. No graffics problems whatsoever, no texturing issues, new customized theme and all! One major glitch has been found. Remember this for when you play, Dont go north after you have already awaken Retricula from its eternal sleep! This game was well put together, and takes in memory and movement puzzles as an added storyline effect. The puzzles should not be all that hard however. Better from experience. Dont just skip to this game, you wont understand the deep engaging storyline. Average time to beat this demo, 45 min. to an hour.


With all that been said. Go to my site at

clik.to/xremix

and click on the Flash Bros. link at the bottom. I am head of the Flash Bros.(i think there is another team named that, if it is, we are not that team, we are a team that creates pc games). Once there, scroll down to the bottom right corner, and there are the downloads! I would appreciate feedback! You can also e-mail me at bnd1@aol.com

   by ENSTEIN (Unregistered) - 2006-06-21
 » toolchain

#24, u dont need that PARTICULAR one, just download the latest.

   by god (Unregistered) - 2006-06-21
 » god

i own the internet

   by punejap (Unregistered) - 2006-10-03
 » no one is gonna answer this but....

what about tiff?



Featured Content
QJ.NET Blog Network RSS Feeds
MyQJ Feed / PDA
MyQJ RSS / PDA
Blog of Blogs Feed / PDA
QJ.NET RSS / PDA
Gaming Consoles Feed / PDA
Nintendo DS RSS / PDA
PlayStation 3 RSS / PDA
PSP Updates RSS / PDA
Wii RSS / PDA
Xbox 360 RSS / PDA
PC Gaming Feed / PDA
Age of Conan RSS / PDA
Games for Windows RSS / PDA
MMORPG RSS / PDA
Tabula Rasa RSS / PDA
World of Warcraft RSS / PDA
Science Feed / PDA
Science RSS / PDA
Technology Feed / PDA
Apple RSS / PDA
Gadgets RSS / PDA
iPhone RSS / PDA
Mobile RSS / PDA
Photography RSS / PDA
Tech RSS / PDA
Add QJ.NET
Add to My Yahoo!
Google Reader Subscribe with Bloglines
Add  to your Kinja digest Subscribe in NewsGator Online
Subscribe with Pluck RSS reader Add 'www.qj.net' to Newsburst from CNET News.com
Subscribe with SearchFox RSS del.icio.us www.qj.net
Add to Technorati Favorite! Add to My AOL
furl! it Stumble for Treehugger!

 Username: 
 Password:
Forgot password
New user registration



Poll
Which is the greatest handheld of all time?
Categories

Emulators
Titles
Archives