![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on My first lua script! within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Yay, I made my first lua script! Note: It has no usefulness whatsoever, so don't download it looking for some ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
Yay, I made my first lua script!
Note: It has no usefulness whatsoever, so don't download it looking for some great app. It's called Tux says hello. I tried to keep my first script simple, so it isnt much. I got all the bugs out too. I don't really care that an experienced lua coder could make this in 5 minutes, it's my first script ever. Comment on it if you wish. Last edited by TacticalPenguin; 10-14-2006 at 09:14 PM.. |
|
|
|
|
|
#3 | |
![]() |
Quote:
|
|
|
|
|
|
|
#6 |
![]() |
urza please. you have done absolutley nothing to help the comunity exept make a thread of everyones themes and oyu made 1 or 2 yourself. at least pengiun is doing acual coding and getting into the scene.
keep it up pengiun
__________________
Veteran [CENTER][COLOR="Green"][FONT="Fixedsys"] PSN Name[/FONT][/COLOR]: Eldiabl1o[/CENTER] [center][QUOTE=gmansixfo]Since I have to reset my psp whenever i get out of an emulator. Can this damage my psp.[/QUOTE][/center] |
|
|
|
|
|
#8 |
![]() Look at my user title :p
Join Date: Feb 2006
Real First Name: Dave
Location: Texas
Just Played: Banjo Kazooie
Posts: 1,178
Trader Feedback: 0
|
yeah im sure someone who just read the guides couldnt have done that in 2 minutes i have read the guides and am in the process of making a side scrolloing game but have had no luck so I started over and read them again and i learned new stuff. point is that for everybody coding isnt easy and you should welcome new developers not anger them and tell them thier stuff isnt any good.
i say good job tactical penguin keeep it up |
|
|
|
|
|
#11 |
![]() |
i tried it once...i made an app like yours and then just was tired of it. it was too much work to learn comands and how to do good ****. now i have so much more respect for coders and less for ppl like urza that come into threads like this bashing the people who are trying to learn and code
__________________
Veteran [CENTER][COLOR="Green"][FONT="Fixedsys"] PSN Name[/FONT][/COLOR]: Eldiabl1o[/CENTER] [center][QUOTE=gmansixfo]Since I have to reset my psp whenever i get out of an emulator. Can this damage my psp.[/QUOTE][/center] |
|
|
|
|
|
#13 |
![]() NeilR is back
|
good work and it does take awhile for people like you and me who are starting out i made one of these but differnt yesterday took awhile. right now im working on a raceing type game, its not easy i can really respect the great devs now it takes alot of efforrt
good work man
__________________
[SPOILER="Donations"]Donators: TMK 1Mill, cowsruledaworld 300k, Arsonist 75k and 10 k, and thx spiral for the prem....Thank you every one that has donated :D[/SPOILER] [SPOILER="funny comic of the day!!!"][IMG]http://www.explosm.net/db/files/Comics/Matt/self-diagnosis.png[/IMG][/SPOILER] Join #QJChat and #marshalls on IRC, at irc.toc2rta.com |
|
|
|
|
|
#14 |
![]() |
I don't see the reason to flame the man/woman if he tryed to make something. It shows progress..He/she just started..Soon he'll do better things..
I look foward to hear from your success in the future if it happens. |
|
|
|
|
|
#15 |
![]() ![]() ...in a dream...
|
Urza is right on the part to not make threads like this. Wow, your first script, awesome, sweet, amazing, not everyone can put up with simple little examples... Oh and a novice dev could make this in less than 5 minutes :X Brand new dev, dunno...
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#16 |
![]() NeilR is back
|
well if its his first script then im guessing hes not a novice but a beginer
__________________
[SPOILER="Donations"]Donators: TMK 1Mill, cowsruledaworld 300k, Arsonist 75k and 10 k, and thx spiral for the prem....Thank you every one that has donated :D[/SPOILER] [SPOILER="funny comic of the day!!!"][IMG]http://www.explosm.net/db/files/Comics/Matt/self-diagnosis.png[/IMG][/SPOILER] Join #QJChat and #marshalls on IRC, at irc.toc2rta.com |
|
|
|
|
|
#17 |
![]() |
Its not that I'm bashing new devs, I'm just saying if everyone put up an example after they completed some tutorial, we would have hundreds of identical threads like this. FREE_YOURESAM, please think before you post. Thank you.
|
|
|
|
|
|
#19 | |
![]() NeilR is back
|
Quote:
__________________
[SPOILER="Donations"]Donators: TMK 1Mill, cowsruledaworld 300k, Arsonist 75k and 10 k, and thx spiral for the prem....Thank you every one that has donated :D[/SPOILER] [SPOILER="funny comic of the day!!!"][IMG]http://www.explosm.net/db/files/Comics/Matt/self-diagnosis.png[/IMG][/SPOILER] Join #QJChat and #marshalls on IRC, at irc.toc2rta.com |
|
|
|
|
|
|
#20 | |
![]() |
Quote:
|
|
|
|
|
|
|
#22 | |
![]() ![]() Developer
|
Quote:
The only encouragement developers should need is the opportunity to create a great game or application, not acceptance by other developers, because that isn't worth much at all. |
|
|
|
|
|
|
#25 |
![]() ![]() sceKernelExitGame();
|
Just a tip. Declre all variables before your main loop (while true do) and do all in game stuff in the main loop. Also you only need to switch the screen rom off-screen buffer to on-screen buffer once per loop. So you only need screen.flip() at the end... This is your script re-organized
![]() Code:
white = Color.new(0, 0, 0)
blue = Color.new(0, 0, 255)
while true do
screen:print(0, 0, "Loading: 30%", blue)
screen.waitVblankStart(120)
screen:clear()
screen:print(0, 0, "Loading: 70%", blue)
screen.waitVblankStart(120)
screen:clear()
screen:print(0,0, "Loading Complete", blue)
screen.waitVblankStart(120)
screen:clear()
background = Image.load("bg.PNG")
screen:blit(0,0, background)
screen:print(0, 0, "Tux says hello!", blue)
screen.waitVblankStart(240)
screen:clear()
screen:blit(0,0, background)
screen:print(0, 0, "Tux says goodbye!", blue)
screen.waitVblankStart(180)
screen:clear()
screen:print(0,0, "Press Home to exit.", blue)
screen.flip()
screen.waitVblankStart()
end
__________________
|
|
|
|
|
|
#27 |
![]() ![]() ...in a dream...
|
Bronx, his way is just fine. Sure, in LUA you can pause the vsync, but later when he moves onto C and deals with un-delayable vsync's (TIFF SDK is a good example) he'll need to use a function to delay the thread, but that won't update the buffer (display), meaning he'll have to change it on, delay, than change it back off. Something I learned first hand in Space Invaders for 2.8 TIFF
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#28 | |
![]() ![]() sceKernelExitGame();
|
Quote:
![]() http://www.psp-programming.com/dev-f...pic.php?t=1166
__________________
|
|
|
|
|
|
|
#29 | |
![]() ![]() Developer
|
Quote:
![]() You should look into using code editors, because aside from color coding, some of them actually automatically indent the lines after function definitions and control statements. I thought Notepad++ did so, but I've been doing it on my own lately...maybe someone who uses conTEXT could say if that one auto-indents. @Bronx Actually his way isn't just fine, it has to be the way he had it. The only thing that would happen with your code is after 13 seconds it would say "Press Home to exit." in the top left of the screen. ![]() EDIT: Also, you forgot to move his image loading line to outside of the main loop. |
|
|
|
|
|
|
#30 |
![]() ![]() sceKernelExitGame();
|
really? That doesn't make sense... :?
w/e... sorry about that
__________________
|
|
|
|
![]() |
| Tags |
| lua , script |
| Thread Tools | |
|
|