Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Tier 2 State machine Example

Author
Message
Tristanlogd
10
Years of Service
User Offline
Joined: 23rd Jun 2013
Location: Virginia
Posted: 13th Nov 2013 20:15 Edited at: 13th Nov 2013 20:15
Does anyone have a simple example of a state machine in Tier 2 for user input (Or just a simple execution example for best practices in tier 2)? I ran into a problem which appears to be well known (Sync() does not work everywhere unlike tier 1), however I have not been able to find any examples of implementing a state machine. Just a simple example would be great.

Thank you!

Realm of Ages
http://realmofages.net/forums/
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Nov 2013 21:18
I actually do. I am way overdue in finishing breaking up the long tutorial page into smaller ones.

Attached is a zip file with the code and media for the demo/tutorial. It doesn't show user input, but you should be able to see how to fit something like that in. The HTTP example shows how to do something in multiple steps.

For a user input the first state would be creating the input environment. The next state would be waiting for the user to indicate that they were done entering stuff. The final state would be collecting and returning the entered data.

The goal of the 'game' is to get the ball to hit the box. You move the ball by clicking where you want it to go.

I had to rename the zip file so that I could select it here. Drop the '.thing' extension from the file name and then you should have a zip file.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Nov 2013 21:25
The HTTP commands are set to work with an existing web sites (mine). The IP addresses are correct and the test pages exist.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Tristanlogd
10
Years of Service
User Offline
Joined: 23rd Jun 2013
Location: Virginia
Posted: 13th Nov 2013 21:38
Thank you Ancient Lady, this is way more than I was expecting! Very much appreciated.

Realm of Ages
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Nov 2013 22:00
Well, it started as a simple state machine demo and grew to so much more. Demonstrating simple and secure HTTP communications and proper handling of AppGameKit strings and some cool stuff with classes.

It is actually a fairly good start for a complete game engine, of sorts.

Maybe I can work on getting the pages for the AppGameKit tutorial set up (Paul is ready to post it when I have it finished) when I am traveling for Thanksgiving. Not much to do in a car for several hours other than reading, playing games and such.

I think the comments are relatively self explanatory. But feel free to ask about stuff.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-03 09:13:47
Your offset time is: 2024-05-03 09:13:47