| View previous topic :: View next topic |
| Author |
Message |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:04 am Post subject: |
|
|
| Soban wrote: | | For some reason there's a typo in graphics.c line 22 of the latest commit. It's trivial to fix, but annoying. |
Ack! My bad, very sorry... forgot to make before commiting, very bad habit... Fixed now. |
|
| Back to top |
|
 |
emumaniac
Joined: 08 May 2005 Posts: 79
|
Posted: Thu Aug 11, 2005 8:07 am Post subject: |
|
|
| nevyn wrote: | | indianajonesilm wrote: | | Hello all! I'm attempting to make an air hockey game. |
I sorta dislike rigid movement, so I couldn't help but to add acceleration to your game :P Hope you like it :)
(Lowser-adapted it while at it, too)
http://ncoder.nevyn.nu/psp/pspairhockey.zip |
anychance of merging your corrections into the original release with Eboot, so that us fans can enjoy a new game :) |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:12 am Post subject: |
|
|
| emumaniac wrote: | | nevyn wrote: | | indianajonesilm wrote: | | Hello all! I'm attempting to make an air hockey game. |
I sorta dislike rigid movement, so I couldn't help but to add acceleration to your game :P Hope you like it :)
(Lowser-adapted it while at it, too)
http://ncoder.nevyn.nu/psp/pspairhockey.zip |
anychance of merging your corrections into the original release with Eboot, so that us fans can enjoy a new game :) |
I recommend using Lowser instead of bundling with your very own eboot. If you install the latest LuaPlayer with the latest Lowser (probably to be released in a userfriendly binary format within a day, unless there's some bug), you can just drop that psp air hockey folder directly from the zip into the Applications folder, and it'll work, with no eboot bundling needed.
Secondly, that game needs a puck before being playable... |
|
| Back to top |
|
 |
indianajonesilm
Joined: 08 Feb 2005 Posts: 15
|
Posted: Thu Aug 11, 2005 9:50 am Post subject: |
|
|
| Quote: | | Secondly, that game needs a puck before being playable... |
I'm working on it :)
| Quote: | I sorta dislike rigid movement, so I couldn't help but to add acceleration to your game :P Hope you like it :)
(Lowser-adapted it while at it, too) |
Thank you so much for the acceleration! woohoo! I love it.
| Quote: | | would there be hard slap shots that would knock the disc/puck off the table? that could be some interesting play lol |
Hey thats a good idea. Maybe in a future release. I still have to figure out all this collision detection and motion vector stuff first. |
|
| Back to top |
|
 |
Mr_Snuffle
Joined: 10 Aug 2005 Posts: 1 Location: Brisvagas, 'Straya
|
Posted: Thu Aug 11, 2005 10:23 am Post subject: |
|
|
InputManager library
I'm working on an InputManager library for lua, and I'm currently in the last steps of bug fixing for the new version of lua player. What are peoples thoughts on the interface. I'm open to suggestions
| Code: | The Most Excellent PSP Lua Input Mananager 0.1
Author: James Bowling (mr.snuffle@gmail.com)
Date: 5 Aug 05
ABOUT
In an effort to make some more friendly event driven input management, I've put together this
fairly simple wrapper around the Luaplayer input functions. It allows the user to register
callback functions with different events on different buttons, deregister these events, and
check if a button is currently pressed
TODO
* Add analog stick support when I figure out exactly how I can do that
* Have friendly support for diagonal directions
CONSTANTS
Events:
INPUT_EVENT.PRESS
INPUT_EVENT.RELEASE
Keys:
INPUT_KEY.UP
INPUT_KEY.DOWN
INPUT_KEY.LEFT
INPUT_KEY.RIGHT
INPUT_KEY.SQUARE
INPUT_KEY.CIRCLE
INPUT_KEY.CROSS
INPUT_KEY.TRIANGLE
INPUT_KEY.LTRIGGER
INPUT_KEY.RTRIGGER
INPUT_KEY.HOLD
INPUT_KEY.HOME
INPUT_KEY.START
INPUT_KEY.SELECT
INPUT_KEY.NOTE
INSTALL
Place the InputManager.lua file in the same directory as your script.lua file.
Add:
dofile("./InputManager.lua")
somewhere near the top of your script
FUNCTIONS
void InputManager:register( { inputEvents }, { inputKeys }, eventCallback)
Register a callback handler to a group of events and a group of input keys. The first two
parameters (events and keys) do not need to be tables, they can also just be single values.
IMPORTANT - The eventCallback function MUST have the signature of void eventCallback(event, key)
EXAMPLE
function upHandler(key, event)
if (event == INPUT_EVENT.PRESS)
then
eventStr = "Pressed"
else
eventStr = "Released"
end
print("Up " .. eventStr)
end
InputManager:register( { INPUT_EVENT.PRESS, INPUT_EVENT.RELEASE }, INPUT_KEY.UP, upHandler )
This will register the single up handler function with both a press and release event on
the up button. Something like this would also be okay
function symbolHandler(event, key)
if (key == INPUT_KEY.CROSS) then keyStr = "X"
elseif (key == INPUT_KEY.TRIANGLE) then keyStr = "/\\"
elseif (key == INPUT_KEY.SQUARE) then keyStr = "[]"
elseif (key == INPUT_KEY.CIRCLE) then keyStr = "O"
else keyStr = "unknown" end
print(keyStr)
end
InputManager:register( INPUT_EVENT.PRESS, {INPUT_KEY.SQUARE, INPUT_KEY.CIRCLE,
INPUT_KEY.CROSS, INPUT_KEY.TRIANGLE}, symbolHandler)
*********************
void InputManager:deregister( { inputEvents }, { inputKeys } )
This will remove handlers from specified keys and events. Much like register, inputEvents
and inputKeys can be both tables or single values
EXAMPLE
InputManager:deregister( { INPUT_EVENT.PRESS, INPUT_EVENT.RELEASE }, INPUT_KEY.UP)
*********************
bool InputManager:isPressed(inputKey)
This will check if a key is currently pressed on the PSP.
EXAMPLE
if (InputManager:isPressed(INPUT_KEY.LTRIGGER))
then
-- do some stuff
end
*********************
void InputManager:process()
This needs to be added to the main loop. With out it, nothing will be driving the input
manager
EXAMPLE
while (true) do
processObjects() -- do whatever stuff your lua app is doing
InputManager:process() -- process the input
end
|
I appreciate any feedback, I'd like to get a nice interface that most everyone is happy with. I'm still tossing up if I should allow for multiple handlers registered to a single event, at the moment there can be only one _________________ See ya on the chronostream, time jockey! |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 10:40 am Post subject: |
|
|
I wrote a script for generating nightly builds. It builds the latest sources from the repository and makes a nice package with readme and install instructions. Download the latest nightly build
Snuffle: Great! I was going to write something similar myself, so thanks :P I'll look at it tomorrow when I'm less tired... |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Aug 11, 2005 11:00 am Post subject: |
|
|
| Now Lua Player has its own domain: http://www.luaplayer.org/. You can download the new version 0.7. Should be nearly the same like Nevyn's nightly build, but with source code included (perhaps we should add a Makefile target for a release-folder, where anything is copied for a release, but without source, which can be obtained by SVN). |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 11:07 am Post subject: |
|
|
| Shine wrote: | | Now Lua Player has its own domain: http://www.luaplayer.org/. You can download the new version 0.7. Should be nearly the same like Nevyn's nightly build, but with source code included (perhaps we should add a Makefile target for a release-folder, where anything is copied for a release, but without source, which can be obtained by SVN). |
Woah! Cool! :)
I totally agree with the release part. I imagine that those who download LuaPlayer does it either to play LuaPlayer apps, or write Lua apps. Neither of those targets need the C sources for LuaPlayer. If one is proficient enough to code in C, one is probably proficient enough to obtain the sources via svn. This is the rationale behind the packaging of my nightly build. I really suck at makefiles, but you're welcome to check out my nightly build shell script at ncoder.nevyn.nu/luaplayer-nightly.sh . |
|
| Back to top |
|
 |
gabriel
Joined: 11 Aug 2005 Posts: 5
|
Posted: Thu Aug 11, 2005 12:40 pm Post subject: Lua make error |
|
|
While trying to "make" Lua I get the following error:
In file included from graphics.c:2:
/usr/local/pspdev/psp/sdk/include/malloc.h:2: error: conflicting types for `malloc`
I appreciate any help/information. |
|
| Back to top |
|
 |
DiabloTerrorGF
Joined: 15 Jul 2005 Posts: 64
|
Posted: Thu Aug 11, 2005 1:51 pm Post subject: |
|
|
Here was my first LUA program(now works with .7), I just now added USB support so you can run it and write script.
PixelFixer
I had dead pixels and people said that one video that flashes the PSP screen with RGBBW will fix dead pixels, well it does work, but it was too big for 32 mb's so I made a LUA script of a faster thing that works about the same(Actually I wanna slow it down just a little bit... any ideas?). |
|
| Back to top |
|
 |
VgSlag
Joined: 30 Jun 2005 Posts: 43
|
Posted: Thu Aug 11, 2005 5:00 pm Post subject: |
|
|
Nice one guys!
Shine, how much did the domain cost; do you want some money towards it?
My GFX card died Sunday night so I've had to code at work or very very slowly at home but I'll fix up the bugs in my game and add some more rooms today and Saturday. |
|
| Back to top |
|
 |
