Zeige Ergebnis 9.571 bis 9.600 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; lol another rpg that wont make it...
-
12-13-2008, 11:07 AM #9571
lol another rpg that wont make it
-- Code Monkey : Sarien, Fishguts, Cracks and Crevices --
"Did IQ's just drop sharply while I was away?" (Ripley)
-
12-13-2008, 11:23 AM #9572QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- The Netherlands
- Beiträge
- 330
- Points
- 3.567
- Level
- 37
- Downloads
- 0
- Uploads
- 0
I will make a nice Dragonball Z RPG even with a story mode with various missions, so don't say it doesn't go to make it;) And I won't release it soon because I'm going to put a lot of work in it and a lot of time;)
P.S. I will release only one version containing al the features, not any beta's or full-of-bugs demo'sGeändert von malliet (12-13-2008 um 03:06 PM Uhr)
-
12-13-2008, 06:58 PM #9573QJ Gamer Bronze
- Registriert seit
- Aug 2007
- Ort
- Everywhere
- Beiträge
- 206
- Points
- 5.826
- Level
- 49
- Downloads
- 0
- Uploads
- 0
-
12-13-2008, 07:32 PM #9574QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
http://lmgtfy.com/?q=is+pge+luaplayer
read on and find out yourself.
simple answer: no.[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
12-13-2008, 07:41 PM #9575QJ Gamer Bronze
- Registriert seit
- Aug 2007
- Ort
- Everywhere
- Beiträge
- 206
- Points
- 5.826
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Hmm.. never heard of that. So it's almost like a new language, but just a new way to interpret lua.. right?
Like, a luaplayer competitor?
-
12-13-2008, 08:38 PM #9576QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
It's not a competitor, it's a straightup murderer. PGE Lua destroys Luaplayer. They both use the core lua language but each has different graphical, sound, controls, etc API functions.
[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
12-13-2008, 10:16 PM #9577QJ Gamer Bronze
- Registriert seit
- Aug 2007
- Ort
- Everywhere
- Beiträge
- 206
- Points
- 5.826
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Oh. So how much better is it?
What can a game written for Luaplayer not do, that it can if written for PGE?
Like, what would you say if you were trying to convince someone to switch and relearn the syntax?
-
12-14-2008, 02:30 AM #9578Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
OMG


. PGE is 100x better than Luaplayer. You can write anything with Luaplayer, but there comes a time where you could write really efficiently but Luaplayer wouldn't by up for the job. You could get write & making your game but that FPS will drop. Thats were PGE comes in, its alot faster & has been coded up from scratch.
That boundary which you can get in Luaplayer, is near enough extinct. In Luaplayer if your getting a constant 60 FPS thats ok, but in PGE that would be very poor.
You wouldn't relearn anything, the API is 100% new, you'd have to just learn it, it's not hard at all.
Zitat von chrisp6825
You should read this
-
12-14-2008, 09:30 PM #9579QJ Gamer Bronze
- Registriert seit
- Aug 2007
- Ort
- Everywhere
- Beiträge
- 206
- Points
- 5.826
- Level
- 49
- Downloads
- 0
- Uploads
- 0
-
12-14-2008, 09:34 PM #9580QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 550
- Points
- 5.381
- Level
- 47
- Downloads
- 1
- Uploads
- 0
It was being worked on, but it will be completed once the API is stable.
(O/T- Finally, the internet's been down for me for 4 days. Damn budget ISP...)
-
12-14-2008, 09:50 PM #9581QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
nielkie i have verizon for like 20 bucks a month and its never gone out
also, chris, you're programming for something made for the psp, you should test on a psp. and its not a new syntax, it is a new API. syntax is how you gotta type ifs and thens and loops and function arguments and all that crap. API is the functions to draw stuff you use. just look at the documentation and get an idea for luaplayer equivs in PGE.[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
12-15-2008, 01:58 AM #9582QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 550
- Points
- 5.381
- Level
- 47
- Downloads
- 1
- Uploads
- 0
@TurtlesPwn
The problem is that I live in Australia. $70 a month gets me 1.5MBit DSL with an 80GB download cap.
-
12-15-2008, 02:23 PM #9583QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
How would the be the best way to see if a line of text exist??? I need to be able to search and be able to now if it does or doesn't exist.
Example text file
Say I need to see if "line2" exist.Code:line1 line2 line3 line4
My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
12-15-2008, 03:14 PM #9584Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Read the whole file, use string.find() to find what your looking for, if its there it'll return the start character to the end character e.g 5-9. If not nil.
-
12-15-2008, 03:24 PM #9585QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 550
- Points
- 5.381
- Level
- 47
- Downloads
- 1
- Uploads
- 0
@dan Better to use Lua's line operations
Code:function findLine(fileHandler, searchLine) for line in fileHandler:lines() do if line == searchLine then return true end end return false end
-
12-15-2008, 03:40 PM #9586Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Yeah, i see what you mean.
-
12-15-2008, 03:53 PM #9587QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
Thanks, I will try using Nielkie's function. I may need more help later though, but I will address that problem when I get there.
EDIT
Quick question what luaplayer do I need for the command???Geändert von corytheidiot1 (12-15-2008 um 04:06 PM Uhr)
My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
12-15-2008, 04:09 PM #9588Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
by coding it, did you really just ask that?
using
Code:function findLine(fileHandle, searchLine) for line in fileHandle:lines() do if line == searchLine then return true end end return false endshould workCode:white = Color.new(255, 255, 255) function findLine(fileHandle, searchLine) for line in fileHandle:lines() do if line == searchLine then return true end end return false end while true do screen:clear(white) pad = Controls.read() if pad:cross() and not oldpad:cross() then file = io.open("file.txt") if findLine(file, "this line") == true then found = true else found = false end file:close() end if found == true then screen:print(1, 1, "line found") else screen:print(1, 1, "line not found") end screen.waitVblankStart() screen.flip() oldpad = pad end------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
12-15-2008, 04:15 PM #9589Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
You don't need the '== true' though, either way will work.
-
12-15-2008, 04:32 PM #9590QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
The whole question about the version is because I get an error on luaplayer .20 for windows. I am goin to use HM in the PSP but I am on a spare pc and no spare USB ports so transfer is to much hassle to constantly test.
Also, I am a little out of it at the moment.My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
12-15-2008, 04:36 PM #9591QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
seriously, dont use WLP. and if it errors on WLP and on LPHM but not on normal lp how would you ever know? be persistent and eliminate one error at a time.
[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
12-15-2008, 04:41 PM #9592QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
The only function that needs HM is the web browser. Right now I am trying to refine the functions that could be carried out by .20. I do understand what you are saying tho.
EDIT
Never mind about the testing issues. I forgot I have irshell so I am just goin to use nethost and run the eboot that way
-=Double Post Merge =-
I keep getting "attempt to index local 'fileHandler' (a nil value)"Geändert von corytheidiot1 (12-15-2008 um 05:10 PM Uhr) Grund: Automerged Doublepost
My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
12-15-2008, 11:41 PM #9593Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
omg lua devs these days are stupid, use iRShell and USB Host, then simply launch your app from lowser and restart it when you have updated the file, but still it wouldnt affect you as you have said you have no usb ports but still other devs should do that.
p.s. can you show me the code you are using aswell because that error sounds like you are passing it an invalid file path or something------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
12-16-2008, 05:33 AM #9594QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
"I keep getting "attempt to index local 'fileHandler' (a nil value)"
Gee I wonder what the hell that means. Maybe it means youre trying to use something called fileHandler which is undefined?[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
12-17-2008, 04:31 AM #9595QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- The Netherlands
- Beiträge
- 330
- Points
- 3.567
- Level
- 37
- Downloads
- 0
- Uploads
- 0
Ej everyone I have a big problem. If I don't use a background image (so the background is black) I can see my sprite etc. but if I use a background image for my game, I can't see my sprites and my buildings anymore. Does somebody know how to solve this, because I think it's something with transparant backgrounds or something.
-
12-17-2008, 04:41 AM #9596Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Your most probably blitting the background image after the sprite.
E.g
screen:blit(--sprite)
The background should be before that.
again example,
screen:blit(--Background)
screen:blit(--sprite)
-
12-17-2008, 04:45 AM #9597QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- The Netherlands
- Beiträge
- 330
- Points
- 3.567
- Level
- 37
- Downloads
- 0
- Uploads
- 0
It works. Thanks for your help
Geändert von malliet (12-17-2008 um 06:53 AM Uhr)
-
12-17-2008, 01:41 PM #9598QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
12-18-2008, 09:09 AM #9599Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
you on that computer yet?
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
12-18-2008, 10:23 PM #9600QJ Gamer Bronze
- Registriert seit
- Aug 2007
- Ort
- Everywhere
- Beiträge
- 206
- Points
- 5.826
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Is this possible?
Code:x = 15 function blah(local x) -- local, so it doesnt interfere with earlier 'x' screen:print(0,0,x) end blah(3) -- prints 3, instead of 15
I know that if there is a way to do that, then that isn't the way to do it.
But can you do this? Or do functions already make arguments local?
Thanks.


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