Author Topic: iPhone Compiling Problem?!  (Read 5148 times)

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
iPhone Compiling Problem?!
« on: 2010-Aug-02 »
Hi guys,

today i compiled my first 2 Apps for the iPhone...
The touch demo from the showplace is running fine, but when i compile my own project:

->the app starts (blackscreen)
->the app ends
->compiler says, that the app ended normally.

But i want to play my game and not a blackscreen xD
Does sb. know where the problem could be?

thanks!

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #1 on: 2010-Aug-02 »
GLB-Error: 9
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10762
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iPhone Compiling Problem?!
« Reply #2 on: 2010-Aug-05 »
No WHILE/WEND loop?

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #3 on: 2010-Aug-05 »
On PC the game is running ;)

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
Re: iPhone Compiling Problem?!
« Reply #4 on: 2010-Aug-05 »
Since it ends early, I'd start there.
It may also explain the black screen.

Write some logs to a file in the "DOCUMENTS" folder at various points in your code to see how far it makes it.
Do you have any device specific compiler directives (for the PC or iPhone)?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10762
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: iPhone Compiling Problem?!
« Reply #5 on: 2010-Aug-05 »
you can use STDOUT on iPhone to write to the debugger console.

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
Re: iPhone Compiling Problem?!
« Reply #6 on: 2010-Aug-05 »
That sounds easier, I've never used it.
I would have assumed that the 'debugger console' would only work when running in Simulation mode.
Nice to know.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #7 on: 2010-Aug-06 »
OK, I found the problem with STDOUT (very nice command!). The size of my Mousearray was to small (on pc you can´t test it :D) and now I sized it with "DIM mouse[GETMOUSECOUNT()]".

But now I have another question and I don´t want to create a new Thread for that.
In my game you have to move objects with the fingers, but When I touch the object
it pushes with highspeed align the x-axis out of the screen.

I use the command "object.pos.x%,INC MOUSEAXIS(0)" and on PC it works fine.
Hope you can help me :)

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #8 on: 2010-Aug-06 »
touch the iphone screen is like to click the mousebutton.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline Slydog

  • Prof. Inline
  • *****
  • Posts: 932
  • KodeSource
    • View Profile
    • KodeSource
Re: iPhone Compiling Problem?!
« Reply #9 on: 2010-Aug-06 »
You could try using the 'MOUSESTATE' command instead.
It uses absolute mouse coordinates, instead of relative / velocity.

That is of course if you what the object to follow your finger exactly, and not to push it in a direction.

[Edit]
Use with 'SETACTIVEMOUSE' to choose what finger to follow.
« Last Edit: 2010-Aug-06 by Slydog »
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #10 on: 2010-Aug-06 »
Here's my generic current mouse array fill:

Code: (glbasic) [Select]
TYPE objMouse;x;y;b1;b2;b1last;b2last;xaxis;yaxis;xlast;ylast;xaxislast;yaxislast;xjoy;yjoy;zjoy;xoff;yoff;zoff;ENDTYPE
GLOBAL oMouse[] AS objMouse,mice

mice=GETMOUSECOUNT()-1

/////

FUNCTION funMouse:
LOCAL iMouse,iMX,iMY,iMAxisX,iMAxisY,iXJoy,iYJoy

// iMouse=oPlatform[0].mouse
// FOR iMouse=0 TO mice-1
// FOR iMouse=0 TO mice-1
// FOR iMouse=0 TO 1
iMAxisX=MOUSEAXIS(0)
iMAxisY=MOUSEAXIS(1)
FOR iMouse=mice-1 TO 0 STEP -1
oMouse[iMouse].b1last=oMouse[iMouse].b1
oMouse[iMouse].b2last=oMouse[iMouse].b2
oMouse[iMouse].xaxislast=oMouse[iMouse].xaxis
oMouse[iMouse].yaxislast=oMouse[iMouse].yaxis
oMouse[iMouse].xlast=oMouse[iMouse].x
oMouse[iMouse].ylast=oMouse[iMouse].y
SETACTIVEMOUSE iMouse
MOUSESTATE iMX,iMY,oMouse[iMouse].b1,oMouse[iMouse].b2
iXJoy=GETJOYX(iMouse)
iYJoy=GETJOYY(iMouse)
IF iMouse=0
oMouse[iMouse].xaxis=iMAxisX
oMouse[iMouse].yaxis=iMAxisY
oPlatform[0].xjoy=iXJoy
oPlatform[0].yjoy=iYJoy
ENDIF
SELECT oPlatform[0].angle
CASE 0
oMouse[iMouse].x=iMX
oMouse[iMouse].y=iMY
oMouse[iMouse].xjoy=iXJoy
oMouse[iMouse].yjoy=iYJoy
CASE 90
oMouse[iMouse].x=oPlatform[0].sw-iMY
oMouse[iMouse].y=iMX
oMouse[iMouse].xjoy=iYJoy
oMouse[iMouse].yjoy=iXJoy
CASE 180
oMouse[iMouse].x=oPlatform[0].sw-iMX
oMouse[iMouse].y=oPlatform[0].sh-iMY
oMouse[iMouse].xjoy=-iXJoy
oMouse[iMouse].yjoy=-iYJoy
CASE 270
oMouse[iMouse].x=iMY
oMouse[iMouse].y=oPlatform[0].sh-iMX
oMouse[iMouse].xjoy=-iYJoy
oMouse[iMouse].yjoy=-iXJoy
ENDSELECT
// IF oMouse[iMouse].b1last=0 AND oMouse[iMouse].b1=1
// oMouse[iMouse].xlast=oMouse[iMouse].x
// oMouse[iMouse].ylast=oMouse[iMouse].y
// ENDIF
// IF oMouse[iMouse].b2last=0 AND oMouse[iMouse].b2=1
// oMouse[iMouse].xlast=oMouse[iMouse].x
// oMouse[iMouse].ylast=oMouse[iMouse].y
// ENDIF
oMouse[iMouse].zjoy=GETJOYZ(iMouse)
NEXT
// SETACTIVEMOUSE 0
ENDFUNCTION

 :enc:
« Last Edit: 2010-Aug-06 by matchy »

Offline backslider

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 892
    • View Profile
Re: iPhone Compiling Problem?!
« Reply #11 on: 2010-Aug-06 »
Yes I´m using SETACTIVEMOUSE because I need 2 or 3 fingers ;)
The fingers are not the problem.

OK then I will try it with MOUSESTATE and not MOUSEAXIS(0) ... Shouldn´t be a big problem.

Thanks

P.S. Your function looks nice matchy :) When I´m at home i will try some things ;)