Zeige Ergebnis 2.401 bis 2.430 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; >.< , it freezes at checking your connecting...
-
05-20-2006, 06:06 PM #2401
>.< , it freezes at checking your connecting
Bequiet!!!
I'm learning cc©cc
-
05-20-2006, 06:12 PM #2402
This should work. If you check if two things are equal, you have to use "==" not "=".
Zitat von PSPduh
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-20-2006, 07:35 PM #2403
yeah, i got this Audacity audio recorder, its really cool, you can edit and take out some audio you dont want =P
Bequiet!!!
I'm learning cc©cc
-
05-20-2006, 08:55 PM #2404words 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
hey quyick informational answer...
Does netlib atually create an array/sturcture of the Connection Info meaning like it will give you the IP Address of the Connection Name and the DNS and Subnet Mask adn such?
Also, i doubt this but can netlib 'create' connections? like add 1 to the connections info integer and create the connection?
Basically, does the NETLIB connection function return the connection info? If so, is creating a connection possible if you add 1 to the connections array/structure
Im guessing NO because the LuaPlayer source may not have added WLAN Connetions Manipulatyion :-(
...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-20-2006, 09:48 PM #2405
guys, a simple question:
is there a max of duped pictures in luaplayer v16 ?
becuase i m in an amount that it lags the player1 movement if i put 1 more picture and i need to add alot more to finish the gameBequiet!!!
I'm learning cc©cc
-
05-21-2006, 03:06 AM #2406
First thing Im not sure. I never tried, I just used what the wlan example in LUAplayer used. Maybe you could make it print all that it returns?
Zitat von SG57
NETLIB cant create any connections. Im not sure if LUA can, but i dont think so.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-21-2006, 06:12 AM #2407Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von natan333
post your player moving code, ther is something probably wrong with it. you can load a LOT of images, about 24mb i think, but im not 100% sure.--------------------------------------------------------------------------------------
-
05-21-2006, 06:38 AM #2408
Zitat von Grimfate126
This is when its going upCode:if pad:up() and moving1 == true then move:start() screen:clear(white) y0 = y0 - 2 screen:blit(x0, y0, up1) end if pad:up() and moving1 == true and move:time() > 0 then screen:clear(white) screen:blit(x0, y0, up2) end if pad:up() and moving1 == true and move:time() > 150 then screen:clear(white) screen:blit(x0, y0, up1) end if pad:up() and moving1 == true and move:time() > 300 then move:reset() end
~EDIT~ I toke off the top screen:clear from the code above, it fixes but picture dosent look right
ok this is working better, but i wanna see if its going to lag againCode:if pad:up() and move:start() and moving1 == true then screen:clear(white) y0 = y0 - 2 screen:blit(x0, y0, up2) end if pad:up() and moving1 == true and move:time() > 150 then screen:clear(white) screen:blit(x0, y0, up1) end if pad:up() and moving1 == true and move:time() > 300 then move:reset() end
Geändert von natan333 (05-21-2006 um 06:45 AM Uhr)
Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 06:41 AM #2409QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
I need some more help here. Now I try this code:
It gives a luaplayer.exe.stackdump file. And in that file is:Code:red = Color.new(255,0,0) yellow = Color.new(255, 255, 0) blue = Color.new(0, 0, 255) orange = Color.new(223, 88, 6) grey = Color.new(94, 97, 111) black = Color.new(0, 0, 0) white = Color.new(255, 255, 255) green = Color.new(0,255,0) duh = Timer.new() duh2 = duh:time() x = 39 y =41 duh:start() man = Image.load("man.png") while true do screen:clear(white) if duh2 >= 470 then screen:blit(39,41,man) end screen:blit(x,y,man) for i = 1, 470 do if duh2 == i * 1 then man.x = man.x + 1 end end screen.waitVblankStart() screen.flip() end
Grrrr...If this code would work, I could make a game or two. Thank you for your help. :)Code:Stack trace: Frame Function Args 57363 [sig] luaplayer 3364 handle_threadlist_exception: handle_threadlist_exception called with threadlist_ix -1 65521 [sig] luaplayer 3364 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION Exception: STATUS_ACCESS_VIOLATION at eip=61015E82 eax=7C802542 ebx=610E7ECC ecx=00000000 edx=0000001B esi=00000000 edi=00000001 ebp=00A2E6E8 esp=00A2E6E4 program=C:\Documents and Settings\FattyMcFat\Desktop\luaplayer.exe, pid 3364, thread sig cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023 Stack trace: Frame Function Args 00A2E6E8 61015E82 (610E7ECC, 0022E598, 00000001, 00000000) 00A2E708 61015FAC (00000001, 00A2E760, 00000000, 00000000) 00A2EA58 610179AB (000006F4, 00A2EED0, 000000A4, 00A2EE9C) 00A2EF98 6108A497 (610E6D18, 00000000, 00000F84, 00000000) 00A2EFC8 6100327F (610E6D18, 00A2F000, 61003160, 00000000) 00A2EFF8 61003E94 (00000000, 00000000, 00000000, 00000000) 00A2FF98 61003EDA (00000000, 00000000, 00000000, 00000000) End of stack trace
-
05-21-2006, 08:28 AM #2410
- Registriert seit
- Jul 2005
- Ort
- second star to the right...
- Beiträge
- 139
- Points
- 10.633
- Level
- 68
- Downloads
- 0
- Uploads
- 0
Quick Question... How can i make screenprint text ect rotait to a certain angle, say 180o so it wounld print up side down or 90o so it prints to the right?
i'm stuck on this one :icon_sad:
anybody got the knoledge.Geändert von Tiboric (05-21-2006 um 08:45 AM Uhr)

