Jump to content

Creating a PvP battle arena with PHP and AJAX


barefootsanders

Recommended Posts

Hey everyone.  I have been developing an online MUD(Multi user dungeon) and I want to create a battle arena for users to fight each other in player vs player battles.  I know this is possible with PHP and AJAX, however I do not really know where to start.  I am very experienced with PHP any MySQL(what the site is currently programmed in) but AJAX is new to me.  What I would like to have is some sort of table system, like online poker, where people can "sit in" and battle each other in a turn based system.  When the winner kills the other user, the winning user would have a certain amount of money earned or experience points, etc.  I was wondering if anyone could help me figure out how to proceed.  Thanks!

Link to comment
Share on other sites

Hey there, if you are familiar with Javascript (even if you are not, you will not find it that difficult as you know PHP), then you should pick up AJAX pretty well. Take a look at the link in my signature to get started with it. When you work it out, you should literally be able to build it as you would any other application, but instead of using page refreshes, use AJAX. Hope that helps.

Link to comment
Share on other sites

Hey there, if you are familiar with Javascript (even if you are not, you will not find it that difficult as you know PHP), then you should pick up AJAX pretty well. Take a look at the link in my signature to get started with it. When you work it out, you should literally be able to build it as you would any other application, but instead of using page refreshes, use AJAX. Hope that helps.

 

Hey thanks for the help.  I have been taking in as much as I can over the past few weeks about AJAX.  My only concern is the problem I am having with the "table/arena" system.  I to have say a few arenas where only 2 people can join in, so the effect would be when two people join the arena, no one else would be able to do so.  Then the would fight and then leave and that arena would reopen to all so more people could fight.  I believe I can code the PvP part of it, its just creating the separate arena's that I am a bit confused on.  How can I implement this?  Would I need separate files for each or even separate tables on my database?

 

Thanks again for the help and I hope you can help me overcome my problems:)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.