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; I don't think ANY luaplayer YET supports unzipping, That could be a feature 4 luaplayerHM in the future...
-
08-06-2008, 07:38 AM #9121Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
I don't think ANY luaplayer YET supports unzipping, That could be a feature 4 luaplayerHM in the future
-
08-06-2008, 07:41 AM #9122Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
As if it isnt bloated enough :/
-
08-06-2008, 09:00 AM #9123Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
:ROFL: true. I didn't ask though. I think Zip support is pretty useless.
I don't see myself ever needing to use it.
My question: Could i connect to a website. And download a file On that website, using the correct url.
eg http://www.watever.com/file.lua
And then could i download the new script to replace(overwrite) the new 1??
-
08-06-2008, 09:13 AM #9124QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
http://tacticalpenguin.com/snippets/wifidemo.lua
Or wait for PGELua
-
08-06-2008, 09:51 AM #9125Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
How Long until PGE??
I haven't seen IWN on in a while.
-
08-06-2008, 09:53 AM #9126QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Sooner than you probably think
-
08-06-2008, 10:46 AM #9127
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
Hey fellas,
well um I'm not sure if i can post here since I'm not really a "developer" but here goes.
I'm learning LUA and I have seen a few tutorials around via google and I stumbled upon the "Ultimate QJ Guide" which had a few tutorials but not what I am looking for.
Anyways, is there a tutorial on sprite animation? If not could someone just tell me the basics of sprite animation and i could fill in the rest.
It does not matter if its on multi images or sprite sheets
thanks in advance
-
08-06-2008, 10:47 AM #9128QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Take a look here. :)
-
08-06-2008, 11:01 AM #9129
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
Thanks for the link Moose I appreciate it.
Its too bad I don't know how to use C, I will try and convert it but I am not sure if I will get this to work haha.
-
08-06-2008, 11:17 AM #9130QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
basically have a timer and have it display a different image at a certain time interval.
-
08-06-2008, 11:32 AM #9131QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
No.
Have an integer counter, not a timer, counting, and display each image for an interval of that counter's range of counting, and then when it passes the last frame's range, reset to 0 and start over.
http://www.forums.evilmana.com/index...;topicseen#new
-
08-06-2008, 11:36 AM #9132Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
TurtlesPwn got to it.
-
08-06-2008, 11:49 AM #9133
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
I don't think that will work. I am trying to make it so when my character moves it animates with the movement. Could I use an if then statement saying that when it moves, lets say 2 pixels over to resume, wait 1, then pause?
-
08-06-2008, 12:43 PM #9134Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-
08-06-2008, 12:47 PM #9135Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Okay, my post that I erased had to do with your problem. So apparently I did not need to erase ti.
Depending on what you want to do, there are different methods for animation. In your case, you want to make the character move and animate at the same time so it looks like he is walking. The simplest way to do this would be to have two frames for each movement. That is a walking and standing frame for going North, South, East, and West.
Now, if you have this, good, but if you have more than just two frames for each direction i suggestion you cut it down to just two for now that way you can learn the basics. I will not be posting any code that way you can figure out how to code it yourself and therefore understand it better but I will give you the concept.
When you make the character move you want it to change its frame to a walking frame then when it moves again it should change back to a standing frame. These two frames combined make it look like its legs are actually moving and walking. So, in order to do this, you should basically make it so that when your sprite walks it displays frame 1. If it walks again and frame 1 is showing it should display frame 2. In this way it will alternate between frame 1 and frame 2 so that it looks like it is walking.
I highly recommend you try to figure out the code for yourself as it will igve you a better learning experience than if you had someone show you exactly how it works.
-
08-06-2008, 12:55 PM #9136Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
THe best advice, You also get a sense of achievement lol
-
08-06-2008, 12:58 PM #9137Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-
08-06-2008, 12:58 PM #9138
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
ok i am working an old code which i used to simply move a sprite around ill PM you wicked, with my sample code
-
08-06-2008, 01:27 PM #9139QJ Gamer Green
- Registriert seit
- May 2008
- Ort
- GA, USA
- Beiträge
- 243
- Points
- 9.319
- Level
- 64
- Downloads
- 0
- Uploads
- 0
I need help with getting luaplayerhm7 to download a txt file from my site. And depending upon what information is in that txt file I need it to be able to download a zip file from my site. They will both be stored in the root of my site, e.g. www.mysite.com/(files i need here). A bit of code i could use would help greatly.
My Anime List || My Homepage- Keep up with my projects || Userbar
Projects:
Unamed RPG- In Progress
Lua File Manager & Extraction GUI
PSP Soundboard
-
08-06-2008, 01:38 PM #9140QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
-
08-06-2008, 03:42 PM #9141
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
hey guys i cant text my script but i think this will work for sprite animation
if pad:left() and Player1[1].x > 0 and Player == Player[1]
then Player1[1].x = Player1[1].x - 2 and screen:blit(Player[1].x,Player[1].y,player2)
end
-
08-06-2008, 03:57 PM #9142Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Nope, ur saying if left is pressed and the player's X is over 0 and the Player == Player[1] --- i'm persuming this is a table then move the player. then blit the Image every time left is pressed which is not needed.
-=Double Post Merge =-
All u need 4 VERY SIMPLE animation is a variable and a function theres a clue 4 u.
Sry bout the double post.Geändert von dan369 (08-06-2008 um 03:59 PM Uhr) Grund: Automerged Doublepost
-
08-06-2008, 04:00 PM #9143
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
its not finished but i will add more to it making it basicaly alternate between player1 and player2
and yes that was a table
BUT
will it work? idc if its not needed it works right?
-
08-06-2008, 04:07 PM #9144Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
It don't think it will work.
example:
Code:timer = 0 function moveL() timer = timer + 1 if timer == 2 then change img elseif timer == 4 then change img end end
-
08-06-2008, 04:10 PM #9145
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
-
08-06-2008, 04:13 PM #9146Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
yep, but i didnt want to give the code on a plate 2 u.
U can do that urself.
-
08-06-2008, 04:15 PM #9147
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
haha i thought you were trying to test me
-
08-06-2008, 04:18 PM #9148Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
I shows basic Logic. U've passed Test 1
LOL
also don't re-use that variable more than 4 times. Otherwise..........,,.. the animation messes up.
-
08-06-2008, 04:22 PM #9149
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 13
- Points
- 2.355
- Level
- 29
- Downloads
- 0
- Uploads
- 0
dont re use the timer reset variable 4 times?
-
08-06-2008, 04:29 PM #9150Lua guy
- Registriert seit
- Jan 2008
- Ort
- Wales, cardiff
- Beiträge
- 1.442
- Points
- 11.690
- Level
- 71
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Forgot That. Have a drifferent timer 4 each animation, e.g timer2 = 0, timer3 = 0 etc.


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