-
05-21-2006, 09:37 AM #2411QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
This is a copy and paste from the "rotate" example in the new Luaplayer. (which is version 0.19)
Zitat von Tiboric
I'm learning this myself so I cant explain it to you, but I thought it'd be helpful to you (and others learning the same thing) if I posted it.
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
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-21-2006, 09:53 AM #2412
guys. i have this question that it will be easier if it works
i have aall the way toCode:blockx1 = 0 blocky1 = 0
(the values are different though)Code:blockx62 = 16 blocky62 = 480
and aall the way toCode:screen:blit(blockx1, blocky1, block)
.Code:screen:blit(blockx62, blocky62, block)
Is it possible to make them all move in the same speed with only 1 code like
orCode:blankx1 = blankx1 + 2
?Code:blanky1 = blanky1 + 2
Geändert von natan333 (05-21-2006 um 09:57 AM Uhr)
Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 11:48 AM #2413Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von natan333
it would be easier to make an array:
then to blit all the blocks in THREE lines of code, do this:Code:block = {} block[1] = { x = 0, y = 0 ) ....all the way to 62
now for the moving part:Code:for a = 1, 62 do screen:blit(block[a].x, block[a].y, block) end
Code:for b = 1, 62 do block[b].x = block[b].x + 2 -- or if you want the y to move: block[b].y = block[b].y + 2 --or if you want both x and y to move: block[b].x = block[b].x + 2 block[b].y = block[b].y + 2 end
hope i helped!--------------------------------------------------------------------------------------
-
05-21-2006, 11:56 AM #2414
thx, i think it will help alot
but wait.
in
"block[1] = { x = 0, y = 0 )"
wich one is the right one? the { or the ( so i dont have edit all over againBequiet!!!
I'm learning cc©cc
-
05-21-2006, 11:57 AM #2415TheMarioKartersGuest
The {
Zitat von natan333
-
05-21-2006, 11:57 AM #2416Quality Haxing Since 1991
- Registriert seit
- Oct 2005
- Ort
- Pennsylvania, USA Fi
- Beiträge
- 6.206
- Points
- 29.255
- Level
- 99
- Downloads
- 0
- Uploads
- 0
{
is the correct one.
EDIT: Nice edit, TMK. I caught you....
Zitat von Noriko
-
05-21-2006, 12:00 PM #2417Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
yea, its { , i made a typo. also, if you are making you x and y values random, like:
Zitat von natan333
then you can also do:Code:block[1] = { x = math.random(100), y = math.random(100) }
so you wont have to make a huge list.Code:for c = 1, 62 do block[c] = { x = math.random(100), y = math.random(100) } end--------------------------------------------------------------------------------------
-
05-21-2006, 12:41 PM #2418
thx guys =P
the random is sweet, i will use it later =P
is there another code instead ofto add 16 pixels after each pixelCode:for c = 1, 62 do block[c] = { x = math.random(480), y = 0 } end
example:
block[1] = { x = 0, y = 0 }
block[2] = { x = 16, y = 0 }
block[3] = { x = 32, y = 0 }
block[4] = { x = 48, y = 0 }
and so on?Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 12:44 PM #2419QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
Code:for c = 1, 62 do block[c] = { x = x + 16, y = y + 16 } end[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-21-2006, 12:50 PM #2420
Zitat von EminentJonFrost
that gave me error :icon_sad:Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 01:05 PM #2421QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
my bad, try that.Code:for c = 1, 62 do block[c].x = block[c].x + 16 block[c].y = block[c].y + 16 end
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-21-2006, 01:10 PM #2422
still error hmm
Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 02:01 PM #2423QJ Gamer Green
- Registriert seit
- Dec 2005
- Ort
- Here
- Beiträge
- 2.715
- Points
- 13.310
- Level
- 75
- Downloads
- 0
- Uploads
- 0
whats the error?
[CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]
-
05-21-2006, 02:04 PM #2424Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von natan333
try this:
that SHOULD work.Code:block = {} block[1] = { x = 0, y = 0 } for d = 2, 62 do block[d] = { x = block[d-1].x + 16, y = 0 } end--------------------------------------------------------------------------------------
-
05-21-2006, 02:05 PM #2425Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von EminentJonFrost
the problem was that you said to get just "x". there is no value as "x", only as
Code:block[1-62].x
P.S. sry for double post--------------------------------------------------------------------------------------
-
05-21-2006, 02:32 PM #2426
Thx so much Grimfate126 :Jump:
Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 06:30 PM #2427
need help in this one
I toke some time to find out how to make the picture "blockk" block all sides when player1 tryes to get in but now i tested it, only 1 block works, the others blocks dosent block "player1" so it pass through block[1] and [2] but not [3]
payattention bellow while true do and above buggy killer, becuase that is what makes picture player1 stop when it tries to get inside block picture.Code:block = {} block[1] = { x = 32 , y = 32 } block[2] = { x = 64 , y = 100 } block[3] = { x = 100 , y = 130 } it works only with the last block while true do blahblahblah and blahblahblah for c = 1, 3 do screen:blit(block[c].x, block[c].y, blockk) if x0 >= block[c].x-13 and x0 <= block[c].x+15 and y0 >= block[c].y-16 and y0 <= block[c].y and bug11 == true then moving2 = false moving1 = true end if x0 >= block[c].x-13 and x0 <= block[c].x+15 and y0 >= block[c].y and y0 <= block[c].y+16 and bug22 == true then moving1 = false moving2 = true end if x0 >= block[c].x and x0 <= block[c].x+16 and y0 >= block[c].y-15 and y0 <= block[c].y+15 and bug33 == true then moving3 = false moving4 = true end if x0 >= block[c].x-15 and x0 <= block[c].x and y0 >= block[c].y-15 and y0 <= block[c].y+15 and bug44 == true then moving4 = false moving3 = true end -------------->Buggykiller if moving1 == false and x0 >= block[c].x+16 then moving1 = true end if moving1 == false and x0+16 <= block[c].x then moving1 = true end if moving2 == false and x0 >= block[c].x+16 then moving2 = true end if moving2 == false and x0+16 <= block[c].x then moving2 = true end -- if moving3 == false and y0 >= block[c].y+16 then moving3 = true end if moving3 == false and y0+16 <= block[c].y then moving3 = true end if moving4 == false and y0 >= block[c].y+16 then moving4 = true end if moving4 == false and y0+16 <= block[c].y then moving4 = true end end
how can i make it to work with block[1] and block[2]?Geändert von natan333 (05-21-2006 um 06:47 PM Uhr)
Bequiet!!!
I'm learning cc©cc
-
05-21-2006, 06:48 PM #2428words 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
if i really understood your quetion/problem then i could help lol... I just say use collision, not the whole X and Y co-ordinate checking adn booling...

...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-21-2006, 07:00 PM #2429Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von natan333
umm.. say WHAT??--------------------------------------------------------------------------------------
-
05-21-2006, 07:11 PM #2430
ok i think this better.

is the block picture and its named blockk.
there is moving picture called "player1" somewhere and it have moving1 == true (to go up), moving2 == true (go down) , moving3 == true (go left) and moving4 == true (go right) like
is one of themCode:if pad:up() and move:start() and moving1 == true then screen:clear(white) y0 = y0 - 2 screen:blit(x0, y0, up2) end if pad:up() and moving1 == true and move:time() > 150 then screen:clear(white) screen:blit(x0, y0, up1) end if pad:up() and moving1 == true and move:time() > 300 then move:reset() end
so this code bellow tells one of the moving1-4 to be false if the moving "player1" tries to go through the block picture
from above, bellow and sides
like, the block[c] is added becuase later, the game will move them all atomaticallyCode:for c = 1, 3 do screen:blit(block[c].x, block[c].y, blockk) if x0 >= block[c].x-13 and x0 <= block[c].x+15 and y0 >= block[c].y-16 and y0 <= block[c].y and bug11 == true then moving2 = false moving1 = true end if x0 >= block[c].x-13 and x0 <= block[c].x+15 and y0 >= block[c].y and y0 <= block[c].y+16 and bug22 == true then moving1 = false moving2 = true end if x0 >= block[c].x and x0 <= block[c].x+16 and y0 >= block[c].y-15 and y0 <= block[c].y+15 and bug33 == true then moving3 = false moving4 = true end if x0 >= block[c].x-15 and x0 <= block[c].x and y0 >= block[c].y-15 and y0 <= block[c].y+15 and bug44 == true then moving4 = false moving3 = true end end
the code above works great but the problem, it only worked for block[3] but not block[1] and block[2]Geändert von natan333 (05-21-2006 um 07:17 PM Uhr)
Bequiet!!!
I'm learning cc©cc


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