Posted: 15th Aug 2011 17:45
There is now a dedicated AppGameKit bug board: http://code.google.com/p/agk/issues/list. Please post there.
Posted: 15th Aug 2011 19:02
I have ZoneAlarm installed and each time I compile/run/broadcast an AppGameKit program, even the same one, a zone alarm popup tells me AGk wants to access the internet, even if I set the setting (in ZoneAlarm) to 'always let AppGameKit access the internet' the pop still appears.

It's rather annoying to have it pop up each and everytime I compile/run/broadcast.
Posted: 15th Aug 2011 19:16
Here is one:

If you chose to just run your code and not broadcast, it will rund the last build, not the updated code.


Cheers.
EDIT:
Never mind, you have to press compile first. Pressing run will only run the last build but if you press compile then run, it works.
Posted: 15th Aug 2011 19:17
I've sorted out the zonealarm issue, you need to manually allow AppGameKit to access the 'Trusted Zone' and the 'Internet'.
Posted: 15th Aug 2011 19:31
I found a bug: if you run agk at the same time as dbpro then the mistakes in your code go to the dbpro editor and highlight a random line in the dbpro editor and show no errors in the agk window.
Posted: 15th Aug 2011 19:33
Is this an error in the help file? It says to select the box shape for collision, which is 2 according to the list, but is a 1 in the example?

f we used boxes then the collision will still work, but perhaps not be entirely accurate. In another example we?ll look at this in more detail and understand the relationship between a sprite and its collision shape.
Posted: 15th Aug 2011 19:45
Likely to be a mistake in the example listings. Will get it corrected.
Posted: 16th Aug 2011 3:28
I'm not sure if its a feature, but when I try pass in a UDT to a function

FUNCTION test(var as varType)

The program compiles, runs then just freezes.
Can you pass in UDTs into functions? And can you return them?

If not, then I suppose the fact the compiler ignores the UDT->function call is an error.

EDIT: Just to speed up checking, the code which causes a crash:
+ Code Snippet
TYPE testType
xPos as Integer
yPos as Integer
ENDTYPE

myvar as testType
myvar.xPos = 0
myvar.yPos = 0

adtTest(myvar.xPos)

do
 Print(myvar)
 Sync()
loop


FUNCTION adtTest(test as testType)

    test.xPos = 100
    test.yPos = 150

ENDFUNCTION


EDIT2: Just found out that returning a UDT from a function works! (Huzzah!) So its just passing a UDT into a function causes a crash.
Posted: 16th Aug 2011 3:37
The function OpenToWrite() doesn't seem work. I can't get it to create a file with it. Tested on Win XP (Tier 1) and Mac OSX Lion(Tier 2 Xcode 3.25), both didn't create the file.

BTW, wasn't there suppose to be a Xcode 4.0 version of the sample code in Mac installation package?
Posted: 16th Aug 2011 3:57
Created files (on Windows) are stored in your My Documents folder under AGK/your application's path. Check to see if it was created there.

I'm not sure where they go on Mac.
Posted: 16th Aug 2011 4:08
Already reported these to Mike, but here are some things to look out for:

Lower() and Upper() are broken. It creates odd characters in the string.

Here is a temporary solution:
+ Code Snippet
Function Lower$( text$ as string )
    newText$ = ""
    
    For i = 0 to Len( text$ )
        char$ = Mid( text$,i,1 )
        if Asc( char$ ) >= 65 and Asc( char$ ) <= 90
            newText$ = newText$ + chr( Asc( char$ ) + 32 )
        else
            newText$ = newText$ + char$
        endif
    Next i

Endfunction newText$


Non - Global variables within functions do not reset their values:

If PointerWithin() is called and returns 1 then next time you call it, even if it's false it will return true.
In this code the "inArea" variable doesn't reset to 0 even though it isn't a Global variable. Simple solution for now is to add "inArea = 0" at the start of the function

+ Code Snippet
Function PointerWithin( x# as float,y# as float,width# as float,height# as float )
   if GetPointerX( ) > x# and GetPointerY( ) > y# and GetPointerX( ) < x# + width# and GetPointerY( ) < y# + height#
      inArea = 1
   endif
Endfunction inArea


Forced to "declare" strings before adding them:

This won't work:

+ Code Snippet
text1$ = text1$ + text2$


But this will:

+ Code Snippet
text1$ = ""
text1$ = text1$ + text2$


If you try the example code you'll notice it works, but if you comment out the "newText$ = "" " in the "Bug$()" Function you will notice that the Message() function will display a blank string instead of the word "newBug".

+ Code Snippet
text1$ = "newBug"
Message(Bug$(text1$))

Do

    Sync()
Loop

Function Bug$( text$ as string )
    newText$ = ""
    newText$ = newText$ + text$
Endfunction newText$
Posted: 16th Aug 2011 5:41
Created files (on Windows) are stored in your My Documents folder under AGK/your application's path. Check to see if it was created there.

Ok i see it there now, but why is it there and what is the purpose of those folders and files created in the My Documents folder?
Posted: 16th Aug 2011 7:35
This is not a bug exactly, but I'm having real trouble downloading the AppGameKit due to my location from the exchange. I only get 55kbs from TGC (maximum is usually 100kbs) and the download is repeatedly interrupted so I am unable to use this product.

Would it be possible to provide an alternative download link? or perhaps split the product into file sizes ~100MB instead of the full 400MB?
Posted: 16th Aug 2011 8:49
Hello,

in the example "virtual joystick"(move a player around the screen by using a virtual joystick) with a footballer, I created a virtual button and added it to the text but the text of a problem. when the screen moves the text remains in the position where the button used to be.

+ Code Snippet
// ??? ??????????? ?????????
AddVirtualButton( 1, 90, 90, 5 )
SetVirtualButtonText( 1, "A" )


Is it OK??? thx
Posted: 16th Aug 2011 9:52
When I use the Timer(), nothing seems to happen. I'm using it for timer based movement, and for a 3 second delay in the program, but neither the TBM, nor the delay occur. Is Timer() bugged?

Here's my entire splash screen function. It loads 3 images as sprites, fades them in one at a time, holds them, then fades them out. (Works on DBP as it's an editted cut & paste jobbie!)

+ Code Snippet
Function Splash()
  `Load Splash Images
   CreateSprite( 1, LoadImage( "Textures/MMLogo.jpg" ) )
   CreateSprite( 2, LoadImage( "Textures/TDPLogo.jpg" ) )
   CreateSprite( 3, LoadImage( "Textures/DOLogo.jpg" ) )

  `Make the backdrop white
   SetClearColor( 255, 255, 255 )

  `Show the three splash images
   For Spr = 1 To 3

     `Set the initial values for the fade in
      Alpha# = 0.0 : TimeNow# = Timer()

     `Fade the image in...
      Repeat

         TimeThen# = TimeNow#: TimeNow# = Timer(): TimeChange# = ( TimeNow# - TimeThen# ) / 1000.0
         Alpha# = Alpha# + ( 100.0 * TimeChange# ) : If Alpha# > 100.0 Then Alpha# = 100.0
         SetSpriteColorAlpha( Spr, Alpha# )

         Sync()

      Until Alpha# >= 100.0

     `Wait 3 seconds...
      TimeNow# = Timer()

      Repeat

         Sync()

      Until Timer() >= ( TimeNow# + 3000.0 )

     `Make the backdrop Black for the last fade out.
      If Spr = 3 Then SetClearColor( 0, 0, 0 )

     `Then fade the image out
      TimeNow# = Timer()

      Repeat

         TimeThen# = TimeNow#: TimeNow# = Timer(): TimeChange# = ( TimeNow# - TimeThen# ) / 1000.0
         Alpha# = Alpha# - 100.0 * TimeChange# : If Alpha# < 0.0 Then Alpha# = 0.0
         SetSpriteColorAlpha( Spr, Alpha# )
         Sync()

      Until Alpha# <= 0.0

   Next Spr

  `Delete the 3 images, and sprites.
   DeleteImage( GetSpriteImageID( 1 ) ) : DeleteImage( GetSpriteImageID( 2 ) ) : DeleteImage( GetSpriteImageID( 3 ) )
   DeleteSprite( 1 ) : DeleteSprite( 2 ) : DeleteSprite( 3 )

EndFunction
Posted: 16th Aug 2011 12:44
Another one already reported to Mike:

The application will crash if you give the Val() function a blank string.

For example the following code would crash the application:

+ Code Snippet
t = Val( "" )


When I use the Timer(), nothing seems to happen. I'm using it for timer based movement, and for a 3 second delay in the program, but neither the TBM, nor the delay occur. Is Timer() bugged?


The Timer( ) now counts in seconds rather than milliseconds.
Posted: 16th Aug 2011 13:44
Timer( ) now counts in seconds rather than milliseconds.

Isn't that GetSeconds()

From the help:
et the number of seconds and fractions of seconds since the app was started. Accurate to milliseconds.


*edit* Yep, deffo milliseconds...
+ Code Snippet
Do
   Print("hello world")
   Print( Str( Timer() ) )
   Sync()
Loop
Posted: 16th Aug 2011 16:15
"remstart" and "remend" appear not to work, or at least the highlighting doesn't and if (for example) you dim an array using the wrong syntax (IE. round brackets) in a 'commented out' section you get an error on compile.
Posted: 16th Aug 2011 16:19
Any program compiled in AppGameKit crashes upon running under my clean install of Windows 7 64bit with latest video drivers and DirectX. AppGameKit itself works fine, but compiled games don't...
Posted: 16th Aug 2011 16:25
If you give Val() a non printing character, the program quits with a "This program has quit unexpectedly" error.

I still can't get the timer to work properly either. I know the timer works, but even this code fails to run!

(GetTimer# = Timer() I just set GetTimer# to the Timer() once a loop so I only have to call it once.)
+ Code Snippet
     `Wait 3 seconds...
      StartTime# = GetTimer#
      Repeat
         Print( Str( StartTime# ) )
         Sync()
      Until GetTimer# >= ( StartTime# + 3000.0 )

It just skips past it like it wasn't even there. But I know it gets executed as the images which are supposed to fade in and out flash in front of me.