QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Yeah, I guess? Dude, whats your aim or msn ^^^ And how do you do it like lowser?...

Reply
 
LinkBack Thread Tools
Old 10-04-2005, 06:37 PM   #61
Advanced PSP Coder
 
Virtue's Avatar
 
Join Date: Oct 2005
Location: Down South
Posts: 426
Trader Feedback: 0
Default

Yeah, I guess? Dude, whats your aim or msn ^^^

And how do you do it like lowser?
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR]

[B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B]

[B]Applications:
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b]

[B]Games:
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer]
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b]

[img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center]
Virtue is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 06:45 PM   #62
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

I already told you what to do.. sheesh!

Pm me and I'll send you the folders.

Last edited by Bilo; 10-04-2005 at 06:48 PM..
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 06:48 PM   #63
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by Virtue
Yeah, I guess? Dude, whats your aim or msn ^^^

And how do you do it like lowser?
Although I have it I don't use AIM often. If you still want to know It's MagicianFB.

Also I have no clue, although I've been trying to figure it out.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 06:51 PM   #64
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

No... what you do is -

1. Get a hold of something else that uses it (half of the lua apps in the files section)
2. Rename the folders to what you like
3. Delete everything but the eboots in each folder.
4. Paste all of your files and your lua script into the folder without the %
5. Edit the eboot in the % folder to include you own image/title (using PBP unpacker)
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 06:56 PM   #65
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
I already told you what to do.. sheesh!

Pm me and I'll send you the folders.
Poor Bilo, if only everone listened...
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 07:00 PM   #66
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

Indeed! ^

And I just wrote the steps for you on how to get your icon on the game list
so that you can launch your app from there.

*bow*
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 07:00 PM   #67
Advanced PSP Coder
 
Virtue's Avatar
 
Join Date: Oct 2005
Location: Down South
Posts: 426
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
No... what you do is -

1. Get a hold of something else that uses it (half of the lua apps in the files section)
2. Rename the folders to what you like
3. Delete everything but the eboots in each folder.
4. Paste all of your files and your lua script into the folder without the %
5. Edit the eboot in the % folder to include you own image/title (using PBP unpacker)
I don't remember you telling me, but thanks.
__________________
[center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR]

[B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B]

[B]Applications:
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b]

[B]Games:
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer]
[URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b]

[img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center]
Virtue is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 07:01 PM   #68
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

^ no probs
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2005, 10:44 PM   #69
 
Join Date: Sep 2005
Posts: 3
Trader Feedback: 0
Default

First time coding a game with physics and first time using lua. I am trying to get a 2d collision detection working in lua, i only need rect/rect detection so i don't need anything too fancy. Are there any examples written in lua script? I have been reading

http://www.harveycartel.org/metanet/...tutorialA.html

but as his source code is flash/action script i can't look at it.

I really need a lesson in 2d geometry more than a collision detection example in lua but a lua example would be so very helpful.

Any starting links? pointers? source code?
PaulMyo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 08:28 AM   #70

Developer
 
SodR's Avatar
 
Join Date: Sep 2005
Location: Sweden
Posts: 941
Trader Feedback: 0
Default

Sorry to post my question again but how do I get a text when I push a button to not disapear after I have released the button??

Code:
System.usbDiskModeActivate()

white = Color.new(255, 255, 255)

while true do
screen:clear()

pad = Controls.read()

if pad:cross() then
screen:print(20, 18, "1", white)
end

screen.waitVblankStart()
screen.flip()

end
SodR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 08:39 AM   #71
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

screen.waitVblankStart()
screen.flip()

that should be after your text to make it stay... I think..

if pad:cross() then
screenrint(20, 18, "1", white)
screen.waitVblankStart()
screen.flip()
end
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 08:47 AM   #72
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

*.xm files play in lua..so it seems

I thought only wav's did.
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 10:06 AM   #73
 
lingon's Avatar
 
Join Date: Sep 2005
Posts: 122
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
um...

if pad:triangle() then
mainmanu()
end

Something like that, main menu being a function previously set.
Ahaa...Okay thanks alot!
lingon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 10:18 AM   #74
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

^ No probs

Hope everything goes well.
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:08 AM   #75
 
lingon's Avatar
 
Join Date: Sep 2005
Posts: 122
Trader Feedback: 0
Default

Well yeah... I ain't the one to complane =) Besides, what Does "()" actually do?

Last edited by lingon; 10-05-2005 at 11:28 AM..
lingon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:27 AM   #76
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
*.xm files play in lua..so it seems

I thought only wav's did.
I've never heard of .xm
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:28 AM   #77
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

Quote:
Originally Posted by lingon
Well yeah... I ain't the one to complane =)

BTW is anyone here gonna signe up for that team looAh thing, I would if were a bit better at programming.

Probably not.

I spend most of my day at work going between C and Actionscript so I dont think I'd like to be spending the rest staring at lines of lua.

It gets boring after a while ya know?

Although.... my game will be out in a couple of days I like it.. maybe someone else will
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:30 AM   #78
 
lingon's Avatar
 
Join Date: Sep 2005
Posts: 122
Trader Feedback: 0
Default

lol, I'm sure you get tired of it after a while...Lookin forward to your game.
lingon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:31 AM   #79
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

Quote:
Originally Posted by MagicianFB
I've never heard of .xm
Extended Modular files

