Sony PSP Lua Programming: Getting Up and Running

Welcome to the Lua tutorials.
This series of tutorials will be aimed at the complete beginner programmer, and will teach you Lua while learning to develop small games that will run on your Sony Playstation Portable.
Before we get started there are a few things we will need. Not all are required, but it will make it easier to follow along.

  • LuaPlayer - Gotta get this, so go ahead and grab it first.
  • LuaPlayer for Windows - Saves you tons of time not having to transfer files back and forth to your PSP. We will be using this with the tutorials, so be sure to download this.
  • ConTEXT Editor - Great text editor. Highlights keywords in many languages. Not at all required. You can use Notepad or any other editor.
Using LuaPlayer For Windows
  • Extract the contents of the downloaded file.

  • Inside the folder you extracted the files to create a text file with Notepad. Inside the file type


  • luaplayer script.lua
    pause

    Save the file as script.cmd, and make sure it doesn't save with a txt extension. This is the file that will run your program on your PC. luaplayer runs the luaplayer in the folder, and script.lua is the name of our file that we will be programming in. Pause will keep the command box from closing when we get an error. This way we can debug our programs.

    Note: Some people may receive an error when clicking on their cmd file that says something along the lines of

    'luaplayer' is not recognized as an internal or external command, operable program or batch file

    If you receive this error then try putting the whole directory name that your files are in into quotes. An example would be:

    "C:\Documents and Settings\Owner\Desktop\mygame\luaplayer.exe" script.lua
    pause

  • Now create another text file with Notepad (or any editor such as ConTEXT) and name it script.lua (Note: If you get an error about script file not found when you try to run this on your psp, you may need to rename the file to index.lua). You can leave this file blank inside for now. This is the file we will code in later.
Later as we program I will ask you to run your code to test it. To run your code in LuaPlayer for Windows simply double-click on the script.cmd file you created, and it will run your program.

Writing Your First Program

Please welcome jramada, our newest member.

Who's Online: 6 Guests, 0 Users

Total Members: 555
Total Posts: 13059
Total Topics: 1480
Total Categories: 8
Total Boards: 35

Recent Posts:

Re: PGELua Help - need term for a special rotation fix (mathematical issue) by yaustar
Re: Lua Loader? by Buddy4point0
Re: Lua Loader? by osgeld
Re: Lua Loader? by acer5050
Re: Lua Loader? by bumuckl
Re: Lua Loader? by acer5050
Re: Lua Loader? by bumuckl
Lua Loader? by acer5050


Copyright © 2006-2007 www.EvilMana.com All rights reserved.
EvilMana Logo by emcp and Charlie