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 am making a lua game (card game uno) and i need help the whole way i will give credit ...
-
08-25-2008, 05:48 PM #9331
- Registriert seit
- Aug 2008
- Beiträge
- 20
- Points
- 2.612
- Level
- 31
- Downloads
- 0
- Uploads
- 0
Help me
I am making a lua game (card game uno) and i need help the whole way i will give credit to anyone who helps me. if it is easier i can get help through pm. this topic is crowded. so can anyone help me along the way. question 1. what do i do first?
-
08-25-2008, 05:58 PM #9332QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
First, you stop using an obnoxious font. Second, you go find some basic tutorials, documentation, and reference. Third, you make your game. Simple.
-
08-25-2008, 06:02 PM #9333
TurtlesPwn: I would have thought You would have snapped
But seriously do it yourself, because its alot more rewarding and you learn better.My Releases:
---------------------------------------------------
[URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]
[URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]
[URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]
[URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]
-
08-25-2008, 06:23 PM #9334words 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
That'll tell you how to do it HomebrewModder.Code:t = 0 while true do screen:clear() for i = 33, 127 do screen:print(math.random(0,480),math.random(0,272),string.char(i),Color.new(math.random(0,255),math.random(0,255),math.random(0,255))) end screen:print(math.sin((math.atan(1) * 4) * 2 / 360 * (t*2)) * 150 + 192.5,math.cos((math.atan(1) * 4) * 2 / 360 * t) * 100 + 131,string.char(71,84,70,79,32,32,78,79,79,66,33,33),Color.new(255,255,255)) screen.waitVblankStart() screen.flip() t = t + 1 end
...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
-
08-25-2008, 06:35 PM #9335Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-
08-25-2008, 06:46 PM #9336QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
If I'm remembering my ASCII table correctly, what SG57 is trying to say is please leave, newbie. GTFO NOOB!!
-
08-25-2008, 06:55 PM #9337words 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
In a nicer fashion Turtles ;)
I'm surprised you haven't gone off on an insulting obfuscated code rampage to release your stress :) You should try it ;)
...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
-
08-25-2008, 07:02 PM #9338QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Knowing my luck, someone would convert it to plain english and not be discrete about it. It's easier to just get mad in plain english.
-
08-25-2008, 07:59 PM #9339Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Can we use this more often? I like it.
-
08-26-2008, 06:02 AM #9340
Can I crop images before I blit them and save them to a variable, or would I have to crop them during bliting. I am using a sprite sheet.
My Releases:
---------------------------------------------------
[URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]
[URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]
[URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]
[URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]
-
08-26-2008, 01:33 PM #9341QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You can do either. Personally, I prefer the latter.
[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]
-
08-26-2008, 03:10 PM #9342
Thanks. I just figured it would be easier to animate with them already in variables as I would only have to change the Player.img
My Releases:
---------------------------------------------------
[URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]
[URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]
[URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]
[URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]
-
08-27-2008, 08:56 PM #9343Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Having a problem loading sounds. I removed the sounds completely from the script and it loaded perfectly. I do not have the location wrong at all and cannot think for the life of me must be wrong with it. I have tried this before and they worked perfectly but after I reorganized my project files and decided to test out my project it didn't work.
And here is the error I get:Code:opening = Sound.load ("Resources/Intro/Opening.wav") opening1 = Sound.load ("Resources/Intro/Opening1.wav") opening2 = Sound.load ("Resources/Intro/Opening2.wav") opening3 = Sound.load ("Resources/Intro/Opening3.wav")
Line 10 is where my code for loading the sounds starts. Can anyone think of why this is not working? I am trying to get my project down but little things like these keep stunting my progress.Code:Error: SCRIPT.LUA:10: error loading sound
Thanks,
-Daniel
-
08-27-2008, 09:21 PM #9344Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Lua Player only supports 16-bit mono WAV files.
Ensure yours match this format.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-27-2008, 09:23 PM #9345Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Yes, it does, plus there is the fact that it worked before. Does this mean it is a problem with the code I am using? I am on LPHM6.6 and I have used it before to launch the same program. The only thing different I did was move everything to its own folder, hence the "Resources/Intro" location.
-
08-27-2008, 10:01 PM #9346Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Ensure the path you're using is correct.
It could be a possible bug with LPHM.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-28-2008, 01:48 AM #9347Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Heh, no need. I talked to Homemister about it and he fixed a bug that made that happen. Thanks for your help too IWN.
-
08-29-2008, 06:59 AM #9348words 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
Kinda ironic there huh? :P (person who made a better lua interpreter correcting an old one)

