forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lua Player for PSP
Goto page Previous  1, 2, 3, 4 ... 10, 11, 12  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Tue Aug 02, 2005 9:01 am    Post subject: Reply with quote

Shine wrote:
I've setup a webpage for Lua Player. I hope the screenshots of Lowser and the upcoming game by VgSlag are ok. Write me a PM, if you like a link to your webpage.


Great! I'm working on prettifying Lowser now... I added a site of my own for Lowser at http://ncoder.nevyn.nu/lowser/ .

(That VgSlag stuff looks awesome!)


LuaPlayer stuff:
Can you change so that when an error occurs, the LuaPlayer waits for a keypress, and then refetches script.lua from disk and plays it? It's a tad bit annoying restarting LuaPlayer for every debug run... It's probably more user friendly, too.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
emumaniac



Joined: 08 May 2005
Posts: 79

PostPosted: Tue Aug 02, 2005 10:36 am    Post subject: Reply with quote

ahh thats great news that you have set up pages for both Lua Player and Lowser, anychance of having a small news section to say whats new etc :)
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Tue Aug 02, 2005 1:00 pm    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
LiquidIce



Joined: 04 Apr 2005
Posts: 55

PostPosted: Tue Aug 02, 2005 1:26 pm    Post subject: Reply with quote

This is the first debug release of my South Park Robotron Game for the PSP.

It is packaged for a 1.5 PSP, otherwise put the script.lua and all of the .PNG files into your Lua directory.

Press the start button to start the game.

Dpad moves Cartman up/down/left/right
Triangle,Cross,Square,Circle shoots cheezy poofs in different directions
Kill the Kennys to get points.

When your health goes to 0 the game ends.

If you want to play again, restart Lua

I am still having trouble with my loops. It seems like each time I shoot the game gets slower. The source code is included if you want to take a look or use part of it in your own game. The hitTest function might be useful if you want to test to see if one graphic intersects another.

Here are some pics:







I am still working out some of the bugs. I have a lot more planned for this game including: better text, sound, different enemies with different flight paths, and new weapons.

Let me know what you think. Thanks for all of the help I've gotten here! These forums are such a great wealth of knowledge.

Download the South Park Robotron Beta:
http://s45.yousendit.com/d.aspx?id=18B7RIYY7K5NI208O9BIPP1RN9
Back to top
View user's profile Send private message Visit poster's website
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Tue Aug 02, 2005 5:55 pm    Post subject: Reply with quote

Hi Shine,

I've been working on removing any copyrighted gfx from my game, all gfx are now in.

I'm still having issues with my engine getting stuck on walls but will look at it today. ALso speed is still slow for me but I'll ask you about that when I upload a version.

Here is how it looks at the moment :)



G
Back to top
View user's profile Send private message
Slopey



Joined: 31 Jul 2005
Posts: 24

PostPosted: Tue Aug 02, 2005 9:45 pm    Post subject: Reply with quote

Managed to get my head round most of it now thanks to the examples above :)

Is there any way to test out the script on the PC? Copying to the PSP and running through the menus to test stuff is getting a little tedious! ;) I've tried it with the PBP emulator, but no joy.
Back to top
View user's profile Send private message
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Tue Aug 02, 2005 10:02 pm    Post subject: Reply with quote

Slopey wrote:
Managed to get my head round most of it now thanks to the examples above :)

Is there any way to test out the script on the PC? Copying to the PSP and running through the menus to test stuff is getting a little tedious! ;) I've tried it with the PBP emulator, but no joy.


I have a card reader, so I just launch LuaPlayer, run my app, test it, eject the card and mount it in the computer and replace the files, and then launch my app from within myself. Well, that's only possible because my app is an app launcher... It could work for others, too, if the below fix was added to LuaPlayer.

I've been looking at the LuaPlayer sources, and it looks possible to patch up to relaunch the script after a crash by replacing line 101 in main.c:
Code:
runScript("script.lua");

with
Code:
sceCtrlData pad, newpad;
while(true) {
    runScript("script.lua");
    sceCtrlReadBufferPositive(&pad, 1);
    sceCtrlReadBufferPositive(&newpad, 1);
    debugOutput("Press any key to restart Lua Player", 35)
    while(pad.Buttons != newpad.Buttons) {
        sceCtrlReadBufferPositive(&newpad, 1);
        sceDisplayWaitVblankStart()
    }
    initGraphics();
}


I haven't tried this, because I don't have the toolchain installed...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Tue Aug 02, 2005 10:12 pm    Post subject: Reply with quote

