Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - mykyl66

#46
I seem to have thought about this a bit too late but Here is my question.
I have had my app tested on an early iphone up to the latest iphone 3gs as well as on an ipod touch generation 1 up to the latest 3g but suddenly had a thought. I think that all of them are running the latest 3.x os.

I have been building for the base 3.x all this time but suddenly wondered if I have to do anything to make sure it will run on folks machines who are perhaps still on 2.x etc?

Will an app compiled using 3.x work on the earlier os machines? I am obviously not using in app purchases etc as I don't have a clue how to do that.

Can anyone help?

Hoping to show what we have been up to in the coming week.

Cheers

Mike R
#47
Ok thanks folks. That's a relief.

Cheers

Mike
#48
Cheers for that. I did see that but dont think i can add anything like that as the game is in glbasic code.

Mike
#49
Hi, I'm not sure exactly how to describe this so here is the information xcode debugger throws up as my game is loading up.

As I said it never happened before this latest up date but that doesn't mean that's whats caused it. I have no clue. Please can anyone help.
I guess the leaking thing is worrying me, especially as I have no clue what would cause that.

if you need more info please ask.

Thanks

Mike

run
Runningââ,¬Â¦
[Switching to thread 11779]
[Switching to thread 11779]
sharedlibrary apply-load-rules all
(gdb) continue
2010-03-20 15:52:15.820 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x205a50 of class NSCFArray autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acc107 0x3356453b 0x30ae1805 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.859 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x207d60 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acc107 0x30ad00d9 0x30ae187d 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.976 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x207610 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acc107 0x30ad67d3 0x30ae06a7 0x30ae062d 0x30acd2f9 0x30ae05c7 0x30ae189d 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.984 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x2087c0 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acdbb3 0x30acd1a7 0x30acd121 0x30ae06bb 0x30ae062d 0x30acd2f9 0x30ae05c7 0x30ae189d 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.989 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x208880 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acdbb3 0x30ae05f7 0x30ae189d 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.993 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x2089e0 of class NSCFArray autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acc107 0x3356c7f9 0x30ae18d7 0xb1b8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
2010-03-20 15:52:15.996 [1244:207] *** _NSAutoreleaseNoPool(): Object 0x208a50 of class NSCFData autoreleased with no pool in place - just leaking
Stack: (0x30af7f87 0x30acc135 0x30acc107 0x30acc331 0x30acc1c3 0xb1e8 0x6d48 0xb618 0x2fe0bd7d 0x2fe0be39 0x2fe09d7f 0x2fe0a16d 0x2fe022bd 0x2fe06a15 0x2fe016fd 0x2fe01050)
init with coder
app did finish launching, view=0x21d4d0
start ani
applicationDidBecomeActive
backing: 320 x 480
Init GFX
#50
Is there such a command as fclose now??? If so that's a big help as its not mentioned in the help files anywhere.

Cheers

Mike R
#51
This is something I was wondering about myself. It would be very helpfull if it was possible.

Mike
#52
Thanks for that.
Mike
#53
It doesn't matter what code I try and use, if I compile in version 7.237 of glbasic I get the following debug errors in xcode when compiling.

Any help please or is this a newly introduced bug in the latest version of glbasic?

No idea what is happening as I am at no point trying to run any movies or whatever and the same code worked perfectly before.

Thanks

Mike R

Build iPhone of project iPhone with configuration Debug

Check dependencies

Undefined symbols:
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
      _MPMoviePlayerPlaybackDidFinishNotification$non_lazy_ptr in libGLBasiciPhone-egl.a(iPhoneAppController.o)
  "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
      __objc_classrefs__DATA@0 in libGLBasiciPhone-egl.a(iPhoneAppController.o)

ld: symbol(s) not found
collect2: ld returned 1 exit status


#54
I am guessing nobody is really understanding what the problem is so here is the test code.

If you compile and run it you will see the issue. No neatening up has been done or anything. Its rough and ready test code.

When you run it (Portrait mode) hold your touch comfortably then touch the screen and you will see the red rectangle is in the center of the screen as expected no matter the angle your holding the touch at, however although it will move as you tilt all the way to the bottom it will NOT move to the top of the screen.

