lennaert's Recent Forum Activity

  • To test if your php side code works, use the $_GET[] setup in your php script, and add echo mysql_error(); below the mysql query update, and then manually visit your page.

    ie open the url in a browser,

    http://yoursite/score_send.php?uid=1&score=10

    Also, you do a mysql_select_db("dbname", $con) referring to your database name as dbname ... which Im pretty sure is not the actual name of your database.

    If you applied the above, the second issue should be displayed in your browser as: error database "dbname" does not exist.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah that first bit is actually plain mysql code.

    In phpmyadmin there would be a box to paste that in and execute plain mysql code.

    .

    Paste it in the text box, and hit execute

  • If we add global warming to the discussion ... we likely have covered just about everything >_>

  • Again thank you both for being so helpfull.

    I am not going to risk it and go for a database then. I can learn it I am sure. *fist in the air*

    Shake that fist

    tip: for windows, download WAMP. (Windows Apache MySQL PHP)

    Its a total package giving you a webserver with PHP support and a database server based on MySQL. Which you run locally on your computer/laptop. You use this in conjunction with Ajax requests.

    ie

    Ajax request requests url to a PHP file, the PHP file process the request to update or add or extract from the database, and echoes back the info in the Ajax request (Ajax.LastData)

    The database has a webinterface called phpmyadmin ... very easily to understand if you are relatively new to the whole databases concept.

    Zillions of posts all over the internet with tips/suggestions/advice to nearly anything with it.

    And its free

  • Local storage is currently in beta, and thus no tutorials/manuals etc are available yet.

    Relying on its current workings, would not be wise as it is likely to change bits and pieces before a stable release.

    Scirra perhaps you should have waited with removing the webstorage as an option till local storage has a manual and some tutorials.

    I can see a lot more of these topics popping up.

  • I believe you can do something like:

    events

    Has line of sight to e_GPS

    for each e_GPS

    action

    Do something with the info from the e_GPS's in your line of sight.

  • You should follow the guidelines of the bug reporting section.

  • It looks like you used synched object for the NPCs,

    Therefore the peer needs to inform the host it destroyed the NPC, but not destroy it then and there.

    The host gets informed the NPC has died and destroys it, which gets synched back to the connected peers.

  • You need a method to refer to that one particular object.

    Either by its UID, or by some instance variable given to them, and then use the "pick" method to pick your object.

  • I think you could zoom into the piano roll by simply enlarging the image, having the sides outside the viewport.

    The isometric fake your referring, seems like very bad practice (btw, its 57.7%)

    I would go with simply rotating the sprites and re-sizing their height.

    Even better, I would prep the sprites in my image editor, and import it as they need to appear, reducing the extra rendering required.

    Also, would you scale only height or width of a layout, ALL objects would get affected.

  • Base it on your target platform.

    Desktop are able to handle higher/bigger graphics better then mobiles devices.

    Perhaps follow some of the tutorials, like the ghost shooter. Should give a pretty good indication of size.

  • It depends on your method informing the peers of when objects need to be created.

    For instance, using the sync object.

    If you sync an object, and it gets created on the host, then it will automatically get created on the peers too.

    If the host destroys this object, it will be destroyed on all connected peers too.

    Using an in game event, for instance, a player joins.

    When a peer connects, you could use that moment to create an object for that given peer (or something in the level, whatever your fancy), without the need of synching the object, seeing as all connected peers will have the same "peer connected" moment.

    To have the object destroyed you would have to inform all connected peers through the host telling them a certain object needs destroying: see next examples

    Using the synched input state: a peer shoots and informs everyone.

    A peer presses a button to fire, setting a certain input state and this is relayed to the host by means of either a direct message, or based on the user input.

    The host receives the input state from the peer, and based on this creates the bullet at the peer.

    The input state goes for all peers, and all peer should create the bullet at the given peer based on the input state.

    As for destroying, should the bullet hit some target, the target could set an input state of destroyed=1

    All connected peers seeing the input state of the player who was hit, but the host destroys the object, and it gets destroyed on the other peers too. (synched object effect)

    Using a message: relatively simple but effective

    when a peer presses a button, it can simply send a message to a host, which relays it to the rest of the peers.

    For example:

    The host would process the following message from a peer AND broadcast it

    tag "shoot"

    message "bullet-100-100-360-400-peerid"

    (bullet-x-y-angle-speed-peerid)

    on tag shoot

    tokenat(Multiplayer.Message, 0, "-") = "bullet"

    create bullet at int(tokenat(Multiplayer.Message, 1, "-")) , int(tokenat(Multiplayer.Message, 2, "-")) on layer X

    bullet set angle int(tokenat(Multiplayer.Message, 3, "-"))

    bullet set speed int(tokenat(Multiplayer.Message, 4, "-"))

    set bullet.peerid = tokenat(Multiplayer.Message, 5, "-")

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