Zeige Ergebnis 6.811 bis 6.840 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; can anyone tell me how to draw circle?...
-
04-16-2007, 09:48 AM #6811QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
can anyone tell me how to draw circle?
[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]
-
04-16-2007, 12:23 PM #6812
yes, this came up a while back:
Code:function drawCirc(where, x, y, radius, color) theta = 0 while theta<=360 do where:drawLine((math.sin( theta)*radius)+x, (math.cos(theta)*radius)+ y, (math.sin(theta+1)*radius )+x, (math.cos(theta+1)*radius )+y, color) theta = theta+1 end end
-
04-16-2007, 12:26 PM #6813
Sigh..idiot...sin and cos are in RADIANS not DEGREES.
Zitat von emericaska8r
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-16-2007, 01:01 PM #6814
I have tryed a few things for the battery then searched for some tutorials but didn't find anything anyone know of a tutorial?
-
04-16-2007, 02:13 PM #6815QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Upstate, NY USA
- Beiträge
- 121
- Points
- 4.349
- Level
- 41
- Downloads
- 0
- Uploads
- 0
What are the number codes for wait time with
screen.waitVblankStart()
Sorry for such a n00b question, but I'm just getting into all this. :)
Thanks in advance for the kind help.
-
04-16-2007, 02:23 PM #6816
Yeah, I found a great one before: http://www.ies.co.jp/math/java/samples/sinBox.html
Zitat von Bob Hoil
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-16-2007, 02:39 PM #6817words 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
youresam - Not everyone is a know-it-all like you.

Bob Hoil - 'for the battery' means what? Get its voltage, its temperature, its battery life in time, battery life in percent, etc.
...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
-
04-16-2007, 02:40 PM #6818
Its called using sine.
Zitat von SG57
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-16-2007, 02:41 PM #6819
thanks :Punk:
Zitat von SG57
-
04-16-2007, 02:47 PM #6820QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Upstate, NY USA
- Beiträge
- 121
- Points
- 4.349
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Anyone care to help me with my question?
-
04-16-2007, 03:00 PM #6821
let me see, i'm not completely sure what you mean, but the numbers you can put in the screen.waitVblankStart() will tell the psp how much milliseconds to wait.
Zitat von psp phd
-
04-16-2007, 03:05 PM #6822
No, thats System.sleep().
Zitat von emericaska8r
screen.waitVblankStart() is 1/60 of a second, and Shine added a parameter to run that function x times.牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-16-2007, 03:07 PM #6823Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
pad = Controls.read()
Zitat von yumCOOKIEZZ
I get an error "Attempt to index global 'controls' (a nil value)"
This tells me differently. A capital C is correct, and the error was from having a lowercase c.
Not quite... screen.waitVblankStart(60 ) is one second. The command means something like "wait for vertical sync" or something (not sure about the exact terminology), which occurs 60 times per second on the PSP (60 Hz). I just know the screen can only update once every 1/60th of a second.
Zitat von emericaska8r
EDIT: youresam beat me to it, but I added more info.
-
04-16-2007, 03:21 PM #6824
Its an old term from CRTs that would wait for the next vertical blank before redrawing to the screen.
Zitat von LMelior
With screen.waitVblankStart(), yes. But without it, I've pulled off 1500 frames per second (no thats not a typo) with luaplayer.
Zitat von LMelior
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth
-
04-16-2007, 03:52 PM #6825QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 81
- Points
- 3.525
- Level
- 37
- Downloads
- 0
- Uploads
- 0
O noes. I new error =(
Image.load: Error loading image.
Any help?
-
04-16-2007, 03:53 PM #6826QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
you didnt load the image right
-
04-16-2007, 03:56 PM #6827
I meant i want to make one that looks like the one on the xmb. I want the battery shape. Thanks BobHoil
-
04-16-2007, 03:56 PM #6828QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Upstate, NY USA
- Beiträge
- 121
- Points
- 4.349
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Thanks for the help guys. I work full time, but have been working on Lua as a hobby. :)
(I've been on the PSP scene almost since the start.)
This is very exciting. I'll see you guys around the forums :)
-
04-16-2007, 04:00 PM #6829lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Wow.
Zitat von youresam
Anyways, Would you be able to edit lua player to allow a 1080x1080 picture to be loaded and blited to screen without taking all the memory? Or will memory be a issue?
-
04-16-2007, 04:01 PM #6830QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 81
- Points
- 3.525
- Level
- 37
- Downloads
- 0
- Uploads
- 0
but what isn't right about it?
Zitat von Urameshi
logo = Image.load("Images/logo.jpg")
I have logo.jpg stored in the Images folder.
-
04-16-2007, 04:07 PM #6831QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
logo=Image.load("./Images/logo.jpg")
-
04-16-2007, 04:10 PM #6832QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 81
- Points
- 3.525
- Level
- 37
- Downloads
- 0
- Uploads
- 0
Same Error =(
I'm gonna try it with a different image and see what happens.
-
04-16-2007, 04:11 PM #6833QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
why dont you just post your code?
-
04-16-2007, 04:15 PM #6834QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 81
- Points
- 3.525
- Level
- 37
- Downloads
- 0
- Uploads
- 0
I tried a different image and it worked.
Does size have anything to do with image loading? It isn't a big picture but when I switched to the 'Powered by Lua' image it worked fine.
I guess Lua just doesn't like the windows vista logo.
-
04-16-2007, 04:15 PM #6835
whoops :Argh:
Zitat von youresam
-
04-16-2007, 04:16 PM #6836QJ Gamer Gold
- Registriert seit
- Nov 2006
- Ort
- ...
- Beiträge
- 2.080
- Points
- 11.942
- Level
- 71
- Downloads
- 0
- Uploads
- 0
well i know that the picture cant be like over 500x500
-
04-16-2007, 05:06 PM #6837QJ Gamer Blue
- Registriert seit
- Apr 2007
- Beiträge
- 81
- Points
- 3.525
- Level
- 37
- Downloads
- 0
- Uploads
- 0
How do I make an image appear transparent? I want one image on top on another but I don't want all of the white around it.
-
04-16-2007, 05:08 PM #6838
change the alpha value of the image. (0 being clear, 255 being opaque)
-
04-16-2007, 05:35 PM #6839
hii there people...
i have to ask..
is there a way to blit a lightblend image... if soo how ?
is there a way to texture lightblend in gu ... is soo how ?
thanks in advance.
-
04-16-2007, 06:11 PM #6840
No.
Zitat von ahrimanes
Set the texture mode to Gu.TFX_MODULATE, it basically caps the colors at the defined RGBA color. (So for 100 transparency do Color.new(255,255,255,100 ))
-= Double Post =-
Yeah, thats probably it.
Zitat von yumCOOKIEZZ
Geändert von youresam (04-16-2007 um 06:13 PM Uhr) Grund: Automerged Doublepost
牧来栠摩琠敨映汩獥
PSN: youresamFrom Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
--Mike Hollingsworth


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