AndreasR's Recent Forum Activity

  • Hi there,

    I need to help a friend to connect my game with AJAX to get some states back. I've never worked with AJAX and he isn't familiar with Construct 2. Maybe some of the community can help us out.

    Information

    [quote:3t65jpsd]What we need to do at the start is go to a file on our server and do an AJAX call ( which I'm told is easy to do in Construct 2) for the function getState(). Then if our program returns a state, the game should use that reconstruct the state of the program our student left it at. Our program will know which student the state is for, all the game needs to do is load up the saved state. If it gets nothing in return then it starts a new game.

    The game needs to save the state of itself often, so disconnecting randomly doesn't cause lost of major progress. To do this the game just calls the function in the same file called setState(state). doing this the game should give all the variables that are needed to recreate the progress of the game to our program. Such as how many levels where competed and which what score, stars, etc.

    Lastly, the game should kick a player out after about 7 minutes minutes. On your end all we need is for the game to decide after about 7 minutes of play time to end the game. If the player is in a level, it should wait until they either complete the level or lose. When either one of these events happen the game should go to the same file and (after saving the state) call the function gameBreak(). Then our side will handle taking the student out of the game and back into the rest of our program. Also if a player wants to voluntarily leave the game there should be an exit button which executes setState(state) and gameBreak()

    So to recap in a simpler way:

    To do this:

    1) On start the game should go to our php file and do a simple AJAX call. It should call the function getState(). This should get all the variables from our system.

    2) The game should do the call setState(state) often so progress isn't lost. This should save all the variables on our system.

    3) The game should call gameBreak() to tell our program it is time to kick a player out. Our program will handle kicking them out.

    Summary

    "/student/game/getstate"

    "/student/game/setstate/(statestring without "/"s)" OR "student/game/setstate" where AJAX passes the state string as POST data with name "state"

    and /"student/game/gamebreak"

    These will return a raw string.

    Can anyone help with the AJAX Part?

    Thanks a lot!!

    We give away a free redeem Code for our Mobile Game UI PSD File for the helpers

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Description

    Get our next free Mobile Game UI for your free games!

    Download: http://shatter-box.com/downloads/modern-game-ui-hud/

    Note: You can checkout without an account. Just enter your name and your Email.

    Screenshot

    Want to share your free stuff?

    Just register an account and start uploading your stuff (only free stuff at the moment).

    IMPORTANT:

    Everyone who has opend and uploaded a free account at shatter-box will get a free redeem code for our Mobile Game UI's in the Scirra store!

    Note the license of this file!

    This Game UI is free for free games (available for free, monetizing via ads is also counting as a free game), but if you use it in commercial project (charge player for playing the game or sell it in one of your products) you need to purchase the commercial-license.

  • I'm not sure, but your demo shows another game then the screen shots? Which game do you sell? The Infinity Jumper Template or the Jungle Run game?

    I also would be carefully with your chalkboard game, because you sell the same at the envato marketplace too and your are an exclusive author as far as I can see.

    http://codecanyon.net/item/chalk-hangman/6693486

    Just be carefull with that;)

  • Mobile Game User Interface (PSD) — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-graphics/mobile-game-user-interface-psd-35

    <p>You need a cool style for your menu and game ui? Then check out this game UI. You can modify it or use it 'as-is' for your game.</p>

    Use this topic to leave comments, ask questions and talk about Mobile Game User Interface (PSD)

  • Mobile Game UI (PSD) - Scirra — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-graphics/mobile-game-ui-psd-scirra-58

    <p>You will get a complete Game UI as an Photoshop file. Just edit it like you want and extract the sprites you need ;)</p>

    Use this topic to leave comments, ask questions and talk about Mobile Game UI (PSD) - Scirra

  • I have tried this game

    https://play.google.com/store/apps/deta ... terbuttons

    And i also see ads. what phone do you use?

  • The game you've uploaded at the play store was compiled with 1.4.7 or with 2.0.2? Share a link to the 2.0.2 version please.

  • I've downloaded your game and the first thing i saw was the ads...

    [attachment=0:1p3st2t8][/attachment:1p3st2t8]

  • Did it work with 1.4.7 for you? Have set it up like on my tutorial?

    https://www.scirra.com/tutorials/1024/m ... onjs-games

  • New tutorial to install the CocoonJS Plugin

    http://shatter-box.com/document/cocoonj ... js-plugin/

  • Don't worry. it's normally that this takes a while. They review you faster if you attach a link to the playstore/itunes of the game you want to monetize It took about 2-3 weeks for me.

  • hi,

    i would like to know how you do to change sprite

    for exemple

    i have the same layout wich is played but with different sprite (player) that i select on firty layout !!!

    and every sprite have animation

    in my case i create different layout with the different sprite but i would like to know i there any solution to just change sprite on the same layout ? because it take me time to change all the action depending the sprite

    thanks

    Do you mean a skin chooser? Something like that?

    Send me a PM and I can share the code with you.

AndreasR's avatar

AndreasR

Member since 21 Feb, 2013

Twitter
AndreasR has 6 followers

Connect with AndreasR

Trophy Case

  • 11-Year Club
  • x11
    Popular Game One of your games has over 1,000 players
  • x17
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

15/44
How to earn trophies