If you start it while having it laid down flat on the desk everything will work as expected.

Hopefully this will give you folks an understanding as to what is wrong.

Cheers

Mike R

Code (glbasic) Select
// --------------------------------- //
// Project: accel-test
// Start: Wednesday, December 09, 2009
// IDE Version: 7.198

SETCURRENTDIR("Media") // seperate media and binaries?

SYSTEMPOINTER TRUE

LOADFONT "font.png",1
SETFONT 1
SETSCREEN 320,480,0
GETSCREENSIZE sx,sy

lb1 = 0

WHILE TRUE

JOYSTATE joy_x, joy_y, joy_a, joy_b; // Variablen joy_x - joy_b     / Variables jox_x - joy_b
                                      // mit Joystick-Werten füllen  / filled with joysick state
jx# = (DecimalPower(GETJOYX(0),5) * 100.0)
jy# = (DecimalPower(GETJOYY(0),5) * 100.0)
jz# = (DecimalPower(GETJOYZ(0),5) * 100.0)

jrx# = (DecimalPower(GETJOYRX(0),5) * 100.0)
jry# = (DecimalPower(GETJOYRY(0),5) * 100.0)
jrz# = (DecimalPower(GETJOYRZ(0),5) * 100.0)

MOUSESTATE mx,my,b1,b2

IF lb1=1 AND b1 = 0
GOTO cal
ENDIF

PRINT "x = " + jx#,20,120
PRINT "y = " + jy#,20,140
PRINT "z = " + jz#,20,1

SHOWSCREEN

lb1 = b1

WEND

cal:
calibrate()
rectSize = 25
rectColor = 255

rectX = (sx/2)-(rectSize/2)
rectY = (sy/2)-(rectSize/2)

xIncrement = (sx/2) / 100
yIncrement = (sy/2) / 100

// -100 to 0 is sx/2 = 160/100

start:

DRAWRECT rectX - jxCenter#,rectY - jyCenter#,rectSize,rectSize,rectColor

noJoySticks% = GETNUMJOYSTICKS()
nameJoyStick$ = GETJOYNAME$(0)

JOYSTATE joy_x, joy_y, joy_a, joy_b; // Variablen joy_x - joy_b     / Variables jox_x - joy_b
                                      // mit Joystick-Werten füllen  / filled with joysick state

jx# = (DecimalPower(GETJOYX(0),5) * 100.0)
jy# = (DecimalPower(GETJOYY(0),5) * 100.0)
jz# = (DecimalPower(GETJOYZ(0),5) * 100.0)

jrx# = (DecimalPower(GETJOYRX(0),5) * 100.0)
jry# = (DecimalPower(GETJOYRY(0),5) * 100.0)
jrz# = (DecimalPower(GETJOYRZ(0),5) * 100.0)

LET text$="";
  IF joy_x=-1; LET text$="LEFT";   ENDIF;
  IF joy_x= 1; LET text$="RIGHT";  ENDIF;
  IF joy_y=-1; LET text$="UP";     ENDIF;
  IF joy_y= 1; LET text$="DOWN";      ENDIF;
  IF joy_a= 1; LET text$="BUTTON A"; ENDIF;
  IF joy_b= 1; LET text$="BUTTON B"; ENDIF;

PRINT nameJoyStick$,0,0
PRINT "No Joysticks = " + noJoySticks%,0,20

PRINT "JOYSTICK:",100,80;
PRINT text$, 100,100;
PRINT "x = " + jx#,20,120
PRINT "y = " + jy#,20,140
PRINT "z = " + jz#,20,160

PRINT "xr = " + jrx#,20,200
PRINT "yr = " + jry#,20,220
PRINT "zr = " + jrz#,20,240

PRINT "xC = " + jxCenter#,20,280
PRINT "yC = " + jyCenter#,20,300
PRINT "zC = " + jzCenter#,20,320

IF jx# > jxCenter# + -5.0 AND jx# < jxCenter# + 5.00 THEN PRINT "(C)",200,120
IF jy# > jyCenter# + -5.0 AND jy# < jyCenter# + 5.00 THEN PRINT "(C)",200,140

PRINT joy_a+" - "+joy_b+" - "+joy_x+" - "+joy_y,50, 50

