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 

KaboomPSP 0.1

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Dark Killer



Joined: 25 Jan 2005
Posts: 32

PostPosted: Mon Aug 15, 2005 11:22 am    Post subject: KaboomPSP 0.1 Reply with quote

my first psp game and also the first thing I've ever coded in LUA. KaboomPSP is a clone of the Atari 2600 game Kaboom.

http://www.sendmefile.com/00046899

sorry for having to use a free host but im probably the only coder without webspace :p
Back to top
View user's profile Send private message AIM Address
emumaniac



Joined: 08 May 2005
Posts: 79

PostPosted: Mon Aug 15, 2005 4:14 pm    Post subject: Reply with quote

Hi nice release, ive took the liberty of uploading your release and mirroring it here --> http://www.dcemu.co.uk/vbulletin/showthread.php?t=9284

If your looking for a place to upload my forums can take up to 8 meg in zip file uploading. At least then you want have to use those horid free webservers. heres the link to the forum where we host projects --> http://www.dcemu.co.uk/vbulletin/forumdisplay.php?f=84

Also included a v1.0 eboot and added it to your zipfile.
Back to top
View user's profile Send private message
Dark Killer



Joined: 25 Jan 2005
Posts: 32

PostPosted: Mon Aug 15, 2005 10:51 pm    Post subject: Reply with quote

i'm having a little problem that for the life of me I cant figure out the cause of: after 25 execution loops luaplayer returns an error at line 26 due to a stack overflow. here's the code, hopefully someone could show me what's causing this and how to resolve it.

Code:
--[[
KaboomPSP, Copyright (c) 2005 Dark Killer
]]

-- load images
background = Image.load("bg.png")
title = Image.load("title.png")
bar = Image.load("bar.png")
bomb = Image.load("bomb.png")

function movebomb()
   by=by+2
end

function newbomb()
   --bomb:clear(green)
   --bomb = Image.load("bomb.png")
   --math.randomseed(os.time())
   by = 25
   math.randomseed(os.time())   
   bx = math.random(220)
end

function Control()
   --screen.waitVblankStart()
   pad = Controls.read()
   if pad:left() then
      x = x - 9
   elseif pad:right() then
      x = x + 9
   elseif x<1 then
      x=1
   elseif pad:circle() then
      screen:save("screenshot.tga")
   end
   main()
end

function main()
   screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
   screen:print(280, 5, "Score: " .. pnts, green)
   screen:blit(bx, by, bomb)
   screen:blit(x, 237, bar)
   
   if bx + 50 >= x and bx + 50 <= x + 94 then
      if by + 50 >= 237 and by + 50 <= 256 then
         pnts = pnts + 100
         newbomb()
      end   
   elseif by > 250 then
      if pnts >= 100 then
         pnts = pnts - 100
      end
         newbomb()
      
   end
      
            


   movebomb()
   screen.waitVblankStart()
   screen.flip()
   Control()
end

screen:blit(0, 0, title, 0, 0, title:width(), title:height(), false)
screen.waitVblankStart()
screen.flip()
screen.waitVblankStart(141)
green = Color.new(0, 255, 0)
x=2
pnts=0
newbomb()
main()
Back to top
View user's profile Send private message AIM Address
alex_dsnews



Joined: 03 Aug 2005
Posts: 13

PostPosted: Mon Aug 15, 2005 10:58 pm    Post subject: Reply with quote

It probably won't help, but you don't need math.randomseed(os.time()) every loop, just once per program run is enough.
Back to top
View user's profile Send private message
Dark Killer



Joined: 25 Jan 2005
Posts: 32

PostPosted: Tue Aug 16, 2005 5:20 am    Post subject: Reply with quote

thanks for the tip alex but, like I expected, it didnt solve my problem. I sure hope someone can help me because I've tried everything and I'd really hate to have to abandon development on this game.
Back to top
View user's profile Send private message AIM Address
Dark Killer



Joined: 25 Jan 2005
Posts: 32

PostPosted: Tue Aug 16, 2005 6:20 am    Post subject: Reply with quote

Update: I finally got the stack overflow bug fixed so everyone can expect an update laster tonight :)
Back to top
View user's profile Send private message AIM Address
ector



Joined: 12 May 2005
Posts: 195

PostPosted: Tue Aug 16, 2005 7:04 am    Post subject: Reply with quote

I suspect your problem was that main() calls control() and control in turn calls main? :)
_________________
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Back to top
View user's profile Send private message
Dark Killer



Joined: 25 Jan 2005
Posts: 32

PostPosted: Tue Aug 16, 2005 8:17 am    Post subject: Reply with quote

ector wrote:
I suspect your problem was that main() calls control() and control in turn calls main? :)


exactly.

anyway, here's 0.2 with some fixes and gameplay improvements:

http://rapidshare.de/files/4020201/KaboomPSP_0.2-DK.zip.html
Back to top
View user's profile Send private message AIM Address
emumaniac



Joined: 08 May 2005
Posts: 79

PostPosted: Tue Aug 16, 2005 10:17 am    Post subject: Reply with quote

file mirrored here for those that cant download off the free server

http://psp-news.dcemu.co.uk/kaboompsp.shtml
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
Page 1 of 1

 
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