Ok,

The basic engine is done, you can't leave the room yet, I'll work on that when it's running better.

D-pad left/right and X to jump, Triangle to take a screenshot.

This is where I need your help, am I doing the rendering correctly? Am I messing up my blitting which is making it not run very fast or is this the limit of the Lua player currently?

I haven't included the EBOOT in the rar.
http://www.flash-git.net/pyramidPanic.rar

Just incase you're interested I'm porting my phone game, Pyramid Panic, to Lua.

You can see some screenshots here:






G
Back to top
View user's profile Send private message
LiquidIce



Joined: 04 Apr 2005
Posts: 55

PostPosted: Tue Aug 02, 2005 10:14 pm    Post subject: Reply with quote

If it was possible to restart the script, and do USB file transfers from within Lua, then LuaPlayer is my new best friend. If I understand correctly, samples are in the svn which show how to activate the USB for file transfers. Can we make those function calls into a Lua function?
Back to top
View user's profile Send private message Visit poster's website
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Tue Aug 02, 2005 10:21 pm    Post subject: Reply with quote

Agreed, that functionality would speed up dev time no end.
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Tue Aug 02, 2005 10:22 pm    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Tue Aug 02, 2005 10:36 pm    Post subject: Reply with quote

VgSlag: nice game! Just remove the loop in line 430 and it is lightning fast. And perhaps you should take a look at the tiling concept from the Snake game instead of using 100 PNG images :-)

Slopey: I'm working on a PC version, but I don't have much time beside my work, so a first version will be released perhaps this weekend. I want to release it for Windows, Mac and Linux at the same time, so it could take a bit longer. With a initGraphics(width, height, optional fullscreen) function it would be a nice environment for games on PC and Mac, too.

For the behaviour on errors I think it would be good to provide a function, which can control what to do, perhaps:

- silent restart the game
- just exit
- error message with the options to exit or to restart

BTW: I haven't tried it, but looks like the Lua docu says, that a Lua loader could load a script within a function, which is called with pcall to catch errors, which are returned as multiple return values.
Back to top
View user's profile Send private message
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Tue Aug 02, 2005 11:06 pm    Post subject: Reply with quote

Shine, wow!

I realise now that I was waiting for vblank everytime i call that func and was looping 4 times so it was 4x slower than needs to be yeah?

It looks so amazing running fast!

I had all my tiles cut up from my other version of the game and have a level editor already built in Flash so I'll keep it as tiles for the moment.

Thanks for all this! :)

I'm updating the rar on my site in a second to have a loop removed but slower than full speed version :)
Back to top
View user's profile Send private message
Evil Inside



Joined: 21 Jul 2005
Posts: 17

PostPosted: Tue Aug 02, 2005 11:34 pm    Post subject: Reply with quote

Holy crap guys, great work. These games look awesome.

This is going to expand the PSP homebrew scene dramatically.

Shine, reading that you are releasing a PSP development tool for Mac OS makes me scream like a little girl. Can you include a tool to make 1.5 packages with hidden corrupt files? There are currently no Mac OS tools to do this that I am aware of.

I can't wait to play around with the new version.
Back to top
View user's profile Send private message
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Wed Aug 03, 2005 1:02 am    Post subject: Reply with quote

New version is up, running full speed! I even had to slow it down.

I've added animated tiles, only torches are in at the moment but I'm going to be doing the lava too.

I haven't included the EBOOT in the rar.
http://www.flash-git.net/pyramidPanic.rar

G
Back to top
View user's profile Send private message
Slopey



Joined: 31 Jul 2005
Posts: 24

PostPosted: Wed Aug 03, 2005 1:40 am    Post subject: Reply with quote

Many thanks Shine, I wait the PC version with bated breath :) (luckily I'm away until next week so I won't be able to do anything until then anyway).

Anyways - I've finally knocked up a test dungeon crawler to test out a few ideas for a game I want to do (a Bards Tale clone) in Lua. Basic screenie:



Not bad for an hours work, and I'm quite liking Lua. One day I'll learn C++, one day!!
Back to top
View user's profile Send private message
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Wed Aug 03, 2005 1:44 am    Post subject: Reply with quote

VgSlag wrote:
New version is up, running full speed! I even had to slow it down.

I've added animated tiles, only torches are in at the moment but I'm going to be doing the lava too.

I haven't included the EBOOT in the rar.
http://www.flash-git.net/pyramidPanic.rar

G


