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; Zitat von ZereoX want me to send it to you. sure sorry madsoul, nope. (dont know any)...
-
05-14-2006, 03:51 AM #2251QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
sure
Zitat von ZereoX
sorry madsoul, nope. (dont know any)
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-14-2006, 03:54 AM #2252QJ Gamer Platinum
Awards:
- Registriert seit
- Jan 2006
- Ort
- stevens bumhole
- Beiträge
- 10.308
- Points
- 87.718
- Level
- 100
- Downloads
- 0
- Uploads
- 0
damn...
Zitat von EminentJonFrost
i need it for my breakout game..
thanks anyway
-
05-14-2006, 04:00 AM #2253QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
I found a collosion tutorial: GUIDE: Collisions
Zitat von madsoul
Cant wait for the breakout game! :Punk:
-
05-14-2006, 04:02 AM #2254QJ Gamer Platinum
Awards:
- Registriert seit
- Jan 2006
- Ort
- stevens bumhole
- Beiträge
- 10.308
- Points
- 87.718
- Level
- 100
- Downloads
- 0
- Uploads
- 0
thx man! :) il put you somewhere in the credits as a helper... ;)
Zitat von PSPduh
-
05-14-2006, 04:05 AM #2255QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Thank you. And to tell you the truth, I just put in "collision" in search, and thats what it came up with.
Geändert von PSPduh (05-14-2006 um 04:11 AM Uhr)
-
05-14-2006, 05:43 AM #2256
I have a little probleme making my guy move left and right
but the problem is that all the image stack is there a way to doCode:function playerright() screen:blit(player.x,player.y,walkingright1) screen:blit(player.x,player.y,walkingright2) screen:blit(player.x,player.y,walkingright3) end
screen:clear(player.x,pla yer.y,walkingright1)
EX:
Code:function playerright() screen:blit(player.x,player.y,walkingright1) screen:clear(player.x,player.y,walkingright1) screen:blit(player.x,player.y,walkingright2) screen:clear(player.x,player.y,walkingright2) screen:blit(player.x,player.y,walkingright3) screen:clear(player.x,player.y,walkingright3) end
-
05-14-2006, 09:15 AM #2257
i have a question
what does / mean?Code:x0 = math.sin(1 / 100 * time) * 190 + 195
Bequiet!!!
I'm learning cc©cc
-
05-14-2006, 09:59 AM #2258words 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
The '/' means division.
* = multiply, + = add, - = subtract and / = divison
^ = exponent