SHOWSCREEN;

// jxCenter# = sx/2

// jyCenter# = sy/2

// 40 = sy/2

rectCx = (sx/2)
rectCy = (sy/2)

rectX = (rectCx-(rectSize/2)) + (jx# * xIncrement) - jxCenter#// jxCenter#
rectY = (rectCy-(rectSize/2)) + (jy# * yIncrement) - jyCenter#// jyCenter#

GOTO start;

FUNCTION DecimalPower: Real_Number, Decimal_Power
//Round Down, a Decimal Number, to the nearest power of 10.
// The Decimal Power must be a power of 10, ie: 1 2 3 4 etc

RETURN INTEGER( Real_Number * POW( 10, Decimal_Power ) ) / POW( 10, Decimal_Power )

ENDFUNCTION

FUNCTION calibrate:

lb1 = 0
WHILE TRUE
BLACKSCREEN
PRINT "Touch to set ZERO position",20,100
SHOWSCREEN
MOUSESTATE mx,my,b1,b2
IF lb1=1 AND b1 = 0
jxCenter# = (DecimalPower(GETJOYX(0),5) * 100.0)
jyCenter# = (DecimalPower(GETJOYY(0),5) * 100.0)
jzCenter# = (DecimalPower(GETJOYZ(0),5) * 100.0)
GOTO jumpout
ENDIF
lb1 = b1
WEND

jumpout:

ENDFUNCTION


#55
@Kitty Hello

I didn't really understand a word of what you just said  :-[ , but I think we're talking at cross purposes.

@MrTAToad

Most any game I have played that make use of the accelerometer in them have a form of calibration in them, whether that is presented to the user with a calibration screen (not usually) or whether it's all handled behind the scenes.

And that is what I am trying to do.

What I mean is this... (hopefully this makes some sense!):

If I draw my rectangle somewhere from 0 to 480 down the screen based upon getjoyy(), I can say that center is (screenheight/2) or 240, and I can draw it above or below that depending on joystick y value.

But (without ANY form of calibration) - and this is the crucial point - this assumes that the center value was 0,0 when we started, or to put it another way, that the iPod is lying flat on a table.

Now what if the iPod is being held at an angle that is comfortable to the user when we start? In my experience, this is exactly what most accelerometer based games allow, using a simple internal calibration of the type I am describing and trying to implement.

It's trivial to capture this x and y 'home position' value as we go into the game. But this means that the rectangle will, for example, travel only halfway down the screen when tilted down on y, and go completely off the screen when tilted up on y, based upon our 'perfect' calculations that assumed a 0,0 center.

I guess what I'm asking is how do you, mathematically speaking, scale a joystick movement based upon a center offset so that the total travel in any given direction still equals the edge of the screen?

See, I know what I'm trying to do, really, it's just the math eludes me! :S

Mike

#56
Hi,
I am doing some test code for compiling on the touch. I can move a rectangle around the screen no problem using the joystick commands. My issue is this.

I would like to offer the ability to calibrate the screen according to the angle the player is holding his touch.

e.g. If I lay the touch on the table and start the game there is a rectangle sitting in the center of the screen. When I tilt the screen the rectangle moves around. (I can already do this).

Now I want to hold the touch in my hand in a comfortable position and when I start the game no matter what position I am holding the touch in I want the rectangle to once again be in the center of the screen. and play the same way as before. Of course the rectangle Must stay within the screen area.

So far I can get it to start in the center regardless of the angle I am holding the touch by setting an offset but for some stupid reason the whole screen is being offset.

How are you folks doing this calibration type thing.

Thanks.

Mike R
#57
Just wanted to say that the fantastic help you people have given in this thread has cleared up all the issues in understanding types I had.

Thank you all so much.

Mike R
#58
Thank you very much for the replies folks. Will have a look at each of your examples and hopefully clear up this problem finally for myself.

Cheers

Mike R
#59
I have had a look through the manual and one minute its talking about books then employees and somewhere along the way I got lost. :D

ANY tips would be very helpful.

Thanks

Mike R
#60
It would be good to use the native dialogs but as I cant figure it out either I have resorted to creating my own keyboard for the game.

Cheers

Mike R