Cassianno's Forum Posts

  • Vladoss, should be something like that:

    On start layout: Ajax.Require("http://yourscript.php?gethash");

                      Set Ajax.LastData to Webstorage.Local("playerHash");

    At every event that changes level or points you need to within Ajax, send the atribute that changed and the hash: Ajax.Require("http://yourscript.php?setlevel=5&hash"&WebStorage.Local("gameHash"));

    Or make a Every x seconds event that will update, like the same method above, those points (using a object variable or global variable, depending on what you have).

    It's a bit more secure compared to just store the atributes at the client side, but as the atributes are sent trough Ajax, they can be changed too.

    If you don't have to upload to Arcade and CAN use third-party plugins, you can use the CBHash plugin made by Kyatric and add some checksums to the values passed, so the player will have EVEN MORE difficult to change the atributes passed, even if theyre crystal clear on the ajax URL required.

    Edit: i'll try to make an example .capx if i have time, ok?

  • Indeed twdead... But as the code is obfuscated and whatsoever, it's more difficult to change mechanics by changing javascript then just change a querystring, u see?

    But who knows? maybe i'm just too concerned...

  • bump? :X

  • Yeah, the description is wrong. But i would sticky with Set =P

  • I suggest you to save a hash.

    And then, within AJAX, you get the player info indexed by this hash ;)

    That's what i'm doing...

  • Oh, your question was about the loop part, rite?

    To create the tree, you'll have a

    system Repeat WebStorage.Local("qtyNodes")

    - index++;

    - allocate the current (WebStorage.Local(index)) node within the tree {...}

  • Webstorage is like a cookie: you have a key and the stored value.

    1)

    In this example your webstorage would have 9 keys:

    qtyNodes, storing the quantity of nodes you have on the tree and the nodes itselves (dunno if this word exists but u know what i mean), indexed from 0 to 7 (amount-1).

    2)

    It's up to you. I would go with webstorage because the setters/getters are easier to manage. Withing AJAX, you would have to make a request for every node and get its info...

  • If you create the tree automatically, with math expressions (angle and etc), you just need the nodes info.

    You can save each node indexed by UID's node.

    The string saved would be parentUID-nodeLabel.

    Iterating your tree example to the left, we have:

    Key(0): -Concept Tree

    Key(1): 0-JP

    Key(2): 1-? (don't have the euro symbol here)

    Key(3): 1-WebApp

    Key(4): 3-User

    Key(5): 4-Creatie Meting

    Key(6): 3-User

    Key(7): 6-Creatie Meting

    A key for qtyNodes is nice too, so you can loop using it as index.

  • Having both is good, but i always seek for a good gameplay.

    For example, i prefer Ultima, Might and Magic and etc, besides new and shi**y (MMO)RPG's.

  • kirby, once you find a good converter please post it here.

    I already tried about 3 and none was good.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Spawn a car from time to time and make the car have the BULLET behaviour. By setting it's angle (0 -> and 180 <-) they will move.

  • I thought it was hard too. I've managed to go to lvl 3 (and i think i've finished it) with some ease, but the enemies have too many health points =X

  • No Sheep, it's not.

    Imagine you have a standard event sheet, which contains collisions, enemies control (create/destroy/etc) and spaceship control.

    For every layout (stage), you'll need to include this standard event sheet on the layout's event sheet.

    Every layout MUST have at least 1 event sheet that will control spawning on stage. That's what zapmore is saying =D

  • I've made a simple test:

    http://labgames.camo.com.br/enemies_hp

    http://labgames.camo.com.br/enemies_hp/enemies_hp.capx

    You need to improve the handle of the bar within more enemies on screen and put the origin point on left, if your bar sprite will have a border to have the "fill" effect...

    I'm still not used on how to add event like "On <object> created" and how to handle instances properly, otherwise i would have made a more complex example hehe.

  • But you're not passing the texts trough the URL!

    Request this:

    "http://localhost/score/score.php?name="&TextBoxObjectForName.Text&"&hiscore="&TextObjectForScore.Text

    Attention on " and &, just change the bold text. ;)

    Also i suggest you change

    $name = $HTTP_GET_VARS[name];

    $hiscore = $HTTP_GET_VARS[hiscore];

    To

    $name = $_GET['name'];

    $hiscore = $_GET['hiscore'];

    The var $HTTP_GET_VARS is deprecated in PHP (i know it's that wy on tuto, but believe me :) )