Lua Player tutorial

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Lua Player tutorial

Post by Shine »

The Lua thread is getting a bit long, so perhaps it is a good idea to split it a bit for different topics. You can always click "watch this topic" on bottom of the page, if you like to be notified, when a new post was made to a thread.

This thread is for the Lua tutorial, ideas how to improve it, newbie questions etc. You can find a first version at

http://www.luaplayer.org/tutorial/index.html

It is just a start and I don't want to write it all by my own, so please contribute, I'll update it then. Later it will be a Wiki.
Last edited by Shine on Sat Aug 27, 2005 12:54 am, edited 1 time in total.
F34R
Posts: 29
Joined: Thu Jul 28, 2005 1:11 pm

Post by F34R »

GREAT TUTORIAL !

Shine,

Thank you so much. That helped explain a lot to a newbie like me. I cant wait for the other sections to be updated. You guys are a great asset to the community. Your time, and work, is appreciated.
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Post by liquid8d »

You should sticky the tutorial. Any idea when the other sections will be worked on? You guys are doing a great job!

LiQuiD8d
ksilvert
Posts: 5
Joined: Tue Sep 06, 2005 12:02 am

Post by ksilvert »

I'm pretty new to lua and was looking at a couple of the IDE's. Is it possible to use any of these to develop for the PSP? I've tried to run a couple of scripts in both LuaEdit and LuaIDE and havne't had any luck. Is it something I'm doing wrong or is it not possible to test them in the environment?

Thanks
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I've updated the tutorial at http://www.luaplayer.org/tutorial/index.html , now all sections are completed, with the base for a Pac Man game and other map-based games at the end.
User avatar
illfoundedmind
Posts: 22
Joined: Thu Nov 24, 2005 10:03 am
Location: N/A
Contact:

Post by illfoundedmind »

Shine are you actually working on the Lua Player dev? Your code for titlesets was just what I was looking for. I'm working on a full length RPG with some other people (have some free time your more then welcome to help). Thanks
illfoundedmind Production StudioImage
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

illfoundedmind wrote:Shine are you actually working on the Lua Player dev? Your code for titlesets was just what I was looking for. I'm working on a full length RPG with some other people (have some free time your more then welcome to help). Thanks
I'm working on Lua Player, when I have time, but I'm one of those strange people who likes more to write technical demos and backend code, like Lua Player itself, than a real game, but thanks for your offer.
User avatar
illfoundedmind
Posts: 22
Joined: Thu Nov 24, 2005 10:03 am
Location: N/A
Contact:

Post by illfoundedmind »

To each his own right? Lua Player is one of the best applications out there in my opinion (beats the 30 lines of C++ you'd have to do for the same results). I’m hoping for it to get some *.midi support soon ;). Good Luck to you.
illfoundedmind Production StudioImage
User avatar
illfoundedmind
Posts: 22
Joined: Thu Nov 24, 2005 10:03 am
Location: N/A
Contact:

Post by illfoundedmind »

Question (mainly for Shine)?

With using the tilesets I was wondering if you could set up a 4-layer system for each map with out over doing process limits:

- Draw bottom layer [draws tilesets that go under PC (player character). This layer does not effect collisions]
- Draw middle layer [draws tilesets that go on the same layer as PC sets collusions (player cannot occupy the same space as other objects)]
- Draw top layer [draws tilesets that go above PC (player character). This layer does not effect collisions]
- Draw event layer [calls functions for events based on player location does not draw graphics]

The map would be larger then the screen size (about 500x500 or 1000x1000) and depending on the player location it would scroll left, right, up, down. Do you think Lua Player on PSP would be able to handle that many layers (or blits?)?

(Double posting I know)
illfoundedmind Production StudioImage
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

layer1 Image.create(sizex,sizey)
layer2... etc..

Think about it
User avatar
illfoundedmind
Posts: 22
Joined: Thu Nov 24, 2005 10:03 am
Location: N/A
Contact:

Post by illfoundedmind »

illfoundedmind wrote:without over doing process limits
Think about it :wink:
illfoundedmind Production StudioImage
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

Where it says

Code: Select all

screen:save("screenshot.tga") 
it should be fixed to

Code: Select all

screen:save("screenshot.png")
Leaving it as tga results in a 1kb not-readable file.

EDIT: hmm, never mind. The TGA just can't be read by all programs I have ... :whistles:
Post Reply