Giter VIP home page Giter VIP logo

Comments (18)

aimran96 avatar aimran96 commented on August 22, 2024 1

Its the same with python, you can do HTTP servers really easily without having apache!

from monopoly.

intrepidcoder avatar intrepidcoder commented on August 22, 2024

I agree, networking would be a great feature, but it wouldn't be easy to implement.

Looking at socket.io, you could definitely use it to send game state data between players, but you'd need to write server side JavaScript to keep track of the game, remember whose turn it was, and make sure the players can't do anything against the rules.

Anyway, I don't have any plans to write networking, but if you design how the server part works and communicates to the clients, we can talk about modifying the existing JavaScript code to make that work.

Also, a great site to learn JavaScript is https://www.codecademy.com/.

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

Hi guys, have you started working on this feature?

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

No... Do you know how?

from monopoly.

aimran96 avatar aimran96 commented on August 22, 2024

You could potentially use PHP or Python but you'd definitely need some server-side component. You can do it without using sockets through the use of simple AJAX requests

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

I am not familiar with AJAX like at all, however I would be able to do the PHP end. Any idea on how the AJAX part would work?

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

It's also doable with node and you may be able to reuse some code on both sides.
I think we should use sockets since it enables us pushing statuses instead of (long) polling them, but that's a networking thing we can do after implementing this using Ajax.

from monopoly.

aimran96 avatar aimran96 commented on August 22, 2024

Well, you'd need to send AJAX requests to the server in order to synchronize the state between multiple clients. So each time any user does anything significant in the game, you'd send one of these requests to the server. Now @arielsegura, using sockets is not a bad idea. HTML5 Server Sent Events can also be used and both of these options are better than polling. However, I do have somewhat of a personal bias against using Javascript for server-side code

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

We can also use spring-boot if you don't like node.
Sockets are supported there too.
Anyway, to start working on this we need to define what changes we need to do. What goes to the back and what stays at the front.

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

Any of them work for me. I could look into HTML5 Server Sent Events if we wanted to go that route. Entirely up to us. What do you guys think? @arielsegura @admin96

from monopoly.

aimran96 avatar aimran96 commented on August 22, 2024

Personally, I would prefer HTML5 SSE + PHP. It would be very simple to get started... all you need is WAMP/LAMP and you're ready to get started. PHP is kind of slow, so, I am open to using Python instead of PHP because it has better performance and the syntax is much better. Java might not be the best choice because writing ridiculously verbose OOP code for this web app would decrease productivity and increase the time needed to implement different functionality. Oh also, I'm presuming there's a need for a database.

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

I haven't used Python, but I'm sure I could figure it out. Did you want to get started? How much slower is PHP than Python. Regardless, let's get going! I am down to help! @admin96

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

It would be very simple to get started... all you need is WAMP/LAMP and you're ready to get started

You still need to download and configure the server. Node.js or spring-boot allows apps are by far easier to deploy. If someone only wants to download and run the app, they can do it w/o any server nor configurations.

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

What is the "develop" branch? gh-pages? So I fork the project

from monopoly.

aimran96 avatar aimran96 commented on August 22, 2024

gh-pages is the main branch. The game which can be played online is available through this branch!

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

Has somebody forked the project? Do we want to share emails or skype's to communicate outside of this? @admin96 @arielsegura

from monopoly.

arielsegura avatar arielsegura commented on August 22, 2024

join https://crazymonopoly.slack.com

from monopoly.

jenke15 avatar jenke15 commented on August 22, 2024

Joined! @arielsegura

from monopoly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.