VgSlag
Joined: 30 Jun 2005 Posts: 43
|
Posted: Thu Aug 11, 2005 6:54 pm Post subject: |
|
|
Nevyn, I've noticed the new looping on sounds doesn't work for extended periods of time.
I've got 2 sounds in my game, 1 looping and 1 not. After a while I hear the looping one stop.
The looping one always stops after I play the non looping one for the 32nd time if that helps.
A nice idea for the official release would be to enable the usb port by default on the screen that shows when you get an error and that you need to press start to restart. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Aug 11, 2005 6:59 pm Post subject: |
|
|
| VgSlag wrote: | Nice one guys!
Shine, how much did the domain cost; do you want some money towards it?
|
It is a dedicated server with very fast internet connection, much included traffice per month and with all domains it costs about 75 Euro per month, but I'll use it for my company, too, and I'll move my personal webpage to it, so this is no problem. Lua Player will remain for free for ever (it is BSD license, so even when I decide to take it off from the net, what I'll never want to do, it can be copied without problems to Sourceforge etc.).
But I'm not against if someone insists to send me money :-) You can use fb@frank-buss.de at http://www.paypal.com/. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Aug 11, 2005 7:08 pm Post subject: |
|
|
| VgSlag wrote: | | A nice idea for the official release would be to enable the usb port by default on the screen that shows when you get an error and that you need to press start to restart. |
You can always enable it in your script, it should remain enabled after restarting, and calling the enable function when it is still enabled doesn't hurt.
Enabling it by default is a bad idea, because when you write from USB and later from within the script without disabling USB first (perhaps for a screenshot), the memory stick file system gets corrupted and you have to reformat it. I'll add a warning to the documentation. Reading can be done from both ends and writing from one end, only, is no problem. I didn't tried it, but it should be possible to write to a log file from PSP and displaying it on PC online with "tail -f /yourusbdrive/PSP/GAME/luaplayer/log.txt". |
|
| Back to top |
|
 |
VgSlag
Joined: 30 Jun 2005 Posts: 43
|
Posted: Thu Aug 11, 2005 7:26 pm Post subject: |
|
|
| Wicked, cheers for the warning :) |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:05 pm Post subject: |
|
|
| VgSlag wrote: | Nevyn, I've noticed the new looping on sounds doesn't work for extended periods of time.
I've got 2 sounds in my game, 1 looping and 1 not. After a while I hear the looping one stop.
The looping one always stops after I play the non looping one for the 32nd time if that helps.
A nice idea for the official release would be to enable the usb port by default on the screen that shows when you get an error and that you need to press start to restart. |
Yes, Mikmod has a limit of how many samples it can play simultaneously. If you play more, it'll start cutting old samples. I marked looping sounds as "Critical" to give it priority, but it doesn't seem to work... I'll have to do some testing. (This problem also implies that old voices aren't stopping correctly...)
As Shine said, enabling the USB port continuously is a very bad idea, as writing to the stick from two ways WILL corrupt it. (I'm not sure Shine's idea about tailing a log file while the PSP writes to the stick is a good idea, since the computer can write things to the stick without being explicitly told so. Perhaps I'm overly paranoid, but just using another less important memory stick is a simple precaution)
Remember, Lowser has USB disk mode on the L button, so if you have Lowser as the default app running after a crash (as is the standard configuration), you can just click L and fix the script without having to integrate disk mode into your own app. (btw, before I fixed Lowser, I accidently sent USB activation and deactivation once per frame when holding L, which /crashed/ the USB on my computer. Just a warning...) |
|
| Back to top |
|
 |
alex_dsnews
Joined: 03 Aug 2005 Posts: 13
|
Posted: Thu Aug 11, 2005 8:07 pm Post subject: Wedgewars |
|
|
| LuaPlayer is brilliant, it really is. Here's another game I've done (which isn't brilliant, by a mile): Wedgewars - http://www.dcemu.co.uk/vbulletin/showthread.php?t=9124 - sorry, didn't think you could add attachments here. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Aug 11, 2005 8:07 pm Post subject: |
|
|
| Thanks for your donation VgSlag! I never thought to make some money with it, the main reason for developing it was the fun for me and for developing my own ideas more easy than with C, but I've added a donation link at the bottom of www.luaplayer.org |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:20 pm Post subject: Re: Wedgewars |
|
|
Nice! Too bad you can't win... That, and some terrain, and it'd be absolutely great :) (if you packaged it for Lowser, you wouldn't have to have different installs for 1.0 and 1.5 :P) |
|
| Back to top |
|
 |
alex_dsnews
Joined: 03 Aug 2005 Posts: 13
|
Posted: Thu Aug 11, 2005 8:21 pm Post subject: |
|
|
Lowser's great too. I tried to get ButtonMatch working with it a few days back but for some reason I couldn't get it to work. I'm too thick, I think.
I'll do a Lowser version for the next release - index.lua, right? |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:24 pm Post subject: |
|
|
| alex_dsnews wrote: | Lowser's great too. I tried to get ButtonMatch working with it a few days back but for some reason I couldn't get it to work. I'm too thick, I think.
I'll do a Lowser version for the next release - index.lua, right? |
Yep, index.lua, and making it quittable. Having an icon.png in the folder will give you a nice icon in the browser, too :)
What problems did you have? It /is/ entirely possible that I've done something wrong... ('Cause you're not stupid.) |
|
| Back to top |
|
 |
alex_dsnews
Joined: 03 Aug 2005 Posts: 13
|
Posted: Thu Aug 11, 2005 8:27 pm Post subject: |
|
|
Nope, nothing you've done. It was when Shine updated all the graphics functions, and ButtonMatch was done so badly I just couldn't patch it up to get it up to date with the new functions. Entirely my fault.
I got a cute icon though.
How do you make it quittable? |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Thu Aug 11, 2005 8:29 pm Post subject: |
|
|
| alex_dsnews wrote: | | How do you make it quittable? |
Just make sure the end of the file can be reached. If you have a main app loop, breaking out of it will probably do the trick. |
|
| Back to top |
|
 |
VgSlag
Joined: 30 Jun 2005 Posts: 43
|
Posted: Thu Aug 11, 2005 8:44 pm Post subject: |
|
|
| nevyn wrote: | | VgSlag wrote: | Nevyn, I've noticed the new looping on sounds doesn't work for extended periods of time.
I've got 2 sounds in my game, 1 looping and 1 not. After a while I hear the looping one stop.
The looping one always stops after I play the non looping one for the 32nd time if that helps.
A nice idea for the official release would be to enable the usb port by default on the screen that shows when you get an error and that you need to press start to restart. |
Yes, Mikmod has a limit of how many samples it can play simultaneously. If you play more, it'll start cutting old samples. I marked looping sounds as "Critical" to give it priority, but it doesn't seem to work... I'll have to do some testing. (This problem also implies that old voices aren't stopping correctly...)
As Shine said, enabling the USB port continuously is a very bad idea, as writing to the stick from two ways WILL corrupt it. (I'm not sure Shine's idea about tailing a log file while the PSP writes to the stick is a good idea, since the computer can write things to the stick without being explicitly told so. Perhaps I'm overly paranoid, but just using another less important memory stick is a simple precaution)
Remember, Lowser has USB disk mode on the L button, so if you have Lowser as the default app running after a crash (as is the standard configuration), you can just click L and fix the script without having to integrate disk mode into your own app. (btw, before I fixed Lowser, I accidently sent USB activation and deactivation once per frame when holding L, which /crashed/ the USB on my computer. Just a warning...) |
Nev, I thought this might be my fault as I wasn't assigning the sound to a voice, I was just doing:
But even when changing it to:
| Code: |
sound_jump_playing = sound_jump:play()
|
I still get teh same problem.
Shine, no prob, glad to help. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Thu Aug 11, 2005 8:53 pm Post subject: |
|
|
| nevyn wrote: | | I'm not sure Shine's idea about tailing a log file while the PSP writes to the stick is a good idea, since the computer can write things to the stick without being explicitly told so. |
With Unix you can mount the filesystem read-only, but for Windows I don't know when it wants to write to disk, so using a second memory stick for developing may be a good idea (I do this, too, to avoid losing my Ridge Racer and Mercury savegames :-) |
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Thu Aug 11, 2005 11:18 pm Post subject: |
|
|
http://haggar.pocketheaven.com/ <- Dr. Mario PSP 0.2
Ye, now with both normal horizontal and vertical mode.
(The vertical screen print was too slow for this one, so I had to use something else that's not so pretty) |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Fri Aug 12, 2005 2:33 am Post subject: |
|
|
| DiabloTerrorGF wrote: | Here was my first LUA program(now works with .7), I just now added USB support so you can run it and write script.
PixelFixer
I had dead pixels and people said that one video that flashes the PSP screen with RGBBW will fix dead pixels, well it does work, but it was too big for 32 mb's so I made a LUA script of a faster thing that works about the same(Actually I wanna slow it down just a little bit... any ideas?). |
http://haggar.pocketheaven.com/PixelFixer.zip <- I updated your pixelfixer. No need for backgroundX.png files any more. And to slow it down, just increase the delay value I added. Oh... and I hope you don't mind that I updated the code.
Last edited by MikeHaggar on Fri Aug 12, 2005 2:50 am; edited 1 time in total |
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Fri Aug 12, 2005 2:36 am Post subject: |
|
|
You forgot ButtonMatch by Alex_dsnews/Alex Carroll
Last edited by MikeHaggar on Fri Aug 12, 2005 2:38 am; edited 1 time in total |
|
| Back to top |
|
 |
nevyn
Joined: 31 Jul 2005 Posts: 136 Location: Sweden
|
Posted: Fri Aug 12, 2005 2:37 am Post subject: |
|
|
| MikeHaggar wrote: |
You forgot ButtonMatch by Alex_ds/Alex Carroll |
I haven't seen that one, what's the URL? |
|
| Back to top |
|
 |
|