android
  #1  
Old 03-11-2010, 08:36 PM
trashman4289 trashman4289 is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default BubbleWrap

Who doesn't love popping bubble wrap?

This is an edit of Jespuur's soundboard. It's my first attempt at coding anything so please bear with me when it comes to any errors that pop up.
Attached Images
File Type: png BubbleWrapscreen.png (101.5 KB, 286 views)
File Type: png icon.png (5.8 KB, 1446 views)
Attached Files
File Type: zip BubbleWrap.zip (164.3 KB, 806 views)
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 03-12-2010, 04:48 PM
nikc4 nikc4 is offline
Junior Member
 
Join Date: Feb 2010
Location: In a cardboard box
Posts: 46
Default

Any errors that POP up. Hahahahaha. Pop. It's funny because he said pop and it's... bubble wrap... which pops... oh never mind.

I like it, but the bubbles can be hard to pop.
Reply With Quote

  #3  
Old 03-13-2010, 04:21 AM
Mr Wunderbar's Avatar
Mr Wunderbar Mr Wunderbar is offline
Junior Member
 
Join Date: Jan 2010
Posts: 93
Default

Quote:
Originally Posted by nikc4 View Post
Any errors that POP up. Hahahahaha. Pop. It's funny because he said pop and it's... bubble wrap... which pops... oh never mind.

I like it, but the bubbles can be hard to pop.
This. The whole post
Reply With Quote

  #4  
Old 03-13-2010, 04:51 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

I agree with nikc4, the bubbles can be difficulty to pop a lot of the time...
Reply With Quote

  #5  
Old 03-13-2010, 08:57 AM
Spewk's Avatar
Spewk Spewk is offline
Junior Member
 
Join Date: Mar 2010
Location: Italy
Posts: 22
Default

trashman4289, i hope you don't hate me....i've just modified a little bit your game to work better

now it's easier to pop bubbles and you can frenzypop them by moving your finger on the screen

i hope you like it

(duh, it's my first time programming, i hope everything's all right )
Attached Files
File Type: zip BubbleWrap.zip (164.4 KB, 62 views)
Reply With Quote

  #6  
Old 03-13-2010, 09:14 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Spewk addition of touch.move() made it very much easier to pop the bubbles, I thought about doing that myself also =P But one thing about that change is that it doesn't played the sound until after you release the screen, making frenzypopping boring =P

Another bug in the original version other than the difficulty of popping bubbles at times, is that it plays a popping sound even if you press a popped bubble.
A thought about a solution to the popping difficulty, what if you made the big if-chain to an if-elseif chain?

Code:
if (x) then

end
if (x) then

end
if (x) then

end
Would instead be:

Code:
if (x) then

elseif (x) then 

elseif (x) then

end
That might speed it up a bit and perhaps make them easier to pop.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^

Last edited by Habhome; 03-13-2010 at 09:23 AM.
Reply With Quote

  #7  
Old 03-13-2010, 09:22 AM
Spewk's Avatar
Spewk Spewk is offline
Junior Member
 
Join Date: Mar 2010
Location: Italy
Posts: 22
Default

Quote:
Originally Posted by Habhome View Post
Spewk addition of touch.move() made it very much easier to pop the bubbles, I thought about doing that myself also =P But one thing about that change is that it doesn't played the sound until after you release the screen, making frenzypopping boring =P

Another bug in the original version other than the difficulty of popping bubbles at times, is that it plays a popping sound even if you press a popped bubble.
i was thinking about both of them, and the solution is to mark popped bubbles as "done", something like:

Code:
    if touch_x >= 2 and touch_x <= 40 and touch_y >= 23 and touch_y <= 61 then
	   	Pop:play()
	   	imgPd:draw(1,23)
	   	screen:update()
	   	MARK:DONE <--- does it even exist? :D
so that the main function can watch if that bubble is done or what and (if done) it can stop
i'm reading the LUA manual to find how to do that, if you already know how it would be great
Reply With Quote

  #8  
Old 03-13-2010, 09:50 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by Spewk View Post
i was thinking about both of them, and the solution is to mark popped bubbles as "done", something like:

Code:
    if touch_x >= 2 and touch_x <= 40 and touch_y >= 23 and touch_y <= 61 then
	   	Pop:play()
	   	imgPd:draw(1,23)
	   	screen:update()
	   	MARK:DONE <--- does it even exist? :D
so that the main function can watch if that bubble is done or what and (if done) it can stop
i'm reading the LUA manual to find how to do that, if you already know how it would be great
No, there is no MARKONE.

But I do know how to solve the problem.
My solution would be to create an array of booleans:
Code:
bubble = {popped=false, popped=false, popped=false, popped=false, popped=false,
 popped=false, popped=false, popped=false, popped=false ,popped=false, popped=false,
 popped=false, popped=false, popped=false,  ... popped=false, popped=false}
Repeated with as many bubbles there are to pop. Then in the touch control do:
Code:
if touch_x >= 2 and touch_x <= 40 and touch_y >= 23 and touch_y <= 61 then
	if(bubble[1].popped == false) then
	   	Pop:play()
	   	imgPd:draw(1,23)
		bubble[1].popped = true
	   	screen:update()
	end
end
in the bold red you but the number of what bubble it is. First bubble = 1 and then the next is 2 and so on.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #9  
Old 03-13-2010, 12:48 PM
daddycoco's Avatar
daddycoco daddycoco is offline
Junior Member
 
Join Date: Mar 2010
Location: United States, New York
Posts: 26
Default

you guys sound like hackers, lol i have no clue what you are saying
Reply With Quote

  #10  
Old 03-13-2010, 01:35 PM
Spewk's Avatar
Spewk Spewk is offline
Junior Member
 
Join Date: Mar 2010
Location: Italy
Posts: 22
Default

Quote:
Originally Posted by Habhome View Post
But I do know how to solve the problem.
My solution would be to create an array of booleans:
it works man! but i still have the audio problem for the frenzypop but it works a lot better now!
Attached Files
File Type: zip BubbleWrap.zip (164.8 KB, 8 views)

Last edited by Spewk; 03-13-2010 at 01:45 PM.
Reply With Quote

  #11  
Old 03-13-2010, 01:40 PM
Gruffler's Avatar
Gruffler Gruffler is offline
Junior Member
 
Join Date: Feb 2010
Location: Germany
Posts: 83
Default

You just have to cut the wav file ( at the beginning was for a few milliseconds no sound )
Frenzy Pop is with sound now
Here it is with the code and images:
Attached Files
File Type: zip BubbleWrap.zip (164.1 KB, 52 views)
__________________
You're wrong here! My post is above!!! /\
_______________________________l

LOOK! MY! APPS!
Reply With Quote

  #12  
Old 03-13-2010, 01:48 PM
Spewk's Avatar
Spewk Spewk is offline
Junior Member
 
Join Date: Mar 2010
Location: Italy
Posts: 22
Default

Quote:
Originally Posted by Gruffler View Post
You just have to cut the wav file ( at the beginning was for a few milliseconds no sound )
Frenzy Pop is with sound now
Here it is with the code and images:
awesome! i haven't noticed it (yeah, today my mind is in another world -_-)
thank you guys for your support ))

ps: correct the func.lua with this one i've made a little mistake
Attached Files
File Type: zip func.zip (1.4 KB, 19 views)
Reply With Quote

  #13  
Old 03-13-2010, 05:35 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

This is all nice with the better functionality of the app, but have somebody asked the creator for permission? I'm thinking about how it's going with the Gunz app, this is a bit similar with people taking over seemingly without the consent of the creator.
People are free to help me with my Dynablade app, but I've actively sought help with it, which makes it different from this.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #14  
Old 03-13-2010, 06:02 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

If you don't want help, compile it before you release it plain text.
__________________
Only ONE more functions in the Wiki need addressing!
Zen X-Fi2 LUA Wiki
Want to protect your applications? Click Here!
Tower Defense Thread
Zen Lock - Protect Your Zen!
Reply With Quote

  #15  
Old 03-13-2010, 06:27 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by ThievingSix View Post
If you don't want help, compile it before you release it plain text.
Compile it? I knew you could bundle the resources together and so, but I didn't know you could compile the entire app somehow.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #16  
Old 03-13-2010, 06:40 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Code:
CodeOutput = io.open("CompiledCode.lua","wb");
CodeOutput:write(string.dump(assert(loadfile("MyCode.lua"))))
io.close(CodeOutput);
Edit:

Here's something more complete: http://lua-users.org/wiki/LuaCompilerInLua
__________________
Only ONE more functions in the Wiki need addressing!
Zen X-Fi2 LUA Wiki
Want to protect your applications? Click Here!
Tower Defense Thread
Zen Lock - Protect Your Zen!

Last edited by ThievingSix; 03-13-2010 at 06:45 PM.
Reply With Quote

  #17  
Old 03-13-2010, 06:45 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by ThievingSix View Post
Code:
CodeOutput = io.open("CompiledCode.lua","wb");
CodeOutput:write(string.dump(assert(loadfile("MyCode.lua"))))
io.close(CodeOutput);
Um.. That didn't really tell me How you did it and with what software you did it, or anything.. It's just a piece of random code in my eyes.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #18  
Old 03-13-2010, 07:00 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Haha, Ok I'll explain it.

First this is a script you run in the simulator or your player.

Code:
CodeOutput = io.open("CompiledCode.lua","wb");
Open the file you want your compiled application to output too.

Code:
CodeOutput:write(string.dump(assert(loadfile("MyCode.lua"))));
Lets break it down:
-loadfile("MyCode.lua")
>Basically this loads MyCode.lua from plaintext(the kind we type) and compiles it.
-assert(...)
>This makes sure that the file compiled error free.
-string.dump(...)
>This dumps the compiled code from our file into byte form so we can output it to file.
-CodeOutput:write(...)
>This writes the dumped data to the file.

Code:
io.close(CodeOutput);
Saves the compiled code we just wrote.


Now you have a file that contains compiled code("CompiledCode.lua") from a file that we just wrote and was not compiled("MyCode.lua"). You can now rename "CompildCode.lua" to "Main.lua" and it will run like normal, only no one can edit it. It can be mostly decompiled but its better than not.
__________________
Only ONE more functions in the Wiki need addressing!
Zen X-Fi2 LUA Wiki
Want to protect your applications? Click Here!
Tower Defense Thread
Zen Lock - Protect Your Zen!
Reply With Quote

  #19  
Old 03-14-2010, 03:10 PM
Bruno96 Bruno96 is offline
Junior Member
 
Join Date: Feb 2010
Location: Poland, Wrocław
Posts: 13
Default

Really pupped.
Attached Files
File Type: zip BubbleWrap.zip (181.1 KB, 75 views)
__________________
I'm sorry. I don't speak English...
I'm from Poland.
Reply With Quote

  #20  
Old 03-14-2010, 03:14 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Would it be possible to apply the 'frenzy pop' function to the Zeano app? This way you could slide up and down they keyboard! That's the best bit of playing piano!! Also, It would be nice if you could hold down the home button to reset the app and restore the bubble wrap to it's original unpopped form...
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 03:40 PM.