Posted: 1st Sep 2011 19:52
MP3 is discouraged due to various licensing restrictions that kick in if you ship over 5000 copies of a game (and Meego doesn't support MP3 at all out of the box).

The recommended format is currently M4A which has no distribution limitations, and OGG which has no restrictions at all. If you include a copy of your music in both M4A and OGG and then use LoadMusic( "myfile.mp3" ) the AppGameKit will pick the most appropriate file for the current platform.

If you're in tier 2 you can just include the right file for the platform you are compiling for.
Posted: 1st Sep 2011 20:58


Paul, what does this mean? Do we need to stop using mp3 files for our game music? I've tried LoadMusic("myfile.ogg") and LoadMusic("myfile.m4a"), both with files that I can play in winamp or quicktime. AppGameKit doesn't play any sound at all with those. And using LoadMusic("myfile.mp3") with both those files in the media folder just results in a crash with the file not found.

So, what files do we use for music?
Posted: 2nd Sep 2011 1:30
I'm perfectly happy to use ogg for everything, once it works.

I've tried to load my music in ogg format as both an ogg and mp3 file. In both cases the music doesn't play (at least I can't hear anything).

And can we have ogg support for sound effects as well please?
Posted: 2nd Sep 2011 10:24
I started getting that same type of error when I included too many "create text", and "delete text" commands.

But I'm not adding any more of those commands! It's when I include anything. Even adding a new, blank function it breaks. Remove that function and it compiles!

This needs to be fixed!
Posted: 2nd Sep 2011 10:49
There do seem to be a lot of 'random' errors thrown up.

My code compiled fine, I then added a new source file, included it, and added a function with a single CreateText command.

Went to compile the code and it complained about an unknown parameter in a function in a different source file.

Comment out the CreateText line in the new file and the code compiles again.

some of the stuff thrown up by AppGameKit makes it incredibly difficult to track down problems. Errors are often reported on lines (or in files) that have no relation to what the problem eventually turns out to be.
Posted: 2nd Sep 2011 11:16
I've just removed most of my create text commands.

Rather than create all text at once, I now create them only when they're on screen, and delete them when they're off screen.

Now, I get the error: "AGK Compiler has stopped working." every time I compile.

If I return to the previous way of working, (but without adding any extra functions) it works again.

This is not proving useful. I NEED this sorting out, or at least a work around provided!


**EDIT**

Now, adding anything String or Text related will crash the program.

I can create function "Test( Integer, Float )" and it works,
creating Function "Test( String, Integer, Float )" does not.
Also adding one more for/next loop in will crash the compiler. Not my game, the compiler.

Not even the DBP compiler was this bad.
Posted: 2nd Sep 2011 13:11
I feel your pain! It was doing the same thing to me. All I can tell you is that I got rid of many create/delete sprite and text commands and the crashing stopped. For AppGameKit Particle Sandbox, I was using sprites for everything, expanding a one-pixel image into many boxes, controls, text field backgrounds. And I was creating/deleting all the field labels everytime I displayed a window graphic.

The fix for me was to draw all the static text and background elements in a paint package, and stop all the sprite/text create/deletes.
Posted: 2nd Sep 2011 14:02
The problem I'm having is that my UI code works a lot like powerpoint. Each screen contains many button objects. Each object can have text assigned to it. It only creates/deletes the text when the screen transitions in/out but still I have this issue.

I'm at a complete standstill as I cannot do any further work on my game, other than try a complete re-write to avoid it.

On the plus side, the (completely standalone, drag and drop) UI system has a working scripting engine and works perfectly! Pretty much anything you can do in powerpoint, you can do with my UI engine. (I may consider selling the code once I've resolved the crashing issue, even though the code works perfectly in a blank project.)


Which reminds me, I'd love to see the ability to compile/convert the source code into a non human readable format like LUA can do. It would make the selling of plugin like addins safer.
Posted: 2nd Sep 2011 15:36
AGK doesn't play any sound at all with those.


You need an OGG filter for DirectShow, such as http://www.free-codecs.com/ogg_directshow_filters_download.htm

LoadMusic("myfile.mp3") with both those files in the media folder just results in a crash with the file not found.


You will need the latest update to use LoadMusic( "myfile.mp3" ) without mp3 files.

Do we need to stop using mp3 files for our game music?


You can use mp3 if you like, but be aware of the licensing issues involved http://mp3licensing.com/royalty/games.html it doesn't say anything about free games, so be careful.

I've let Lee know about the compiler issues.
Posted: 2nd Sep 2011 15:55


Good to know. Does that mean that anyone who plays my game must have that filter on their computer? I would hate to get in that whole "you must have DirectX 9.0c" kind of situation with AGK.

Also, do you mean the next update, because I've got some music named "m.m4a" in my media folder, and LoadMusic("m.m4a") does nothing, and LoadMusic("m.mp3") throws an error, "failed to load mp3 source filter at line 144 in root".
Posted: 2nd Sep 2011 15:58
I'm guess the same also applies to M4A support. Can OGG playback not be supported from within AppGameKit so that seperate filters and plugins aren't needed?
Posted: 2nd Sep 2011 16:13
I've let Lee know about the compiler issues.


[big][big][big] [/big][/big][/big] lol
Posted: 2nd Sep 2011 16:20
Mac, iOS, and Bada will all play M4A natively, Meego will play OGG natively, Windows requires the DirectShow codecs to play them.

supported from within AppGameKit so that seperate filters and plugins aren't needed


There are currently no plans to add OGG/M4A decoding directly in to the Windows version of AGK.
Posted: 2nd Sep 2011 16:54
After using "message(text$)" the "GetPointerState()" command retains it's previous value on returning to the App.
+ Code Snippet
do
    pointer = GetPointerState()
    
    if pointer = 1
        message("pointer pressed")
    endif
    
    Print(str(pointer))
    
    Sync()
loop


EDIT: There is a workaround but in my opinion it's not ideal:
+ Code Snippet
do
    pointer = GetPointerState()
    
    if pointer = 1
        message("pointer pressed")
        while GetPointerState()=1
            sync()
        endwhile
    endif
    
    Print(str(pointer))
    
    Sync()
loop
Posted: 2nd Sep 2011 17:19
When the mesage box opens it traps the mouse so the release notifaction goes to the message box instead of the AppGameKit window, you could try trigerring the message box on GetPointerReleased() since then the click is completed as doesn't need any more notifcations.
Posted: 2nd Sep 2011 17:28
That's a better workaround, wasn't sure if it was intended that's all, I thought it odd that the value didn't reset since nothing was being pressed surely it should return 0 even if the mouse has been trapped elsewhere temporarily?

Is there no way to send the release notification back to the app too? ...or to flag up that focus went away from the app and reset input data such as this?

Either way it still seems like a bug to me if only a minor one.
Posted: 2nd Sep 2011 18:05
Not a biggy and not sure if its already been reported (to many posts to search). The IDE won't syntax highlight the last line of code unless enter is pressed, leaving the last line of code in a file looking a little sparse in colouring....unless you have a blank line at the end of every file that is.
Posted: 3rd Sep 2011 11:54
The commands ERROR and WARNING cause AppGameKit to stop the compile process with a message like this:

Could not understand the command at line...

+ Code Snippet
rem
rem AGK Application
rem

rem Portrait App
SetDisplayAspect( 0.66 )
SetOrientationAllowed ( 1, 1, 0, 0 )
SetClearColor ( 255, 0, 0 )
//Error ( "something has broken" )
Warning ( "missing some data" )


SetErrorMode ( 0 )


//Error ( "this error will not be shown" )

rem A Wizard Did It!
do
    fps = ScreenFPS ( )
    Print("hello world! FPS="+str(fps))
    Sync()
loop
Posted: 3rd Sep 2011 20:07
After getting a new Fritz.Box 7390 running yesterday, my problem with my IPod AppGameKit Player detecting the broadcasting seemed to have vanished.

But I noticed one thing.

On OSX, the player can be reset into STANDBY when you click in the upper area for at least 5 seconds. On my IPod Touch 2gen running iOS 4.2.1 on it, that doesn't work at all. I always have to press the home button and then start the app again.
Posted: 3rd Sep 2011 20:27
There is an information missing in the help file:

Command: AddVirtualJoystick


Parameters:

index - The ID of the virtual joystick to create, must be in the range 1 ?????