By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Multiplayer JS card game – how do I create private spaces for individual hands?


New Coder
I have written desktop applications before using a Visual Basic type of language but am now trying to write a multiplayer interactive online card game for elderly and handicapped people. Using my normal language is proving tough and I am thinking of shifting much of the functionality to JavaScript, which I am now learning.
I think I can see how to code most of the actions I need, such as responding to button clicks and moving cards from A to B, by creating instances of a JavaScript Card Class with several methods and properties. But one thing is worrying me.
I will need to give each player a rectangular private space where his cards can be dealt and organised and where he can click on buttons to move cards out to and in from the common parts of the page, singly or in groups. This rectangular private space needs to be in the exact same place in the page for each player - ie across the bottom, for most of the width of the page.
Do I need to achieve this somehow with server-side code? Or can I handle it with JavaScript in the browsers of the players? And if so, how?
Basicly one of the players and his browser can be a server that does the job. Though, it will be the most easiest one to crack by the same player.

Safest way is to use server script from third party server which sends necessary info to players via http or such.

New Threads

Latest posts

Buy us a coffee!

Top Bottom