no im pretty sure that any psp on the receiving end of an app of hm would get the data even if it was not ment for that psp, you need to program it in if you want it to realize which psp is which.
Printable View
Um I have a small question..
if you were trying to create a top-down style game and wanted to "turn the lights out" and use a flashlight, how would the best way to do that be?
I was thinking of making a real big black box that has a hole in the middle for the player's image, and a flashlight's beam of light cut out. But I don't think this would be the best and only way.
Any thoughts?
By the way, here's a pic to help describe what I'm talking about :
Spoiler for image:
Thanks.
Use alpha blending in PGE.
Quick question: Is there a transform function in LUA? I'm working on a Dragonball Z RPG and I want if you press X Goku's transforms in a super saiyen
That's what I meant, but I don't want it to transform that way. I have pictures that he's powering up and yelling etc. and finnaly becomes Super Saiyen. Just like in the GBA Dbz games. But I think that's impossible with lua.
no, it is not impossible. you program it yourself....that's part of what programming is.
I tried, but I failed, and that's why I'm asking it here. But never mind; I will try it again;)
obviously you didn't think it through.
make a variable for current image of player
if player presses x, change the image into the next image in the animation series
then after a couple loops, change it to the next
repeat that until it is the final image
draw the current player image every loop
lol another rpg that wont make it
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's
http://lmgtfy.com/?q=is+pge+luaplayer
read on and find out yourself.
simple answer: no.
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?
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.
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?
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:
Zitat von chrisp6825
You should read this
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...)
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.
@TurtlesPwn
The problem is that I live in Australia. $70 a month gets me 1.5MBit DSL with an 80GB download cap.
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
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.
@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
Yeah, i see what you mean.
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???
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
end
should 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
You don't need the '== true' though, either way will work.
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.
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.
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)"
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
"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?
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.
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)
It works. Thanks for your help:D
you on that computer yet?
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.