lennaert's Recent Forum Activity

  • 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

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies