android
  #1  
Old 04-24-2010, 06:19 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default Jezzball v1.1 released

I found a psp Jezzball and decided to port it to the x-fi2


Special thanks to skyrain for helping me port some parts and Brett_val for helping with some bugs


In addition I will add a save option along with a level select option and possible codes to unlock levels! and possible an option were you earn points for beatting levels and you can spend those points to buy like level skips or different skins possibly



To play simply touch the screen were to draw a line and press home button to change direction. power buttons exits app
Attached Images
File Type: jpg screenshot.jpg (67.7 KB, 1036 views)
Attached Files
File Type: zip Jezzball v1.1.zip (668.3 KB, 780 views)

Last edited by jbob182; 12-30-2011 at 11:09 AM.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 04-24-2010, 08:40 PM
Olley Olley is offline
Ultra Senior Member
 
Join Date: Dec 2008
Posts: 4,894
Default

The screen is 400 x 240. Try just changing any 480/272 screen references to those.
Reply With Quote

  #3  
Old 04-24-2010, 08:46 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Deear Olley I have changed the it to the screen size but it doesn't change anything
the problem is image.createEmpty is not a function for the x-fi2 so I need a code that will do the same thing

I am still trying to find what image.createEmpty does i have some ideas but am not sure
Reply With Quote

  #4  
Old 04-25-2010, 05:04 AM
ZaPx64's Avatar
ZaPx64 ZaPx64 is offline
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 136
Default

The function you're looking for is image.create(width, height)
But in fact you cannot draw on that image because we don't have an image buffer or image drawing functions like the psp has.
So all you can do is creating an empty image and fill it with a solid color.
__________________
Zen X-Fi2 Apps: Notee-fi (notepad) | TicTacToe | Mahjongg
http://www.starfare.eu/ - a free real-time strategy game.
Reply With Quote

  #5  
Old 04-25-2010, 12:39 PM
skyrain skyrain is offline
Junior Member
 
Join Date: Jan 2010
Posts: 1
Default

just comment image.createEmpty
--offscreen = Image.createEmpty(480,272)
--offscreen:clear(black)


