lennaert's Forum Posts

  • Game is not loading for me, it gets some errors in the console:

  • Read a bit in the forum recently about the use (or rather uselessness) of the WHILE event ....

    Excellent for this purpose:

    https://www.dropbox.com/s/nmqs61lhbreo3 ... .capx?dl=0

  • Just check the tutorial section and search the forum, quite a few examples out there.

    For the google and facebook leaderboards, you require some patience after setting up the leaderboard on the dev consoles.

    It takes some time before they work.

    Also, generally they require a working model from a secured hosting location (https) if you use web versions.

    (So preview will most likely never work to send scores etc)

    Make sure to check the log console (ctrl + shift + J) to see what errors pop up when your trying to get it to work.

    They are often a good starting point when something is amiss with services from a 3rd party location.

  • If you use PHP, then add the header access control:

    i.e.

    <?php
    header('Access-Control-Allow-Origin: *'); 
    
    ..rest of your code ...
    ?>[/code:2oencyf8]
    
    Also, for your Ajax request, you can add the header: 
    
    Header: "Access-Control-Allow-Origin"
    Value: "*"
    
    This solves most of the cross domain issues.
  • Take a look at the pong multiplayer example.

    It has a similair setup, but then on the left and right of the screen.

    Shouldnt be too hard to modify to top and bottom.

  • With ajax you can read files and data from an external location.

  • In the console, you can see the details of the request, you can even see if you get anything in return.

    Also, try removing the question mark in the data field, I don't think its needed.

    In c2 your using the Ajax.LastData ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In your PHP file, below <?php, add

    i.e.

    <?php
    header('Access-Control-Allow-Origin: *'); 
    
    ..rest of your code ...
    ?>[/code:yqucdyky]
  • Sry for the double post, here's a link to a cordova page with some more info:

    Build cordova app in and for windows

    In the menu on the left are other build options etc

  • I believe you need to build an app with it. (like it wont work in a straight up browser page)

    Check the Cordova export option comments at the bottom of the export project window in c2.

    Intel XDK has the option to build cordova apps.

    (macos can install stuff too to build cordova apps)

  • I never really heard anyone complain they had to type a name when setting an high score ^_^

    It gives a player the chance to set a unique name, or someone else' when another person is playing on some other persons account.

    Saving someones name in a high score DB isn't really a problem, generally these sort of details are covered in a disclaimer or Terms of services.

    The Facebook high scores work, it just takes some patience getting it up and running.

    When you scored an high score and sent it to facebook, and afterwards retrieve the list, you see the scores list of yourself and your friends from Facebook. (so its not a global high score)

  • The setup you desire for the multiplayer part requires an online database which stores:

    -A Players' Galaxy coordinates with system coordinates (unique references)

    -Player game state (gets updated when someone attacked, and is loaded when the player returns)

    This to support the online mode when the player is offline; so other online players can find it.

    Also, depending on the type of game play you want, if you want real time interaction with other players, you will require the scirra multiplayer plugin (or others) which generally pertain a vastly different approach to game mechanics then regular single player mode.

    Tips:

    Make a couple smaller multiplayer games mechanics to get a grasp of the differences it will entail.

    As for database, I would recommend PHP/MySql by means of Ajax.

  • Save & load games Tutorial

    Just make sure you use the LocalStorage instead of the deprecated Webstorage.

    Ashley; update perhaps ?

  • event

    for each player object

    sub event

    player.energy <= 0 destroy player

  • There are a lot of good tutorials in the tutorial section.

    However, seeing as you are new to construct 2 development, I would start of doing a wide variety of smaller and easier tutorials. Or even just start with the examples in C2 itself and modify them.

    This to get a good grasp and better insight of the event system and possibilities.

    The login systems are generally considered a bit advanced, and to start off from those can be challenging.

    example from tutorial section:

    facebook login

    The Ajax systems and related PHP approach require coding skills. (PHP/MySql)

    Example from tutorial section:

    PHP/MySql login