codenature Posted May 5, 2012 Share Posted May 5, 2012 Hi, I want to make a visual php mysql based multiplayer role playing game, of the Dungeons and Dragons type, I don't know if it would be tile based or what the most advanced interface I could do would be in php. But ideally it would not have to reload the page every time, could I do that with ajax? Please if anyone can give me a link to a really good multiplayer rpg that has a very good interface where you can see the "monsters and players" moving upon user moves. Thank you. Quote Link to comment Share on other sites More sharing options...
ignace Posted May 6, 2012 Share Posted May 6, 2012 You should write it in JavaScript, and preferably use a <canvas/> While on the matter, you should also read "JavaScript Patterns" this contains all the JS optimizations you will need to consider while building your game. Look at Command & Conquer Tiberium Alliances for a browser-based game with moving units. You will also need a book/resource with explanations of how you can create a fair multiplayer when dealing with clients. The server is the referee, and clients should only be able to communicate their actions, not their result. Examples of communicating their results: attack.php?name=some-client&hp=0 reward-player.php?id=1&coins=9999999 Examples of communicating their actions: attack.php?name=some-clients&spell=some-spell Returns: {"results":{"player":"some-clients",'hp":80}} to update the user's screen. This puts the server in control of what damage is done instead of the clients. The server should also validate each request, as you should with any normal application you build. You can further expand on this by creating admin specific requests: admin-kill.php?player-id=1&reason=annoying Obviously in admin-kill.php you should check whether the client is in fact an admin. Also any security measures you take with a normal application should also be present here, like for example preventing the obvious CSRF attacks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.