--offscreen:blit(0, 0, background, 0, 0, background:width(),
screen.fillrect(0,0,screen.width(),screen.height() ,black)

--offscreen:blit(ball[i].x, ball[i].y, ball[i].bimage)
ball[i].bimage:draw(ball[i].x, ball[i].y)

-- screen.waitVblankStart()
-- screen.flip()
screen.update()
Attached Files
File Type: zip 1Jezzball.zip (29.3 KB, 56 views)
Reply With Quote

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

skyrain thanks so much
Reply With Quote

  #7  
Old 04-26-2010, 05:53 PM
nikc4 nikc4 is offline
Junior Member
 
Join Date: Feb 2010
Location: In a cardboard box
Posts: 46
Default

Any idea when a stable beta might be available? I tried out the version two posts above me and it's got me interested, but it's still a little buggy. Lines not going where you click, no way to turn the direction of the line you want to draw, no menu, lag, etc.

This game has captured my interest, what can I say.

Nick
Reply With Quote

  #8  
Old 04-26-2010, 06:31 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

deer nikc4 I have been fixing those problems and you can now turn direction, it has a menu and ball speed increase and I added sound w/ an option for on and off

I would say It will be released very shortly but due to the lines do no go were you click problem it will delay the realse

I found why too but it seem whoever made this decided that he would not let you tamper with the code I have tried multiple ways to fix it but no luck

Here is what is happening

function translatePos(pos)
pos = pos + 0.5
return math.ceil(pos/15)
end

and

x,y=math.ceil(x/12),math.ceil(y/12) in the while 1 loop if screen is touched



I cant seem to do anything to these line of code without getting this error

c:\Creative\ZEN X-Fi2\Applications\1JEZZB~1\main.lua:415: attempt to index field '?' (a nil value)
Lua Run Error : attempt to index field '?' (a nil value)


and here is line 415 and some lines before hand


Code:
   
line412   bx = translatePos(ball[i].x)
line 413  by = translatePos(ball[i].y)
line 414
line 415   if ((board[bx][by] == 1) or (board[bx][by] == 2)) then

I looked at the lag and am bambaffled when you touch the screen or hit a button the balls don't lag meaning when there is an input the balls don't lagg I will look at the code closly at the ballmovement section to see if i can spot anything if not i will release a beta for other developers to try and figure out what is wrong

I will release a beta after the line problem is fixed so other people can help try and fix the lag problem

Last edited by jbob182; 04-27-2010 at 04:57 PM.
Reply With Quote

  #9  
Old 04-29-2010, 11:15 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

Quote:
Originally Posted by jbob182 View Post
I looked at the lag and am bambaffled when you touch the screen or hit a button the balls don't lag meaning when there is an input the balls don't lagg I will look at the code closly at the ballmovement section to see if i can spot anything if not i will release a beta for other developers to try and figure out what is wrong

I will release a beta after the line problem is fixed so other people can help try and fix the lag problem
I guess you have the os.wait() or os.sleep() placed like this:
Code:
if control.read()==1 then
else
os.wait(50)
end
so this way, it doesn't do the wait when there was an input.
Reply With Quote

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

YES thank you so much when I removed else
os.wait(50)

in the emulator there was no lag so now I just have to find the right spot to put it
Reply With Quote

  #11  
Old 04-30-2010, 04:28 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Hey i just slapped an os.sleep(10) outside of the
if control.read()==1 then

and there was absolutly no lag!! thank you so much
Reply With Quote

  #12  
Old 04-30-2010, 04:31 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

your welcome
I think you can even lower the sleep to 3.

30 milliseconds was advised, so that's os.wait(30) or os.sleep(3)
Reply With Quote

  #13  
Old 04-30-2010, 04:38 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Thank you! do you have any ides about the line drawing not where you click the problem in the code is line 169,170,622 Thanks I'v tried to remove them or add x = x*15 and y = y/15 but no luck
Reply With Quote

  #14  
Old 05-01-2010, 06:15 AM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

Quote:
Originally Posted by jbob182 View Post
Thank you! do you have any ides about the line drawing not where you click the problem in the code is line 169,170,622 Thanks I'v tried to remove them or add x = x*15 and y = y/15 but no luck
Yeah, I changed line 622 into this:
Code:
x,y=math.ceil(x/15),math.ceil(y/15)
And I think that fixed it.

I noticed you forgot if control.isButton()==1 then. That would be responsible for bug 3, and I think also bug 4. But to add that, I had to replace the if play==true to make it work again, because you can only call control.isButton once.

Also, it immediately draws a line at every start of a game, to fix that I placed menu() somewhere else.

Line 615 till 666 now look like this:

Code:
615	if control.read()==1 then
		
		if control.isTouch()==1 and touch.click() == 1 then
		switch = 0
			x, y = touch.pos();
			
				if play then
					x,y=math.ceil(x/15),math.ceil(y/15)
						if move == 1  then
							shooting = true
						end
						if move == 2 then
							shootingH = true
						end
				else
					menu()
				end
		end
		
		
		
		
		if control.isButton()==1 then
		
		
			if play and button.home() == 1 and button.up() == 1 then
					switch = switch + 1
						if move == 2 and switch == 1 then 
							move = 1
							switch = 0
						end
						if move == 1 and switch == 1 then
							move = 2
							switch = 0
						end
			end
		  
			if button.power() ==1  and button.click() == 1 then
				ball1:close()
				ball2:close()
				ball3:close()
				ball4:close()
				background:close()
				cross:close()
				across:close()
				threewav:close()
				twowav:close()
				onewav:close()
				gowav:close()
				bouncewav:close()
				soundimg:close()
				nosoundimg:close()
				break
			end
		end
670	end
Oh and another little thing:
The wav.play()'s for the countdown is not under if playsound then, so they are not muted when you have selected "play without sound".

Last edited by Brett_val; 05-01-2010 at 07:49 AM.
Reply With Quote

  #15  
Old 05-01-2010, 10:57 AM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

No problem ! I like to seek for errors

Really cool game by the way! Looking forward to the bsp speed-update, and those other things you have plannend also look very promising!
Reply With Quote

  #16  
Old 05-01-2010, 01:48 PM
lestatar's Avatar
lestatar lestatar is offline
Ultra Senior Member
 
Join Date: Dec 2009
Location: Hong Kong now, but NYC always
Posts: 4,657
Default

I have loved this game on PC and Palm OS. Classic and addictive as all the best, most simple games are.

While I don't have a Creative, thanks so much for your hard work in trying to get this work guys...
__________________
DAPs:2xRBFuze8+16GB|SonyE345|ZenV+,Micro,Xtra40GBx2|RBG igabeatFX|RCAOpal
IEMs:PanaHJE900|Nuforce 700x|HippoVB|iMetal590,i490|SM PL-21|CX300|EP630,Aurvana
Guitars:IbanezS540,JS1200|Ovation
PoolCues: a bunch
A Glossary for Newbies
Reply With Quote

  #17  
Old 05-01-2010, 01:54 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Unsure as to the cause of this but my player crashed just as it started a new game.. I love the '3,2,1' sounds though!
Reply With Quote

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

RobertsAccount the 1,2,3 sounds are higher pitch than the real file because of the player making them that they are supposed to sound like a text to speech converter voice.. Actually that is what they are
as for the crashing I am not sure why it is crashing for you since it doesnt crash for me

Last edited by jbob182; 07-14-2013 at 11:45 AM.
Reply With Quote

  #19  
Old 05-10-2010, 07:54 AM
mustomax mustomax is offline
Junior Member
 
Join Date: Feb 2010
Posts: 51
Default

great game! No bugs found...Just one thing:Yhe light of the screen goes down too fast if we wait a little before touching the screen. Could you do something for this ?
Reply With Quote

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

dear mustomax yes it is quite simple to fix ill remeber that and add it in later
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:00 PM.