...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
-
05-14-2006, 10:07 AM #2259sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
hello, could anyone please help me with a simple tic tac toe AI? i would really, really appreciate it :) thanks
-
05-14-2006, 11:14 AM #2260QJ Gamer Blue
- Registriert seit
- Feb 2006
- Ort
- Pluto
- Beiträge
- 490
- Points
- 7.244
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Have you read vaza's tutorial, if not heres a link http://forums.qj.net/psp-development-forum/50267-ai-tutorials-vaza-post628359.html#post628359
-
05-14-2006, 12:09 PM #2261sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
yeah, i was the one who rewuested them ;) i guess i'll just be patience
-
05-14-2006, 01:56 PM #2262
How can i do a leveling collision what i mean by that is this Ex: like when i touch the floor the gravity changes.!?
-
05-14-2006, 02:29 PM #2263
if you know how to set up gravity and stuff,
Zitat von ZereoX
i think to make that place to change it
you'll have to do something like
the 1st x0 and y0 is the object positions. the 2nd x0 and y0 is the ending of that object.Code:if true then if x0 >= 100 and x0 <= 200 and y0 >= 90 and y0 <= 100 then (change gravity) end end
but hey, i dont know if this is what you need
Geändert von natan333 (05-14-2006 um 02:31 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
05-14-2006, 02:33 PM #2264QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
i personally believe that the people who made lua in there next update should add a hittest and rotation command into lua i mean i know it wouldn't be easy(or at least i don't think it would) but it would end so many problems that people are asking
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
05-14-2006, 03:30 PM #2265words 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
...your joking right? I could easily add collision to the LuaPlayer... Its jsut i have a C collision detection function/prototype setup... So id have to convert to C++... So if anyone couyld do that theres collision for you... or i could just convert my Collision detection into a brand new 'lib' for LUA, kind of like netlib, but full of math commands if you will... Likely to be added next would be rotation via angles, but not radians, which i may just add a few lines to convert that way...
If anyone would like to help with such a thing, just PM, and i may think about doing such a thing. Itll be like netlib...but instead of WLAN functionality, itll be math and such...
...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
-
05-14-2006, 03:38 PM #2266QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
i said it would end many people probs and no i'm not jokeing trying to get collision to work properly isn't that easy to the noobies so thus a hittest command would make it really easy for them and i would enjoy a rotation feature(sorry if mispelled)
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been
-
05-14-2006, 04:51 PM #2267QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
Is there any word or notepad like program that can do something like this?
See i have a long function.. but i have about 10 different ways to do that function.. and i need to edit about 50 variables like "[1]" to "[2]"... Is there any program that will let me copy and paste and change all the text i choose into something else? Cuz just editing functions from [1] to [2] gets boring fast.
-
05-14-2006, 04:54 PM #2268QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Can someone help me with this a few pages back? :icon_sad:
Zitat von PSPduh
-
05-14-2006, 06:38 PM #2269Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
you could just put:
Zitat von PSPduh
that should work.Code:x = duh2
--------------------------------------------------------------------------------------
-
05-14-2006, 08:13 PM #2270words 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
yes, what ever you declared as increasing by 1 second, just have the second variable you want to also = w/e the other cariable ='d or just have it = the other cariab le tat already has the time thing... confusing a little....
anyway, im planning on making a simple lib... but only having collision may not be called a lib... os any more ideas would be great.... as for rotation... im not sure if the PSP's GUM libs have been converted, if not, then it shall be simple trig for rotation... which may be a slow processing time... so.... Oh and maybe an animation prototype as wel, aka function.... Unless youresam is alreay doing so?
...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
-
05-15-2006, 03:03 AM #2271QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
If your using notepad, press the CTRL and H buttons at once.
Zitat von montrob
It'll ask what to find, and what to replace what it finds with.
PSPduh showed me that. VERY handy little feature of Notepad.[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-15-2006, 06:50 AM #2272QJ Gamer Bronze
- Registriert seit
- Feb 2006
- Ort
- Earth, UK
- Beiträge
- 457
- Points
- 5.924
- Level
- 49
- Downloads
- 0
- Uploads
- 0
soz i all ready worked out how to do this my self :Jump:
lua rocksGeändert von JoeDaStudd (05-15-2006 um 07:48 AM Uhr)
<<Put A message Here>>
<<Just made another rubbish website visit it here.>>
-
05-15-2006, 07:45 AM #2273QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
Zitat von EminentJonFrost
OMG! That feature is AWSM! :Jump: :Jump:
And I need help somewhere else..
My game is going to be played with the psp held vertical.. Is there a way that you can print text to the screen vertical?Geändert von montrob (05-15-2006 um 08:00 AM Uhr)
-
05-15-2006, 08:10 AM #2274QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
um...the only way i can think of is making a pic with the text you want shown printed sideways.
Zitat von montrob
you mean vertical as in
|
|<shoulder button
|
< top PSP logo bottom >
|
|<shoulder button
|
right?[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-15-2006, 08:31 AM #2275QJ Gamer Silver
- Registriert seit
- Jun 2005
- Ort
- The Migrant Fleet
- Beiträge
- 908
- Points
- 9.678
- Level
- 66
- Downloads
- 0
- Uploads
- 0
ya thats right
Zitat von EminentJonFrost
-
05-15-2006, 08:35 AM #2276
I know EminentJonFrost already helped with this, but I just wanted to say that Word has a function and you can say what to replace with what and it replaces all of those.
Zitat von montrob
Hmmm also with my notepad of Win98SE its just the same as backspace...LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
05-15-2006, 12:00 PM #2277QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
maybe this might be of interest to you montrob:
I havent checked it out yet, but it sounds like what you may be looking for. I'm gonna look into it now.Luaplayer v0.19
==========
- directory detection bugfix [moonlight]
- Changed System.loadModule to loadlib to work. [Oobles
the same as the traditional lua loadlib function
- Made loadlib check if a module is already loaded before trying
to load. [Oobles]
- Removed getLuaState export. No longer required. [Oobles]
- Made debugOutput work in the same way as printf in bootstrap. [Oobles]
- Added loadlib.prx kernel module. required for module loading. [Oobles]
- Added a module sample for manipulating images [Shine]
Edit - I found in the new Luaplayer (version 19) in the Samples folder, this script:
:)Code:function rotate(image) local w = image:width() local h = image:height() local result = Image.createEmpty(h, w) for x=0,w-1 do for y=0,h-1 do result:pixel(h-y-1, x, image:pixel(x, y)) end end return result end function printRotated(x, y, text, color, image, rotateIndex) rotateIndex = math.mod(rotateIndex, 4) local w = string.len(text) local result = Image.createEmpty(w * 8, 8) result:print(0, 0, text, color) if rotateIndex > 0 then rotateIndex = rotateIndex - 1 for i=0,rotateIndex do result = rotate(result) end end image:blit(x, y, result) end cadetBlue = Color.new(95, 158, 160) printRotated(132, 0, "Don't ask what Lua Player", cadetBlue, screen, 0) printRotated(472, 76, "can do for you,", cadetBlue, screen, 1) printRotated(160, 264, "ask what you can do", cadetBlue, screen, 2) printRotated(0, 76, "for Lua Player!", cadetBlue, screen, 3) screen.flip() while true do screen.waitVblankStart() end
Geändert von EminentJonFrost (05-15-2006 um 12:04 PM Uhr)
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-15-2006, 12:01 PM #2278TheMarioKartersGuest
Wow, that's awesome.
Zitat von EminentJonFrost
Cheers.
-
05-15-2006, 12:09 PM #2279sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
can any help me with making text return once is hit the edge off the screen? so it doesnt run if the end of the screen? thanks
-
05-15-2006, 12:19 PM #2280QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
just set x to 450 so like:
if x > 480 then x = 450 end
very simple1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been


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