which languages/approaches for a MVC online 2-player card game

Started by
11 comments, last by SyncViews 5 years, 8 months ago

Using my knowledge of python, c, c++, java, javascript, and/or web-app programming, and my lack of development experience, I would like some suggestions on approaches and language(s) to use for a simple peer-peer card game. I'll accept a game engine suggestion if I can accomplish it through an extremely cheap(vague I know) web-server. In a nutshell, the goal is to have some polling of the translation of images, and a backend performing the logic that refreshes the screen for 2 users.

Sorry if this is too ambiguous. If so, please offer some suggestions for refining this to ask a more logical question.

Thanks, CE

  

Advertisement

HTML5, JavaScript, CSS3, and Websockets would probably be the easiest. A typical websocket web server (on Node.js or golang or Erlang or whatever) will be quite lightweight, unless you put a ton of processing on it.

So, without knowing more, I'd say building this like a typical webapp, with perhaps a node.js server, would be the first think I'd try.

 

 

enum Bool { True, False, FileNotFound };

Thank you.

To clarify, I'd like a javascript-base windows executable file that generates a form for authentication, which then will proceed to generating a new window where people will select a deck--> game begins when both players have selected a deck(for skeleton, a simple ready check just so I can get things rolling). I have background knowledge in server side web application development;however, I want the application logic/view to be on the form itself using java, rather than a webpage using javascript. I only want authentication and whatever else may be necessary on the server side. I need to get started before I can formulate my questions clearer.

... windows executable, javascript, and an authent using java is not a combination of things I hear often. 1 or 2 out of 3 would be more reasonable.

I've made a 2-player online card game though myself... nodeJS + websockets + javascript frontend is how I did it. zeit-pkg will package it into a windows app if desired but it's really not at all necessary. Also some options for native offline play that's getting pushed hard in browsers this year.

If you want to write the game as a Java form, then use simple Java sockets to connect to a simple Java server using TCP sockets.

 

enum Bool { True, False, FileNotFound };

Got it, thank you all for your answers. I will use the java scokets approach and see what I can manifest. I found some information on a Java Launcher as well that extracts your classes/etc;however, I'll look into the Java sockets and try that approach instead.

On 7/15/2018 at 12:50 AM, hplus0603 said:

If you want to write the game as a Java form, then use simple Java sockets to connect to a simple Java server using TCP sockets.

 

Am I required to purchase a java web hosting service in order to allow remote connections using a given address space? Right now I can only create sockets that would connect to a local host. Thanks!

You need to understand three things:

1. How routing works on the internet. (What is an IP address, what is a subnet, what is a host, what are ports, what are load balancers, what are proxies)

2. How DNS works on the internet.

3. How your particular hosting provider applies the above to route traffic to whatever code you're running.

You might start by clarifying what you mean when you say "address space."

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement