Zeige Ergebnis 6.001 bis 6.030 von 10238
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; help plz any i need to port the bible to LUA...
-
03-08-2007, 11:41 AM #6001QJ Gamer Green
- Registriert seit
- Jan 2007
- Ort
- beside my PC
- Beiträge
- 520
- Points
- 6.446
- Level
- 52
- Downloads
- 0
- Uploads
- 0
help plz any i need to port the bible to LUA
-
03-08-2007, 01:43 PM #6002QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
so... whats your problem... post code or something
Geändert von myschoo (03-08-2007 um 01:55 PM Uhr)
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
03-08-2007, 02:07 PM #6003Developer

- Registriert seit
- Oct 2006
- Ort
- San Diego
- Beiträge
- 177
- Points
- 4.205
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Ok
So what do you need help with? Lua's pretty easy to figure out.
Zitat von ai3gtmc
-
03-08-2007, 02:52 PM #6004.info

- Registriert seit
- Jun 2006
- Ort
- ACT, Australia
- Beiträge
- 1.674
- Points
- 15.395
- Level
- 80
- Downloads
- 0
- Uploads
- 0
If you have it in .txt format, use this code
Zitat von ai3gtmc
y = 10
file = io.open("bible.txt","r")
for line in file:lines() do
y = y + 10
screen
rint(100,y,line,white)
end
file:close()
-= Double Post =-
GIMME GIMME GIMME!!
Zitat von Access_Denied
Geändert von Yongobongo (03-08-2007 um 02:53 PM Uhr) Grund: Automerged Doublepost
-
03-08-2007, 03:11 PM #6005lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
He doesnt have it no more Yongobongo, i already asked :P
ai3gtmc- if you really want to port it, Learn LUA.
-
03-08-2007, 05:18 PM #6006.info

- Registriert seit
- Jun 2006
- Ort
- ACT, Australia
- Beiträge
- 1.674
- Points
- 15.395
- Level
- 80
- Downloads
- 0
- Uploads
- 0
Oh poo.
-
03-08-2007, 11:11 PM #6007
- Registriert seit
- Dec 2006
- Beiträge
- 32
- Points
- 3.782
- Level
- 38
- Downloads
- 0
- Uploads
- 0
is there than nobody dat has it? or can make it?
-
03-08-2007, 11:25 PM #6008lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
If you know C you can make it, Just edit LUA Player's source.
-
03-08-2007, 11:29 PM #6009.info

- Registriert seit
- Jun 2006
- Ort
- ACT, Australia
- Beiträge
- 1.674
- Points
- 15.395
- Level
- 80
- Downloads
- 0
- Uploads
- 0
Thats the problem - i have little knowledge of C
And luaplayer is C++
-
03-09-2007, 01:02 AM #6010words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Heh... Id bewilling to quickly implement flashing capabilities. If you use it the wrong way, your fault. Atleast it'd teach you not to go poking around where you dont belong.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-09-2007, 01:03 AM #6011.info

