|
#1
|
||||
|
||||
|
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 Last edited by jbob182; 12-30-2011 at 10:09 AM. |
|
|
|||
|
|
|
#2
|
|||
|
|||
|
The screen is 400 x 240. Try just changing any 480/272 screen references to those.
|
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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() |
|
#6
|
||||
|
||||
|
skyrain thanks so much
|
|
#7
|
|||
|
|||
|
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 |
|
#8
|
||||
|
||||
|
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 03:57 PM. |
|
#9
|
||||
|
||||
|
Quote:
Code:
if control.read()==1 then else os.wait(50) end |
|
#10
|
||||
|
||||
|
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 |
|
#11
|
||||
|
||||
|
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 |
|
#12
|
||||
|
||||
|
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) |
|
#13
|
||||
|
||||
|
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
|
|
#14
|
||||
|
||||
|
Quote:
Code:
x,y=math.ceil(x/15),math.ceil(y/15) 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 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 06:49 AM. |
|
#15
|
||||
|
||||
|
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! |
|
#16
|
||||
|
||||
|
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 |
|
#17
|
||||
|
||||
|
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!
|
|
#18
|
||||
|
||||
|
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 u since it doesnt crash for me Last edited by jbob182; 12-30-2011 at 10:07 AM. |
|
#19
|
|||
|
|||
|
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 ?
|
|
#20
|
||||
|
||||
|
dear mustomax yes it is quite simple to fix ill remeber that and add it in later
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:11 PM.













Linear Mode
