iPhone Compiling Problem?!

Previous topic - Next topic

backslider

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!

trucidare

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

Kitty Hello


backslider

On PC the game is running ;)

Slydog

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]

Kitty Hello

you can use STDOUT on iPhone to write to the debugger console.

Slydog

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]

backslider

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 :)

trucidare

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

Slydog

#9
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.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

matchy

#10
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:

backslider

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 ;)