android
  #1  
Old 10-01-2010, 11:32 AM
alexvilla's Avatar
alexvilla alexvilla is offline
Junior Member
 
Join Date: Sep 2010
Location: Russia, Saint Petersburg
Posts: 64
Help Pong

Please sb help me.
This game work good only in ZEN X-Fi2 Simulator, but in pleer it's crashed.
Post pls my mistakes.
Attached Files
File Type: rar Pong_v.1.0.rar (245.0 KB, 36 views)
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 10-01-2010, 12:18 PM
matthijs1929's Avatar
matthijs1929 matthijs1929 is offline
Junior Member
 
Join Date: Sep 2010
Location: the netherlands
Posts: 40
Default

in my it works perfect
but I only dont understand the language
Reply With Quote

  #3  
Old 10-01-2010, 03:20 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

it might be because you dont have else os.sleep(3) in the while loop
Reply With Quote

  #4  
Old 10-01-2010, 04:54 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

In function menu() "menumy=image.load("menu.png")" is inside the loop, so it keeps loading it until the memory is overloaded. Not sure if this is all but this would certainly crash it.
__________________
this is a link to my personal homepage which I haven't
Reply With Quote

  #5  
Old 10-02-2010, 04:03 AM
alexvilla's Avatar
alexvilla alexvilla is offline
Junior Member
 
Join Date: Sep 2010
Location: Russia, Saint Petersburg
Posts: 64
Default

Quote:
menumy=image.load("menu.png")
--Menu Loop
function menu()
local touch_x = 0;
local touch_y = 0;
while room[1] == 1 do
menumy:draw(0,0);
screen.update();
os.sleep(4);
text.color(cWhite);
old = text.size(12);
text.size(old);
if touchRegion(touch_x, touch_y, 100,174,200,24) == true then
room[1] = 0;
end;
if control.read() == 1 then
if (control.isTouch() == 1) and (touch.click() == 1) then
touch_x, touch_y = touch.pos();
end;
if (control.isButton() == 1) then
if (button.home() == 1) and (button.click() == 1) then
room[1] = 0;
end;
end;

end;
os.sleep(2);
screen.update();
if touchRegion(touch_x, touch_y, 100 ,90 ,200 ,24) == true then
room[2] = 1;
game();
touch_x = 0;
touch_y = 0;
end;
if touchRegion(touch_x, touch_y, 100 ,132 ,200 ,24) == true then
room[3] = 1;
stats();
touch_x = 0;
touch_y = 0;
end;
end;
end;
Thank you
With this changes app work in my pleer

Last edited by alexvilla; 10-02-2010 at 04:51 AM.
Reply With Quote

  #6  
Old 10-02-2010, 02:37 PM
bzdbbb's Avatar
bzdbbb bzdbbb is offline
X-Fi2 Development Moderator
 
Join Date: Dec 2009
Location: Gloucestershire, UK
Posts: 94
Default

hmm.. I know it's all open source but some kind of credit would be nice if you're going to release this :P

e.g. just the 6 characters bzdbbb somewhere..
Reply With Quote

  #7  
Old 10-02-2010, 02:42 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

lol ya it seems that he just added a menu and modified some variables
Reply With Quote

  #8  
Old 10-03-2010, 05:16 AM
alexvilla's Avatar
alexvilla alexvilla is offline
Junior Member
 
Join Date: Sep 2010
Location: Russia, Saint Petersburg
Posts: 64
Default

bzdbbb only for you)))
Attached Files
File Type: zip Pong_v.1.0.zip (246.1 KB, 23 views)
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:32 AM.