.xm files are game sound files.
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 11:31 AM   #80
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
Probably not.

I spend most of my day at work going between C and Actionscript so I dont think I'd like to be spending the rest staring at lines of lua.

It gets boring after a while ya know?

Although.... my game will be out in a couple of days I like it.. maybe someone else will
I'm working on an rpg.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 12:07 PM   #81
 
lingon's Avatar
 
Join Date: Sep 2005
Posts: 122
Trader Feedback: 0
Default

If I for exampel wanna define
Code:
 if pad:cross() then
		screen:blit(0, 0, lua, false)
		screen:print(50, 218, "Detta programm skapades utav Carl R den 2 Okt.", svart)
		screen:print(50, 228, "2005 enbart i inlärnings syfte.", svart)	
		screen:print(220,170, "[]: Avsluta", svart)
		screen.flip()
as one whole thing, as example "a" then how would I do that?
lingon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 12:07 PM   #82

Rock Star
 

 
Join Date: Aug 2005
Location: CT| FW: 4.01 M33-2
Posts: 11,844
Trader Feedback: 0
Default

sorry, i dont quite understand your question..
__________________

TeamOverload is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 12:09 PM   #83
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

Quote:
Originally Posted by lingon
If I for exampel wanna define
Code:
 if pad:cross() then
		screen:blit(0, 0, lua, false)
		screen:print(50, 218, "Detta programm skapades utav Carl R den 2 Okt.", svart)
		screen:print(50, 228, "2005 enbart i inlärnings syfte.", svart)	
		screen:print(220,170, "[]: Avsluta", svart)
		screen.flip()
as one whole thing, as example "a" then how would I do that?

do you mean set it as a function? that can be called or do you mean use this within an if?

To make it a function just say

function nameoffunction()


and declare it before you try and call it
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 01:21 PM   #84
 
lingon's Avatar
 
Join Date: Sep 2005
Posts: 122
Trader Feedback: 0
Default

I mean it like its declared by Bilo I think. I wanna be able to just type a short command and it will do that with the pad:cross thing. So thanks again Bilo and ofcourse TeamOveload for caring. =)
lingon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 01:36 PM   #85
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

^ no probs buddy
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 01:39 PM   #86

Developer
 
cools's Avatar
 
Join Date: Aug 2005
Posts: 472
Trader Feedback: 0
Default

well more troubles sadly :cry

Lua will only load the first part of my script, which displays text... It wont load any thing after that.

black = Color.new(0, 0, 0)
screenrint(200, 130, "Board", black)
screen.flip()
while true do
screen.waitVblankStart()
end

board = Image.load("boardnew.png" )
screen:blit(0, 0, board, false)
screen:flip()
while true do
screen:waitVblankStart()
end
__________________

PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
http://www.cools.biaklan.com
Currently Working on ?????

Quote of the Week

Last edited by cools; 10-06-2005 at 01:57 PM..
cools is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 02:19 PM   #87
 
Dremth's Avatar
 
Join Date: Jul 2005
Location: Round Rock, TX
Posts: 31
Trader Feedback: 0
Exclamation Entering Text

How can I make something where the user enters text? Like on the PSP when you click on a text box the dialog comes up that has the letters and numbers like on a cell phone. Is there a way to get that?

PLEASE PLEASE PLEASE EMAIL ME!!!!!!
Dremth@austin.rr.com
Dremth is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 02:42 PM   #88
 
Bilo's Avatar
 
Join Date: Sep 2005
Location: In your garage
Posts: 73
Trader Feedback: 0
Default

Quote:
Originally Posted by cools
well more troubles sadly

Lua will only load the first part of my script, which displays text... It wont load any thing after that.

Code:
black = Color.new(0, 0, 0)
screen:print(200, 130, "Board", black)
screen.flip()
while true do
screen.waitVblankStart()
end

board = Image.load("boardnew.png")
screen:blit(0, 0, board, false)
screen:flip()
while true do
screen:waitVblankStart()
end

Code:
board = Image.load("boardnew.png")
screen:blit(0, 0, board, false)
black = Color.new(0, 0, 0)
screen:print(200, 130, "Board", black)
screen.flip()
while true do
screen.waitVblankStart()

end
That should work ^

Last edited by Bilo; 10-05-2005 at 04:49 PM..
Bilo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 02:46 PM   #89
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by Dremth
How can I make something where the user enters text? Like on the PSP when you click on a text box the dialog comes up that has the letters and numbers like on a cell phone. Is there a way to get that?

PLEASE PLEASE PLEASE EMAIL ME!!!!!!
Dremth@austin.rr.com
I'll try and make one...
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2005, 03:17 PM   #90

Developer
 
cools's Avatar
 
Join Date: Aug 2005
Posts: 472
Trader Feedback: 0
Default

Quote:
Originally Posted by Bilo
Code:
black = Color.new(0, 0, 0)
screen:print(200, 130, "Board", black)
screen.flip()
board = Image.load("boardnew.png")
screen:blit(0, 0, board, false)
screen:flip()
while true do
screen:waitVblankStart()
end
That should work ^
I did that, but the text goes away when the pictures load. I want the Text and the Pictures to show up at the same time. Thanks Anyway... :sad:
__________________

PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
http://www.cools.biaklan.com
Currently Working on ?????

Quote of the Week
cools is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
code , lib , lua , luaplayer , noobs , programming , psp programming , scripting , thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 12:16 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us