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 Mistabeen Could someone take a look at this code, for some reason I get in my Debug (working ...
-
07-17-2007, 11:42 AM #7681QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- Middle Europe
- Beiträge
- 1.281
- Points
- 11.800
- Level
- 71
- Downloads
- 0
- Uploads
- 0
timer:reset(0)
Zitat von Mistabeen
[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]
-
07-17-2007, 02:31 PM #7682QJ Gamer Green
- Registriert seit
- Jul 2005
- Ort
- Belgium
- Beiträge
- 594
- Points
- 7.599
- Level
- 58
- Downloads
- 0
- Uploads
- 0
that is not what I meanth, I startplaying my music, but there is a small delay on the music, LUA player has to load the file first
Zitat von myschoo
so I would like mt counter to reset the exact moment you hear thre sound
-
07-17-2007, 05:04 PM #7683words 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
You can't as once you call music.playFile() it loads and plays, you can't inject your own timer:start() code after the load sequence.
The best you can do is guess via trial and error when the music starts playing (500 miliseconds after calling music.playfile, 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
-
07-17-2007, 08:55 PM #7684
I am a new lua n00b, plz help I am making new game with mraellis
First I was looking on how to get started, but I am done with that part and have done the Hello world script.lua already, and all of the lessons on evilmana.com, and am now trying to do a overall goal of creating a game called RODM or Run or Die, Mouse based on a flash game called Bat and Mouse, but I am running into problems. Go to page 7 or later for my latest problems
Geändert von Gam3freQ (07-22-2007 um 09:34 PM Uhr) Grund: is pretty n00by so it won't be posted
-
07-17-2007, 09:12 PM #7685Bush Programmer

- Registriert seit
- Nov 2005
- Beiträge
- 3.658
- Points
- 60.149
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Most basic tutorials for C and LUA here:
http://www.psp-programming.com/tutorials/
Some more advanced here:
http://www.psp-programming.com/forum...uncements;id=1
-
07-17-2007, 09:25 PM #7686QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
No good C++ guides on the internet? Nice joke. Link.
-
07-17-2007, 09:27 PM #7687
thanks i'll start from there
Zitat von Art
and the first link will help me code for psp and use a compiler for psp right? no. I seriously doubt it. Anyways the link above from Art shows BOTH C and lua even though C++ and C arn't the same thing, but I'm pretty sure they're similar. I'll start in lua so I don't need to compile :P
Zitat von _dysfunctional
Ok I am just starting and all, my Hello World worked, but is there like a flash application of some sort that lets me click on a color and it will show me the RGB? (0, 0, 255 for blue, for example) because I know there is one in photoshop but that makes my computer lag like hell
EDIT: NVRM what i'm using is microsoft paint - go to colors at the top, click on edit colors, click on define custom colors, and a full RGB table will come up and if you click anywhere it shows you what the RGB values are for that color WHOOHOO yay
Ok the bold, italisized, underlined part above is where I am confused. Here is a copy/paste of what I have done so farNow we are going to flip the screen again, set the volume, and wait on the screen until the sound is finished. Put this in your code:
screen.waitVblankStart(24 0)
Music.volume(128)
As we touched on before, there are sixty Vblanks in a second, so we are pausing the program for four seconds (240/60 = 4). "screen.flip()" just updates the screen. And, Music.volume(128) sets the volume to 128; this is the highest that the volume goes (0 is the lowest). Now our loading screen (and our intro) are done! Hooray! Give your self a big hug. (Aside: whitehawk is a little weird for adding that in, but hey who am I, the editor, to judge?)
Now those last two lines were copied from the quote, but he says that we are going to do screen.flip again, so I was thinking if I should make it look like thisCode:System.usbDiskModeActivate() pink = Color.new(255, 0 , 153) blue = Color.new(0 , 153, 255) orange = Color.new(255, 102, 0) gray = Color.new(150, 150, 150) black = Color.new(0 , 0 , 0) screen:print(194, 136, "Loading: 0%", pink) screen.flip() background = Image.load("images/background.jpg") screen:clear() screen:print(194, 136, "Loading: 20%", pink) screen.flip() circle = Image.load("images/buttons/circle_button.png") down = Image.load("images/buttons/down_arrow.png") screen:clear() screen:print(194, 136, "Loading: 40%", pink) screen.flip() l = Image.load("images/buttons/left_trigger.png") left = Image.load("images/buttons/left_arrow.png") screen:clear() screen:print(194, 136, "Loading: 60%", pink) screen.flip() r = Image.load("images/buttons/right_trigger.png") right = Image.load("images/buttons/right_arrow.png") boltsnd = Sound.load("music/comp.wav") screen:clear() screen:print(194, 136, "Loading: 80%", pink) screen.flip() square = Image.load("images/buttons/square_button.png") triangle = Image.load("images/buttons/triangle_button.png") screen:clear() screen:print(194, 136, "Loading: 90%", pink) screen.flip() up = Image.load("images/buttons/up_arrow.png") x = Image.load("images/buttons/cross_button.png") splash = Image.load("images/lua.png") screen:clear() screen:print(194, 136, "Loading: 99%", pink) screen.flip() screen.waitVblankStart(240) Music.volume(128)
screen.flip()
screen.waitVblankStart(24 0)
Music.volume(128)
but then again, that would do a double screen clear which would be pointless to put the same line twice, so should I put it after the screen.waitVblankStart(24 0) and before the music volume? or should I ignore that completely?
EDIT: it is now 3:00 am WHERE I LIVE so I'll go to bed and see if I can get an answer tomorrow. hopefully someone will help me so i can become a good coder in the future. I am not going to post any half-witted lua releases when I learn to code, instead, i am going to see if there are any good ideas, and if there arn't any, then I will switch to C, which I will have a basic understanding of programming applications altogether so learning C will make more sense, or i can try to completely master lua and come up with something three-quarters-witted instead of half-witted (i havn't seen any good lua applicaitons or games at all so i can't expect me to break the barrier of lua vs. C)Geändert von Gam3freQ (07-17-2007 um 10:56 PM Uhr)
-
07-18-2007, 12:00 AM #7688
would this be valid?
Zitat von psDevWiki
i need the width of the text in title when printed with the proportional font.Code:wpt,hpt = proportional:getTextSize(title)
-= Double Post =-
oh and a bit more detail if anyone cant follow what i'm doing:
Code:--center and print text proportional = Font.createProportional() proportional:setPixelSizes(0, 10) wpt,hpt = proportional:getTextSize(title) icon92:fontPrint(proportional, 45-(wpt/2), 64, title)
Geändert von Da_MerV (07-18-2007 um 11:03 AM Uhr) Grund: Automerged Doublepost
-
07-18-2007, 12:34 AM #7689QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Yes.
Zitat von Gam3freQ
[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]
-
07-18-2007, 07:26 AM #7690
K then, fine, I'll start with lua first though just to get the hang of it, please read my above post and help me
Zitat von yaustar
-
07-18-2007, 07:37 AM #7691QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
when he says again i think he means because you have done it several times already
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
-
07-18-2007, 07:44 AM #7692
That's correct but if you look in my code there is a flip right above the last two lines, and he says again so he wants it to be there two lines in a row? i guess not I will just leave it as it is so that I can see if it can be read properly now.
Zitat von slicer4ever
I thought you do screen.flip() to write to the onscreen buffer? why are there all of those spaces before the screen:blit(0, 0, background, false) ?The first thing we're going to do is start our game loop and display the background.
while true do
screen:blit(0, 0, background, false)
Remember from the first tutorial when we used the infinite loop at the end? Well, this uses the same concept, except we are going to do the main bulk of our program until the user exits the script rather than just pausing. The other line (obviously, since this is about the gagillionth time we've done this) writes the image into the offscreen buffer.
Since it says 0, 0, background, false does that mean that the background goes from onscreen to offscreen and becomes false while it is true? :sigh: not getting anywhere
Please someone tell me about the spaces. in the tutorial it says nothing about them. see look they are here too ( to the left of screen
rint and screen.flip - does that mean to assosicate with the control.pad?)
Code:screen:print(135, 251, "Press 'Start' to restart", blue) screen:print(110, 261, "Press 'Select' for a screenshot", blue) screen:print(383, 35, "Support:", black) screen:print(365, 45, "PS3Lounge.net", orange) screen:print(365, 55, "scriptscribbler.com/psp", gray) screen.flip()
-
07-18-2007, 07:55 AM #7693QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
everything is drawn behind the screen in order to show the stuff drawn u have to call screen.flip()
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
-
07-18-2007, 08:08 AM #7694QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Google around the subject of double buffering.
Here is my 'go' at trying to explain it.
Most games are double buffered nowadays, this means they have a section of memory that holds the pixel data to display to the screen.
It is called double buffering because you have an 'on-screen' buffer which is the pixel data being displayed on the screen in a frame. There is also another buffer, the 'off-screen' buffer that also holds pixel data, it is 'off-screen' so you can edit that data (through blitting for example) without affecting the image currently on the screen.
When you flip the buffers, the on-screen buffer now becomes the off-screen buffer and the off-screen buffer becomes the on-screen one which is then displayed on screen.
The reason why we wait for the Vblank ( read this ) to start before flipping buffers is because this is when the horizontal scanline of your display finishes rendering what you can see on the screen. This is the point when you can flip the buffers without affecting what the screen is currently trying to display.
If you don't what for the Vblank, you will tearing or shearing in the display because you have changed the data that the screen is reading from which holds a slightly different image.[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]
-
07-18-2007, 08:16 AM #7695
thanks, well, i finally finished my code, i went to try it on my PSP, and it says error at line 53 expect end or something like that I am gonna paste my entire code here now
Zitat von yaustar
I numbered them just for the forumCode:- System.usbDiskModeActivate()
- pink = Color.new(255, 0 , 153)
- blue = Color.new(0 , 153, 255)
- orange = Color.new(255, 102, 0)
- gray = Color.new(150, 150, 150)
- black = Color.new(0 , 0 , 0)
- screen:print(194, 136, "Loading: 0%", pink)
- screen.flip()
- background = Image.load("images/background.jpg")
- screen:clear()
- screen:print(194, 136, "Loading: 20%", pink)
- screen.flip()
- circle = Image.load("images/buttons/circle_button.png")
- down = Image.load("images/buttons/down_arrow.png")
- screen:clear()
- screen:print(194, 136, "Loading: 40%", pink)
- screen.flip()
- l = Image.load("images/buttons/left_trigger.png")
- left = Image.load("images/buttons/left_arrow.png")
- screen:clear()
- screen:print(194, 136, "Loading: 60%", pink)
- screen.flip()
- r = Image.load("images/buttons/right_trigger.png")
- right = Image.load("images/buttons/right_arrow.png")
- boltsnd = Sound.load("music/comp.wav")
- screen:clear()
- screen:print(194, 136, "Loading: 80%", pink)
- screen.flip()
- square = Image.load("images/buttons/square_button.png")
- triangle = Image.load("images/buttons/triangle_button.png")
- screen:clear()
- screen:print(194, 136, "Loading: 90%", pink)
- screen.flip()
- up = Image.load("images/buttons/up_arrow.png")
- x = Image.load("images/buttons/cross_button.png")
- splash = Image.load("images/lua.png")
- screen:clear()
- screen:print(194, 136, "Loading: 99%", pink)
- screen.flip()
- screen.waitVblankStart(240)
- Music.volume(128)
- while true do
- screen:blit(0, 0, background, false)
- pad = Controls.read()
- screen:print(135, 251, "Press 'Start' to restart", blue)
- screen:print(110, 261, "Press 'Select' for a screenshot", blue)
- screen:print(383, 35, "Support:", black)
- screen:print(365, 45, "PS3Lounge.net", orange)
- screen:print(365, 55, "scriptscribbler.com/psp", gray)
- screen.flip()
- if pad:cross() then
- screen:blit(50, 228, x)
- screen.flip()
- end
- if pad:circle() then
- screen:blit(90, 195, circle)
- screen.flip()
- end
- if pad:triangle() then
- screen:blit(45, 165, triangle)
- screen.flip()
- end
- if pad:square() then
- screen:blit(15, 195, square)
- screen.flip()
- end
- if pad:up() then
- screen:blit(60, 40, up)
- screen.flip()
- end
- if pad:right() then
- screen:blit(90, 65, right)
- screen.flip()
- end
- if pad:down() then
- screen:blit(60, 80, down)
- screen.flip()
- end
- if pad:left() then
- screen:blit(30, 65, left)
- screen.flip()
- end
- if pad:l() then
- screen:blit(4, 6, l)
- screen.flip()
- end
- if pad:r() then
- screen:blit(403, 4, r)
- screen.flip()
- end
- if pad:select() then screen:save("screenshot.tga") end
- if pad:start() then
- break
- end
as you can see, there is an end at line 54 so I don't see a problem
here is the code without listing: (bold line 54)
Spoiler for full code:
-
07-18-2007, 08:18 AM #7696QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
As for the spaces issue:
http://c2.com/cgi/wiki?CodeFormatting
And more specifically: http://c2.com/cgi/wiki?WhitespaceIsGood
-= Double Post =-
This is WHY you properly format code, with it properly formatted the error is obvious:
There are also a several common mistakes in there, why are you flipping buffers every time you press a button? Why are you not waiting for the Vbank to start before flipping buffers?Code:System.usbDiskModeActivate() pink = Color.new(255, 0 , 153) blue = Color.new(0 , 153, 255) orange = Color.new(255, 102, 0) gray = Color.new(150, 150, 150) black = Color.new(0 , 0 , 0) screen:print(194, 136, "Loading: 0%", pink) screen.flip() background = Image.load("images/background.jpg") screen:clear() screen:print(194, 136, "Loading: 20%", pink) screen.flip() circle = Image.load("images/buttons/circle_button.png") down = Image.load("images/buttons/down_arrow.png") screen:clear() screen:print(194, 136, "Loading: 40%", pink) screen.flip() l = Image.load("images/buttons/left_trigger.png") left = Image.load("images/buttons/left_arrow.png") screen:clear() screen:print(194, 136, "Loading: 60%", pink) screen.flip() r = Image.load("images/buttons/right_trigger.png") right = Image.load("images/buttons/right_arrow.png") boltsnd = Sound.load("music/comp.wav") screen:clear() screen:print(194, 136, "Loading: 80%", pink) screen.flip() square = Image.load("images/buttons/square_button.png") triangle = Image.load("images/buttons/triangle_button.png") screen:clear() screen:print(194, 136, "Loading: 90%", pink) screen.flip() up = Image.load("images/buttons/up_arrow.png") x = Image.load("images/buttons/cross_button.png") splash = Image.load("images/lua.png") screen:clear() screen:print(194, 136, "Loading: 99%", pink) screen.flip() screen.waitVblankStart(240) Music.volume(128) while true do screen:blit(0, 0, background, false) pad = Controls.read() screen:print(135, 251, "Press 'Start' to restart", blue) screen:print(110, 261, "Press 'Select' for a screenshot", blue) screen:print(383, 35, "Support:", black) screen:print(365, 45, "PS3Lounge.net", orange) screen:print(365, 55, "scriptscribbler.com/psp", gray) screen.flip() if pad:cross() then screen:blit(50, 228, x) screen.flip() end if pad:circle() then screen:blit(90, 195, circle) screen.flip() end if pad:triangle() then screen:blit(45, 165, triangle) screen.flip() end if pad:square() then screen:blit(15, 195, square) screen.flip() end if pad:up() then screen:blit(60, 40, up) screen.flip() end if pad:right() then screen:blit(90, 65, right) screen.flip() end if pad:down() then screen:blit(60, 80, down) screen.flip() end if pad:left() then screen:blit(30, 65, left) screen.flip() end if pad:l() then screen:blit(4, 6, l) screen.flip() end if pad:r() then screen:blit(403, 4, r) screen.flip() end if pad:select() then screen:save("screenshot.tga") end if pad:start() then break endGeändert von yaustar (07-18-2007 um 08:22 AM Uhr) Grund: Automerged Doublepost
[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]
-
07-18-2007, 08:24 AM #7697QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
you forgot to end the while true do place an end at the very end of the script
-= Double Post =-
also i surgest takeing out all those sceen.flips and place just 1 right before you end the while true doGeändert von slicer4ever (07-18-2007 um 08:25 AM Uhr) Grund: Automerged Doublepost
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
-
07-18-2007, 08:26 AM #7698
Because It told me to do so here which is the guide I followed to make this, look on page 4 it says to do that. It didn't say to do a Vblank because then that would need a screen.wait()
Zitat von yaustar
-= Double Post =-
OH I SEE I FORGOT THE WHILE TRUE DO END THING! thanks will try give me one second to test - the screenflips were told to be done by the guide I was just following the guide and also just wondering but if I do screen.flip(1) will that put the screen upidedown?
Zitat von slicer4ever
EDIT: it works now yay - the screen flips are because when you let go of the button the screen has to clear so that it don't show all the buttons againGeändert von Gam3freQ (07-18-2007 um 08:32 AM Uhr) Grund: Automerged Doublepost
-
07-18-2007, 08:30 AM #7699QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Didn't I just explain why and how we use them in my last post? Did you just ignore it?Because It told me to do so here which is the guide I followed to make this, look on page 4 it says to do that. It didn't say to do a Vblank because then that would need a screen.wait()[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]
-
07-18-2007, 08:33 AM #7700QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
screen.flip does not actually flip the screen upside down it only flips the unseen buffer to be seen
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
-
07-18-2007, 08:34 AM #7701QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
PSP-programming 's Lua tutorials are terrible. Use these instead:
http://wiki.ps2dev.org/psp:lua_player:tutorial
http://www.evilmana.com/tutorials/lua_tutorial_list.php
They are at least slightly better.[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]
-
07-18-2007, 08:34 AM #7702
no i didn't ignore it
Zitat von yaustar
Because As long as you hold the button the image will display, and when you let go the image dissapears. if the vbank starts then that means that when i let go it will still be displayed right?
Zitat von yaustar
WIll try now that I got my first button tester working!
Zitat von yaustar
oh lol I was just wondering if I put a 1 in there if it would do that
Zitat von slicer4ever
EDIT: i do remember somewhere in that code I put it to play a sound, but i don't remember where and i don't hear the sound
-
07-18-2007, 08:37 AM #7703QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
NO as i said the screen.flip() well only flip the unseen to seen so calling them at diffrent points does u no good, just call one right before you end the while true do loop
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
-
07-18-2007, 08:40 AM #7704QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
This is how the while loop should look like:
Code:while true do screen:blit(0, 0, background, false) pad = Controls.read() screen:print(135, 251, "Press 'Start' to restart", blue) screen:print(110, 261, "Press 'Select' for a screenshot", blue) screen:print(383, 35, "Support:", black) screen:print(365, 45, "PS3Lounge.net", orange) screen:print(365, 55, "scriptscribbler.com/psp", gray) if pad:cross() then screen:blit(50, 228, x) end if pad:circle() then screen:blit(90, 195, circle) end if pad:triangle() then screen:blit(45, 165, triangle) end if pad:square() then screen:blit(15, 195, square) end if pad:up() then screen:blit(60, 40, up) end if pad:right() then screen:blit(90, 65, right) end if pad:down() then screen:blit(60, 80, down) end if pad:left() then screen:blit(30, 65, left) end if pad:l() then screen:blit(4, 6, l) end if pad:r() then screen:blit(403, 4, r) end if pad:select() then screen:save("screenshot.tga") end if pad:start() then break end screen.waitVblankStart() screen.flip() end[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]
-
07-18-2007, 08:42 AM #7705
whoa amazing I'll get on those tutorials you linked right away because apparently psp-programming sucks at this. the above seems to make alot more sense even though both work, so i will definately not do this
Zitat von yaustar
-
07-18-2007, 08:42 AM #7706QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
also u didn't put in the while loop to play sound u only loaded in sound
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
-
07-18-2007, 08:44 AM #7707
a vbank is 1 60th of a second because 60 vbanks is one second right? and i put it to stay on Loading 99% for 240 vbanks which is 4 seconds so that is what it is
Zitat von yaustar
The tutorial only showed how to play text and images not sounds it only said how to load the .wav files
Zitat von slicer4ever
-
07-18-2007, 08:45 AM #7708QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
The AI tutorial is fine, it was written by someone who knows what he/she is talking about.
Zitat von Gam3freQ
-= Double Post =-
No. What you are trying to say is that a Vblank occurs 60 times a sec which isn't true. This depends on the screens refresh rate. At the moment my PC monitor is 75hz so it has 75 vblanks. Try again.
Zitat von Gam3freQ
Geändert von yaustar (07-18-2007 um 08:47 AM Uhr) Grund: Automerged Doublepost
[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]
-
07-18-2007, 08:49 AM #7709QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
if remeber correctly i believe it was:
play:sound(sound name here);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
-
07-18-2007, 08:50 AM #7710
so the below isn't true? wow I really need to start over on this
Zitat von yaustar
so the vblank is the refresh rate?
Zitat von psp-programming.com
will try this
Zitat von slicer4ever


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