...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
-
08-29-2008, 07:11 AM #9349
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 1
- Points
- 2.282
- Level
- 28
- Downloads
- 0
- Uploads
- 0
Spoiler for Animation Code:
I get an error that says, : Error: index.lua:159: '<eof>' expected near 'end'
Can anybody help me out?
-
08-29-2008, 08:12 AM #9350QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
It's a syntax error. If you honestly can't figure out the errors, I have a few suggestions.
- Don't ask us to find it for you.
- Read http://www.lua.org/pil/
- Pay attention on the sections about Tables.
I suggest you read PIL in it's entirety before continuing on any game you are working on.
Please, take advice from those who are more experienced than yourself.
Additionally, learn to indent your code, so that it is easier to read. It will only benefit yourself.
Code:-- Global scope, no indenting function SomeFunction(a, b) -- Indent, new scope if a == b then -- Indent, new scope return 1 end -- Same scope, indent only once return 0 end
-
08-29-2008, 10:11 AM #9351Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Oh, lol. Well it really is just because of the specific situation I'm in. He is helping me translate my project to be compatible with LPHMv2 but meanwhile I am still working on it so I am still coding in a LuaPlayer HM 6.6 and below compatible way as I am still getting the hang of LPHMv2(shouldn't be too hard but I am trying to get my project done first before anything else). So that's why I would need a fix for HM 6.6 because my project isn't fully compatible with LPHMv2 yet.
-
08-29-2008, 12:47 PM #9352
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 3
- Points
- 2.295
- Level
- 28
- Downloads
- 0
- Uploads
- 0
hi guys im newbie at lua programming so
im tried and done smth but i wanna do Ai matrix code rain?(binary)
just a simple 101001010101 randomized code rain with lua
just like this
1001010010101111101010100 10010111010
1001010010101111101010100 10010111010
0010110101010110011010001 01000101010
1010010111010101001010010 10101011101
1010111010101101011101011 10101010101
0010110100010101000101011 11011100101
1010000100011110101011101 01110101010
help me pls :)
-
08-29-2008, 01:34 PM #9353QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
-
08-29-2008, 01:46 PM #9354
Achievements:
- Registriert seit
- Aug 2008
- Beiträge
- 3
- Points
- 2.295
- Level
- 28
- Downloads
- 0
- Uploads
- 0
thx dude but ive luaplayer and i know basics but i donno how to know that?
-
08-29-2008, 01:51 PM #9355QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
-
08-29-2008, 02:00 PM #9356QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
No, you don't know the basics. If you did, you would know where to start.
Now do what I said if you actually want to do this.
-
08-29-2008, 03:35 PM #9357lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
-
08-29-2008, 03:59 PM #9358
My Releases:
---------------------------------------------------
[URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]
[URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]
[URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]
[URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]
-
08-29-2008, 05:09 PM #9359QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Yea, it sure would be.
[size=3][url=http://luaplayer.org/forums/index.php?topic=507]Complete Lua development cycle outline[/url][/size]
-
08-29-2008, 05:34 PM #9360
Nice signature ^^
My Releases:
---------------------------------------------------
[URL="http://forums.qj.net/showthread.php?t=145654"]ROFLFlasher[/URL]
[URL="http://forums.qj.net/showthread.php?t=144892"]DTS MGS Edition[/URL]
[URL="http://forums.qj.net/showthread.php?t=143735"]Arkanoid Deluxe Beta[/URL]
[URL="http://forums.qj.net/showthread.php?p=2144700#post2144700"]SAVIOR![/URL]


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