Jump to content

HTML5 and Web Sockets


deletedacc
 Share

Recommended Posts

Hi,

 

I was just wondering over a few things and hoped someone might have some insight on how it should be implemented.

 

So I want to make some sort of real time game.

 

How should maps be handled client / server? Obviously I don't want clients to be able to modify the local version of their map on the game and be able to hack into things they should be able too.

 

Also, How would I go to implement entities in the same fashion. I wouldn't want players to be able to hack entities so that they can modify health and such, I know this should be handled on the server, but there should still be a local copy of stuff to render.

 

I'd probably be using either ImpactJS or phaser. Would rather use something like Impact since I have a license for it and what not. And Node.js / socket.io or something for networking and server side

 

Cheers,

Link to comment
Share on other sites

I've been meaning to make a game using the same kind of design. My current idea is to have the game logic running on the server and only send updates to/from the client so that their screen is updated. The idea would be the server calculates any battles and sends the result to the clients but the clients then spend 30 seconds playing out the results with animation. Or moving a player would mean sending the start point and end point to the server and the path is returned to the clients to animate over a few seconds/minutes.

 

The client would basically be an extension of the input/output system and not the processor running the actual game. This way none of the character or map values can be changed from the client.

Link to comment
Share on other sites

I use node.js and socket.io and found them easy to work with. (as long as you have the server access to set it up).

 

Tutorials and working examples would be your best bet on this stuff - find a bunch of them and dig in.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...