Looks good :) Nice fluid movement! Some nitpicks: Mario-style, jump heights can be varied by holding the button; in your game, jumps is of a fixed height, which feels awkward... Also, if you hold the jump button, he keeps jumping when hitting the ground, also non-expected behavior...

If you want Lowser compatibility, name your script file index.lua and put an icon.png in there ;) (you could of course have two copies of the file, a script.lua and an index.lua, to keep compatibility with Lowser-less users...) Oh, and the possibility to quit the game would be nice, too...

Slopey wrote:
One day I'll learn C++, one day!!

Don't bother, if you'd like to stay sane :P
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 4:25 am    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed Aug 03, 2005 4:35 am    Post subject: Reply with quote

fillBackground is not supported any more in Lua Player 0.5 (you should update from my webpage). CRC error looks like a corrupted PNG image. This should work (assuming a valid PNG image) :

Code:

background = loadImage("background.png")
blitImage(0, 0, background)

green = getColorNumber(0, 255, 0)

printText(200, 100, "testing 1,2,3", green)

flipScreen()
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 4:41 am    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
emumaniac



Joined: 08 May 2005
Posts: 79

PostPosted: Wed Aug 03, 2005 7:54 am    Post subject: Reply with quote

any chance of a release of some of these new Lua games :) with eboots ;)
Back to top
View user's profile Send private message
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Wed Aug 03, 2005 8:53 am    Post subject: Reply with quote

emumaniac, mine so far is just an engine.

I need to add enemies, a "goal" and build levels.
I've recently split up with my girlfriend so have some free time at weekends now, I'll be working on mine this saturday and maybe Thursday evening.

Once I have a full level up I'll do a soft release of something.

G
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 10:29 am    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed Aug 03, 2005 3:16 pm    Post subject: Reply with quote

SnowSurfer wrote:
what does

libpng warning: Incomplete compressed datastream in iccp chunk
libng warning: Profile size field missing from iccp chunk

mean?


Looks like your program, with which you created the PNG images, creates not 100% valid PNG images. Can you post one of your image? If the warnings can be ignored, perhaps I can disable it, but I need a sample to reproduce the error.
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 8:34 pm    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
alex_dsnews



Joined: 03 Aug 2005
Posts: 13

PostPosted: Wed Aug 03, 2005 9:50 pm    Post subject: Reply with quote

I haven't tried 0.5 yet of LuaPlayer, but I'm surprised my buttons don't work in it - they were done in Photoshop 5.5... Any ideas?
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 9:53 pm    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
VgSlag



Joined: 30 Jun 2005
Posts: 43

PostPosted: Wed Aug 03, 2005 9:55 pm    Post subject: Reply with quote

Does:

Code:

while true do
green = getColorNumber(0, 255, 0)
blitImage(0, 0, background)
blitImage(200, 100, nextbutton)
printText(300, 100, "test", green)
flipScreen()
end


Work?
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed Aug 03, 2005 10:00 pm    Post subject: Reply with quote

SnowSurfer wrote:
i put the bad pictures in a handy zip for you to look at

http://www.members.cox.net/snowsurfns/Buttons.zip


When downloading, the file size is 0 bytes. But I've updated the Lua Player to version 0.6, now it should not print warning messages when loading PNG images. It is a bugfix release, only, no new features.

alex_dsnews wrote:

I haven't tried 0.5 yet of LuaPlayer, but I'm surprised my buttons don't work in it - they were done in Photoshop 5.5... Any ideas?


I don't have a magic crystal ball, so post the image or I can't help :-) But perhaps it is interlace, which is currently not supported.

SnowSurfer wrote:

side note: shine in your main program code you start it with "while true do" while what is true exactly? or is that just your way of starting it irregardless of condition?


Yes, this is a common practice in programming for an endless loop. "while" runs the body, if the expression is true and "true" is always true.

SnowSurfer wrote:

i can get things to work that I put in that section of code, but if I try to print something on the screen (text) it wont print


Take a look at your source again and try to visualize step-by-step what the interpreter does while executing your program.

Edited: And you should always add a waitVblankStart() before flipScreen(), unless you know what you do, otherwise it will flicker and the Home button don't work.
Back to top
View user's profile Send private message
SnowSurfer



Joined: 08 Jul 2005
Posts: 21

PostPosted: Wed Aug 03, 2005 11:14 pm    Post subject: Reply with quote

deleted for google

Last edited by SnowSurfer on Fri Jul 09, 2010 12:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3, 4 ... 10, 11, 12  Next
Page 3 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group