Passing data to and reading from the game

Get help using Construct 2

Post » Wed Dec 18, 2013 1:28 am

Hi all,

I'm investigating using Construct2 for creating game scenarios for teaching Algebra. Basically, I set up a scene that requires students to do calculations to find the answer. The games will be embedded within our online homework system as html5 files.

I need to be able to pass data to the game and read the students answers from the game so that they will receive a grade. I have looked and looked and can't find any examples or ideas. But I'm old. So I may have missed it. Any help would be appreciated.

Thanks,

Bill
B
3
Posts: 2
Reputation: 179

Post » Wed Dec 18, 2013 7:23 am

By using AJAX posts, you can relay information back and forth to a server quite simple.

AJAX posts are like regular form posts.

If you have a php capable webserver with mysql in your homenetwork, then you can use that.

concept:
cs2 app makes Ajax post request to a http addres.
web page catches post and relays output as required. (php handles mysql)
cs2 app receives the relay output data and makes it avaible in as AJAX.Lastdata with on ajax request complete.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Dec 24, 2013 2:38 pm

Thank you very much for the idea. We got it to work. I have a game where they have to hit two sprites with one shot and it returns their score and it is recorded as their grade for that question. Basically, we have proof of concept.

I have about 20 of these to write this spring to get ready for fall semester. Should be fun.

Thanks again,

Bill
B
3
Posts: 2
Reputation: 179


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, richcoz81 and 34 guests