Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Advice  (Read 1588 times)
0 Members and 1 Guest are viewing this topic.
Offline Robbooo

Junior Newbie





« Posted 2006-03-05 15:38:43 »

Hi, looking for some advice. As part of a project im working on i have decided to incorporate some kind of multiplayer functionality into a game i have created. As it stands i have a checkers game, it took a while but eventually i got over a lot of the problems i was having and at the moment it allows 2 people to play one another provided they are on the same machine.

What im looking for advice on is the 'best' way to go about making this playable by people at 2 different locations. The game itself is in applet, purely out of habit so my first inclination was to have it on a webpage where the 2 players could connect to it.

I assume another method of doing it would be to have it as an application and have it running either on one of the players machines by which the opponent connects via IP or to have a kind of central server where both players can connect to it.

The solution does not have to be elegant, just something that wouldnt be too difficult to pull off. I guess there is no 'best method' to this, just looking for some advice from people who have hopefully done something similar to this before.

Since this isnt the main focus of my project i am not much concerned with performance issues or such, something simple would be great as this is my first experience of doing anything such as this.
Offline Mr_Light

Senior Duke


Medals: 1


shiny.


« Reply #1 - Posted 2006-03-05 16:05:11 »

unsigned applets can only connect to the adress where they are located.

with that in mind look at your options again.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline Robbooo

Junior Newbie





« Reply #2 - Posted 2006-03-05 16:31:43 »

I guess that rules out the webpage option then.  At the moment my program is an applet, i believe it could be converted to a stand alone application without too much hassle

This leaves me with the option of either connecting to a central server or having one of the players host the game.  I would assume that having a player host the game would be the easier option as it means i dont have to put a server up and running.  So i guess my question is now, what should be my first step?  Any advice as to how to begin or any books/webpages you know of that could provide me with some help?

Any help you can give would be most appreciated
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mr_Light

Senior Duke


Medals: 1


shiny.


« Reply #3 - Posted 2006-03-05 17:19:33 »

it does rule out an applet however you have to have controll over your webserver.

anyways theres a third option in reference to your reply. players host. and a central server to kickstart a player host game. a kind of matcher.  this would have the advantage that you can write the matcher later on.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline Jeff

JGO Coder




Got any cats?


« Reply #4 - Posted 2006-03-06 03:26:37 »

I guess that rules out the webpage option then.  At the moment my program is an applet, i believe it could be converted to a stand alone application without too much hassle

This leaves me with the option of either connecting to a central server or having one of the players host the game.  I would assume that having a player host the game would be the easier option as it means i dont have to put a server up and running.  So i guess my question is now, what should be my first step?  Any advice as to how to begin or any books/webpages you know of that could provide me with some help?

Any help you can give would be most appreciated

How much do you know abotu networking?  if nothign then some study and experiments with java.net.Socket and its related classes is in order.

To communciatre between two compuiters on the Inertent they open sockets based on their IP addresses.  At least one needs to knwo the IP adress of the other to establish a connection.  Thats where a "matchmaker" coems in-- a well known server they can connect to in order to find each other.

Firewalls complicate this by hiding IP addresses and making connecting mreo difficult. 

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (34 views)
2014-10-17 03:59:02

Norakomi (25 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (74 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!