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; How would I make platforms that I can jump on? Sorry, just started coding 3 days ago.:Punk:...
-
07-29-2008, 06:36 AM #9061
How would I make platforms that I can jump on?
Sorry, just started coding 3 days ago.:Punk:
-
07-29-2008, 06:37 AM #9062QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
umm, well, that would kinda work, except all you did is move the coin over, to the side so you should have.
if player.x == coin.x, and player.y = coin.y and coin.visible = "true" then
coin.visible = "false"
player.points = player.points + 10
end
add that andyou won't need to worry about it
-
07-29-2008, 06:38 AM #9063QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
add collision to the platforms
-
07-29-2008, 06:52 AM #9064
-
07-29-2008, 06:53 AM #9065QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
lol,well it's not going to magically work, lol look at the collision tut at evilmana
-
07-29-2008, 06:54 AM #9066Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
You aren't gonna make much without collision detection :/
There is a nice collision snippet on http://www.tacticalpenguin.com
-
07-29-2008, 06:56 AM #9067
-
07-29-2008, 08:16 AM #9068
The coin function doesnt worl if the coins are in the air
-
07-29-2008, 08:24 AM #9069QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
what do you mean, it should, add a if player.jumping = "true" kinda thing.
-
07-29-2008, 11:43 AM #9070
Is there a way to show an image only when no buttons are being pressed, and when I press a button the image dissapears?
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]
-
07-29-2008, 11:45 AM #9071Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
Work these thing out for yourself. You won't learn anything by continually asking for code.
-
07-29-2008, 11:49 AM #9072My 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]
-
07-29-2008, 12:02 PM #9073QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
ummm, I think so. . . I don't remeber exactly what it was, what are you using it for??mabey I can help more then...
-
07-29-2008, 12:39 PM #9074
when I press left it shows left sprite image, when I press right it shows right sprite image, when I press up it shows up sprite image, when I press down it shows down sprite image, so if I blit still sprite image it merges with the other sprite image so I need it to dissapear while im pressin up left right or down
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]
-
07-29-2008, 12:40 PM #9075Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
-
07-29-2008, 12:54 PM #9076My 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]
-
07-29-2008, 12:59 PM #9077Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
of course
-
07-29-2008, 01:15 PM #9078My 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]
-
07-29-2008, 01:38 PM #9079QJ Gamer Bronze

- Registriert seit
- Jul 2006
- Beiträge
- 550
- Points
- 5.381
- Level
- 47
- Downloads
- 1
- Uploads
- 0
Each pad function returns true or false, so learn Lua's Boolean operations.
orCode:if pad:left() then blah else blah end
orCode:if pad:left() then blah elseif bla2 then blah end
orCode:if pad:left() ~= true then
orCode:if pad:left() == false then
Code:if not pad:left() then
-
07-29-2008, 03:29 PM #9080My 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]
-
07-30-2008, 01:00 PM #9081Seven Year Vet. BOW DOWN.

- Registriert seit
- Dec 2005
- Ort
- Manchester, UK
- Beiträge
- 2.240
- Points
- 14.794
- Level
- 78
- My Mood
-
- Downloads
- 1
- Uploads
- 0
I tried using this in a game I'm making, but it just lags like hell. Anyone have any idea what the problem might be? I know that I havn't put the function in the loop, but I did call it. If I leave all the surrounding code alone and put '--' in front of the drawcircle() so that luaplayer skips it, it runs fine, but I don't see why a simple calculation would slow it so much.
-
07-30-2008, 01:13 PM #9082OMFG

- Registriert seit
- Jul 2005
- Ort
- Toronto
- Beiträge
- 2.814
- Points
- 19.453
- Level
- 88
- Downloads
- 0
- Uploads
- 0
Just look at it...
Every single loop if you call that, it has to add 0.005 onto degree all the way up until it gets to 6.4. That's 1280 times.
That would probably do it... Try something like 0.05 (128 times), see if that helps?
-
07-30-2008, 01:16 PM #9083Seven Year Vet. BOW DOWN.

- Registriert seit
- Dec 2005
- Ort
- Manchester, UK
- Beiträge
- 2.240
- Points
- 14.794
- Level
- 78
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Ohhh yeah, Good point. I didn't even notice that, My bad. Anyway, I don't need help with this anymore, I got TacticalPenguin to show me another way to do it. Thanks anyway, though.
-
08-01-2008, 12:24 PM #9084
Is Luaplayer or LuaplayerHM 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-01-2008, 12:28 PM #9085QJ Gamer Green
- Registriert seit
- Jan 2008
- Beiträge
- 612
- Points
- 3.721
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Depends what you want it for. If you want it for making a game, generally good ol 0.16 will be your best bet but if you need to use a bunch of oneline functions to make a crappy shell then go for HM, that's about all it's used for anyways.
-
08-01-2008, 03:14 PM #9086
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-02-2008, 05:52 PM #9087Raining
- Registriert seit
- Jun 2005
- Ort
- In The Fog...
- Beiträge
- 545
- Points
- 7.355
- Level
- 57
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Okay, just a couple of questions. First of all, is the easiest way to do a credits ending just putting the y values of each line of text as something like y + 5? Using this way I would have to write each line of credit individually and have to do a lot of estimation in order to get it write which is why I ask.
Second, is there way to do fading effects by programming it? Like have one image fade into another or just have an image fade into black? I have searched but maybe I am looking for the wrong thing?
Thanks,
Daniel
-
08-03-2008, 12:15 PM #9088QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Question, I need to mave an image accross the screen, during the game, but I don't want it to just appear, I need to be able to see the movement :) any help would be appreciated.
-
08-03-2008, 04:22 PM #9089
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-03-2008, 05:15 PM #9090QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
... ummm mabey... but I don't think that would work for what I'm trying to do, but thanx. I think I figured it out. :)


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