- Registriert seit
- Jun 2006
- Ort
- ACT, Australia
- Beiträge
- 1.674
- Points
- 15.395
- Level
- 80
- Downloads
- 0
- Uploads
- 0
SG, check your pm plz ;)
-
03-09-2007, 02:50 AM #6012QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
yeah do it :) thx! :)
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
03-09-2007, 07:10 AM #6013QJ Gamer Bronze
- Registriert seit
- Sep 2006
- Ort
- Denmark
- Beiträge
- 664
- Points
- 9.316
- Level
- 64
- Downloads
- 0
- Uploads
- 0
If the end of my menu code looks like this:
... and im going to add another function, let's say USB Connect, would it look like this?if menustatus == 1 then
screen:clear()
screen:blit(0, 0, menu)
screen.flip()
if pad:cross() then
press
lay()
screen
rint(130,130, "The test worked!", white)
screen.flip()
end
end
if menustatus == 2 then
screen:clear()
screen:blit(0, 0, menu2)
screen.flip()
if pad:cross() then
press
lay()
screen.waitVblankStart(60 )
dofile("credits.lua")
end
end
if menustatus == 3 then
screen:clear()
screen:blit(0, 0, menu3)
screen.flip()
if pad:cross() then
press
lay()
screen.waitVblankStart(60 )
System.Quit()
end
end
if menustatus <= 0 then
menustatus = 3
end
if menustatus >= 4 then
menustatus = 1
end
if menustatus == 1 then
screen:clear()
screen:blit(0, 0, menu)
screen.flip()
if pad:cross() then
press
lay()
screen
rint(130,130, "The test worked!", white)
screen.flip()
end
end
if menustatus == 2 then
screen:clear()
screen:blit(0, 0, menu2)
screen.flip()
if pad:cross() then
press
lay()
screen.waitVblankStart(60 )
dofile("credits.lua")
end
end
if menustatus == 3 then
screen:clear()
screen:blit(0, 0, menu3)
screen.flip()
if pad:cross() then
press
lay()
screen.waitVblankStart(60 )
System.Quit()
end
end
if menustatus == 4 then
screen:clear()
screen:blit(0, 0, menu4)
screen.flip()
if pad:cross() then
press
lay()
screen.waitVblankStart(60 )
SystemUsbDiskModeActivate ()
end
end
if menustatus <= 0 then
menustatus = 4
end
if menustatus >= 5 then
menustatus = 1
endMy PSP Projects:
___________________
None.
-
03-09-2007, 08:30 AM #6014lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Thanks!
Zitat von SG57
That will be awesome!
-
03-09-2007, 12:00 PM #6015QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
its:
Zitat von gameo
and use CODE not QUOTE, or atleast disable smiliesCode:System.usbDiskModeActivate()
[1 Year QJ Member]
[LUA Coder and C Learner]
[Ball Revamped Clone v0.1]
[Phil's Shooting Range v0.3]
[HideFile PRX v2]
[SSR PRX v1.1]
-
03-09-2007, 01:50 PM #6016QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
if you do it plz send me a copy, i was going to learn C to do this when i got the dreeded psptoolchain on my comp....but i hnever could get it installed right, even following the tuts....ill keep trying tho
Zitat von SG57
-
03-09-2007, 04:08 PM #6017
yea i could never get all the c stuff to work ever either
i thought i finally got it once but no
-
03-09-2007, 07:30 PM #6018QJ Gamer Blue
- Registriert seit
- Jan 2007
- Ort
- U.S.
- Beiträge
- 405
- Points
- 7.014
- Level
- 55
- Downloads
- 0
- Uploads
- 0
Yeah it's really annoying..I haven't been successful yet.
-
03-09-2007, 07:58 PM #6019
if i create a function in one script, can i use that the function already created in a different script?
-
03-09-2007, 09:56 PM #6020QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
i think so if you put=
in the new different scrpit that doesnt have the function that you madeCode:dofile(yourscriptnamehere.lua)
-
03-09-2007, 10:29 PM #6021words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Everyone wanting flashing capabilities in Lua, look at the thread i created that has a modded lua player for it.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
03-09-2007, 10:58 PM #6022.info

- Registriert seit
- Jun 2006
- Ort
- ACT, Australia
- Beiträge
- 1.674
- Points
- 15.395
- Level
- 80
- Downloads
- 0
- Uploads
- 0
Thanks so much SG57!
-
03-10-2007, 05:01 AM #6023
anyone have a link to a good tutorial on using the 3d gu?
-
03-10-2007, 06:30 AM #6024
thanks sg57!
and by the way, i have released my newest version the super mario bros. portable, so check the forum for that as many of you already have. thanks!
-
03-10-2007, 07:17 AM #6025
Searching through this thread, I found an old post by Yaustar with this bit of code:
Code:RED_COLOUR = Color.new( 255, 0, 0 ); SQUARE_POLYGON = { { RED_COLOUR, -0.5, 0.5, -1.0 }, { RED_COLOUR, 0.5, 0.5, -1.0 }, { RED_COLOUR, 0.5, -0.5, -1.0 }, { RED_COLOUR, 0.5, -0.5, -1.0 }, { RED_COLOUR, -0.5, -0.5, -1.0 }, { RED_COLOUR, -0.5, 0.5, -1.0 } }; local gRotationAngle = 0; while true do Gu.start3d(); Gu.clearDepth( 0 ); Gu.clear( Gu.COLOR_BUFFER_BIT + Gu.DEPTH_BUFFER_BIT ); Gum.matrixMode( Gu.PROJECTION ); Gum.loadIdentity(); Gum.perspective(75, 16/9, 0.5, 1000); Gum.matrixMode( Gu.VIEW ); Gum.loadIdentity(); Gum.matrixMode( Gu.MODEL ); Gum.loadIdentity(); Gu.disable( Gu.TEXTURE_2D ); Gum.translate(0, 0, -3.5); Gum.rotateXYZ( 0, 0, gRotationAngle * ( Gu.PI / 180.0 ) ); Gum.drawArray( Gu.TRIANGLES, Gu.COLOR_8888 + Gu.VERTEX_32BITF + Gu.TRANSFORM_3D, SQUARE_POLYGON ); Gu.end3d(); screen.waitVblankStart(); screen.flip(); gRotationAngle = gRotationAngle + 1; if Controls.read():start() then break; end end
I've been looking all over, but all I've been able to find are lists of the gu functions, with no info on what each one does or how to use them.
Can someone explain how this works, and what I would need to do to make it display a tile image instead of a red square?
-
03-10-2007, 07:38 AM #6026QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
What do you guys get from you FPS counter when your script is not doing much? What i get is 60 FPS, i just printed the FPS string, nothing more.
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
03-10-2007, 07:52 AM #6027QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
60 fps is the maximum since that is the screens max refresh rate (60 hz). If you want to get 'more', then don't call waitForVSync but the display will look VERY weird.
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-10-2007, 08:04 AM #6028QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
"waitForVSync"? I made my own FPS counter without looking at others code, this is what i came up with. You just need to call the function, no variables needed.
Zitat von yaustar
Code:function FPS() if fps==nil then timer=Timer.new() fps=0 lastfps=0 end timer:start() if timer:time() > 1000 then timer:reset() lastfps=fps fps = 0 return lastfps else fps=fps+1 return lastfps end end
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
03-10-2007, 08:18 AM #6029QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Vblank/VSync whatever. The call that everyone uses to wait for the screen to finish drawing every frame limits the FPS to the screen's refresh rate of 60hz which is 60 fps. Removing this call will mean that the game will run as fast as it can but you will end up with a VERY flickerly display.
Zitat von HaxxBlaster
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
03-10-2007, 08:26 AM #6030QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Well, i know. I've just never used "waitForVSync".
Zitat von yaustar
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]


LinkBack URL
About LinkBacks
Mit Zitat antworten


Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum