Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: PVP Style.

  1. #1
    New Coder
    Join Date
    Jan 2011
    Location
    Space
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question PVP Style.

    I was working on a quick simple attack, attack, attack type thing for a friend and I to use but I don't know how to make it know what he is pressing and to update my window and vice versa, similar to a PVP RPG.
    Can anyone help me understand how it's done a bit more please?

  • #2
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,387
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts
    And you have a lot of PHP scripting already done for the RPG?

    It would involve javascripting (or AJAX .. combination of PHP and javascripting).

  • #3
    New Coder
    Join Date
    Jan 2012
    Location
    Latvia
    Posts
    65
    Thanks
    8
    Thanked 2 Times in 2 Posts
    I have always wondered how its done, well I know its made by AJAX or any other languages, who can provide "live" updates of the content, but I have never knew any more in this..

    Will love to follow the expert's responses here..

  • #4
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,387
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts
    AJAX - Asynchronous JavaScript and XML
    Is not a programming language, but a group of interrelated web development techniques.
    As described in Wikipedia: http://en.wikipedia.org/wiki/Ajax_%28programming%29

    This is JQuery (javascripting library) ... play the demo:
    http://www.amitpatil.me/image-match-...t-memory-game/

    JQuery can also POST to PHP scripts ... so clicking a button can
    update a column in a MySQL database.

    This one uses "prototype" framework:
    http://www.nickstakenburg.com/projects/starbox/

    Again, it's javascripting that connects to PHP/MySQL.

    Those are examples of clicking on graphic images (or buttons) to affect a database.
    Your RPG database can be updated as a player clicks on a button.

    EDIT:
    The example of the "star rating system" would be great for your "attack, attack attack".
    You could let the user control the amount of attack ... just like the star rating lets the
    user pick how many stars to give.


    .
    Last edited by mlseim; 02-17-2012 at 02:09 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •