Posted: 15th Aug 2011 16:49
Hey guys,

So I downloaded and opened the Example file in AppGameKit and ran it. It opened up the mole game. I noticed on the side that there were LOTS of things open. One seemed top be another game?
So, can you make 2 games with on file, because when I opened the example that is what it seemed to have done, but when I ran it, only the mole game.

One more question about the wifi sender (that lets you test the games on other platforms).

Does the other platform (phone) need a player? It said that it would use a free player...


Cheers.
Posted: 15th Aug 2011 16:53
The main example file is a workspace that contains a collection of projects. By default the Games - Smack It project will be active and when you compile and run this will launch. To select another project right click on it and select activate project, now you can launch this.

To test across WiFi you will first need to launch the player app on the device / platform e.g. Mac AppGameKit Player on Mac OS X, then compile, run and broadcast your game on Windows.

We are currently waiting approval with iOS, Samsung Bada and Meego players.
Posted: 15th Aug 2011 16:58
To test across WiFi you will first need to launch the player app on the device


Where do you find this player for the phone? Or is it not out yet?


Cheers.
Posted: 15th Aug 2011 17:00
The iOS player is not yet available. Still waiting on approval from Apple.
Posted: 15th Aug 2011 17:14
Ok, thank you. Now, if I were to broadcast to a laptop, do I just download AppGameKit on there as well?


Cheers.
Posted: 15th Aug 2011 17:16
Check your installation folder and then go into Players/Windows. Copy the contents of this folder across to your laptop and run Windows.bat, which will launch the player app and put it into standby, now compile, run and broadcast from the IDE.
Posted: 15th Aug 2011 17:20
Thank you very much.


Cheers.
Posted: 15th Aug 2011 18:15
I was trying out the command "for"

Here is what I did:

+ Code Snippet
for a=1 to 10
    print ("Hello World!")
next a


It prints "Hello World!" once.

I look in the index of commands and find out that "for" isn't a command but it is highlighted?

Also, "wait key" is now gone?


Cheers.
Posted: 15th Aug 2011 18:24
It prints "Hello World!" once.


Were you doing this in the main loop? I tried

+ Code Snippet
do
    for a=1 to 10
        print ("Hello World!")
    next a
    sync()
loop


And it printed 10 times.

Also, "wait key" is now gone?


Wait key caused problems on mobile devices that don't like to be paused in user code for long periods of time. While paused they won't update input information, therefore wait key would be stuck in a catch 22 and never return. Sync() forces the device to update it's input information.
Posted: 15th Aug 2011 19:10
"

Ok thanks it worked perfectly.

Wait key caused problems on mobile devices that don't like to be paused in user code for long periods of time. While paused they won't update input information, therefore wait key would be stuck in a catch 22 and never return. Sync() forces the device to update it's input information.


So I can just use sync like wait key but without pausing the project.
Thanks.


Cheers.
Posted: 15th Aug 2011 19:14
So I can just use sync like wait key but without pausing the project.


Yes, you could do something like this

+ Code Snippet
while GetPointerPressed()=0
    Sync()
endwhile
Posted: 15th Aug 2011 19:28
Sorry to bother you again but I saw this example code to play a sprite animation (from Sprite Animations 1):

+ Code Snippet
// play the sprite at 15 fps, looping, going from frame 1 to 5
PlaySprite ( 1, 10, 1, 1, 5 )


It says 15 fps but isn't it really just 10 fps or did I miss something? I just wanted to be sure.


Cheers.
Posted: 15th Aug 2011 19:30
Was probably 15 fps at some point, but changed to 10 fps without updating the comment.
Posted: 15th Aug 2011 19:35
Yeah, it's 10fps, looks like the code got changed but not the comment.
Posted: 15th Aug 2011 19:38
Thanks, just wanted to be sure.


One more thing,

For a scrolling background sprite, does the image have to be very long or can I just have it scroll forever with a small image?


Cheers.
Posted: 15th Aug 2011 19:44
You can scroll the UV coordinates. I would not recommend loading very long images (over 1024 pixels in size) on mobile devices.
Posted: 15th Aug 2011 19:51
Thanks.


Cheers.
Posted: 15th Aug 2011 20:04
mode - The physics mode to use for this sprite, 1=static, 2=dynamic, 3=kinematic


What is kinematic?


Also, for reading and writing a file,
When writing a file (hello), it seems to write:
a weird symbol then a p? followed by hello.
Is that suppose to be like this?

Is there a way to choose where it writes the file or is it just where the .exe is?

For reading a file, what use does it give?

I'm sorry for all of these questions but I'm learning a lot from this.


Cheers.
Posted: 15th Aug 2011 20:18
From the Documentation.
Kinematic is a special case which can be thought of as a moving static body, it will not respond to collisions or forces and will continue at its specified velocity forever, but dynamic items will respond to it and effectively be pushed out of the way.

Writing to a file.
If you are using WriteString those extra characters are probably information about what's being stored and how long it is.

You don't get to choose where you save files from within the app. Because the apps have to protect the security of the end user's other data it's required by most stores to only allow your app to write to a special directory made especially for it, and nowhere else.

For reading a file, what use does it give?


Not sure I understand the question.
Posted: 15th Aug 2011 20:50
Not sure I understand the question.


I mean is there a way to use what it reads?

If you are using WriteString those extra characters are probably information about what's being stored and how long it is.


Is there another to write in a file?


Cheers.