multiplayer

Creating a 2 player game in Python

▼魔方 西西 提交于 2019-12-07 21:39:58
问题 My friend challenged me to make a version of the popular game "Battleships" that we could play against each other. If you don't know the game, it's not really important because the hard part for me would be not to make the game but to figure out how we can play it against each other both from our computers. I have previously made the same game, only for one player (I'm using Python) so what I want to find out now is: What is the easiest way? (I was thinking about Hamachi). Where and with what

TypeError: io.connect is not a function

旧城冷巷雨未停 提交于 2019-12-07 15:24:38
问题 I am following a tutorial for a simple multiplayer game using node js and socket.io (http://rawkes.com/articles/creating-a-real-time-multiplayer-game-with-websockets-and-node.html) . I am having a problem when i am trying to connect to the socket server.I get an error saying TypeError: io.connect is not a function PS : i am a total beginner in node js and socket.io so please help me out. var util = require("util"); io = require("socket.io"), Player = require("./Player").Player; var socket,

Java Socket/Serversocket WAN Connection

大城市里の小女人 提交于 2019-12-07 07:30:36
问题 Im trying to make a server out of my computer so that clients from their computers can connect and communicate with my computer. I made the server on port 31350 and the client is trying to connect through my router's ip address. But it only works through lan when I have "localhost" or the name of my computer in the parameters for the socket creation. and not when I use my ip address, running the client and server on different networks. Here is the code. Here is the server that my computer is

GameCenter Invitation Handler

风流意气都作罢 提交于 2019-12-07 02:37:18
问题 trying to implement a multiplayer. Using the sample from Game Center - Sending and receiving data. Everything seems okay, but in apple documentation there is also said about invitation handler. [GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite *acceptedInvite, NSArray *playersToInvite) { // Insert application-specific code here to clean up any games in progress. if (acceptedInvite) { GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithInvite:acceptedInvite

Route traffic to multiple node servers based on a condition

寵の児 提交于 2019-12-06 13:24:04
I'm coding an online multiplayer game using nodejs and HTML5 and I'm at the point where I would like to have multiple maps for people to play on, but I'm having a scaling issue. The server I'm running this on isn't able to support the game loops for more than a few maps on its own, and even though it has 4 cores I can only utilize one with a single node process. I'd like to be able to scale this to not even necessarily be limited to a single server. I'd like to be able to start up a node process for each map in the game, then have a master process that looks up what map a player is in and

Meteor js and multiplayer games

雨燕双飞 提交于 2019-12-06 10:57:52
I started to learn Meteor and I realized that it could probably be good solution for simple multiplayer game because of its reactivity. Is real time exchange between client-minimongo-database-client fast enough for exchanging player coordinates? Or it is bad solution and I should do it without database in the middle, just with direct web sockets connection? Multiplayer concept is new to me, so maybe I'm wrong all the way. Meteor is by far the best of the best technology available among the other realtime technologies. Meteor is so efficiently fast both in terms of memory management and request

Ocaml Lwt - some implementations of multiplayer game

南笙酒味 提交于 2019-12-06 10:40:18
I'm going on to writing a simple implementation of tic-tac-toe server (via telnet). The task - players connect to server and after they send START the server looks for a partner who typed START too, and game begins. A piece of code: let handle_income () = let con = Lwt_unix.accept sock in con >>= fun (cli, addr) -> let player = Lwt.return {state = Sleeping; descriptor = Lwt.return cli} in send_to_client player "Welcome to the server. To start game type in START and press Enter"; player;; let rec make_ready player = player >>= fun {state; descriptor} -> send_to_client player "Waiting for start

Creating a 2 player game in Python

喜欢而已 提交于 2019-12-06 05:59:06
My friend challenged me to make a version of the popular game "Battleships" that we could play against each other. If you don't know the game, it's not really important because the hard part for me would be not to make the game but to figure out how we can play it against each other both from our computers. I have previously made the same game, only for one player (I'm using Python) so what I want to find out now is: What is the easiest way? (I was thinking about Hamachi). Where and with what should I start with? Thanks in advance :) Erik Kaplun I would suggest starting out by making a non

TypeError: io.connect is not a function

主宰稳场 提交于 2019-12-05 21:03:28
I am following a tutorial for a simple multiplayer game using node js and socket.io ( http://rawkes.com/articles/creating-a-real-time-multiplayer-game-with-websockets-and-node.html ) . I am having a problem when i am trying to connect to the socket server.I get an error saying TypeError: io.connect is not a function PS : i am a total beginner in node js and socket.io so please help me out. var util = require("util"); io = require("socket.io"), Player = require("./Player").Player; var socket, players; function init(){ players = []; socket = io.listen(8000); socket.configure(function() { socket

Java Socket/Serversocket WAN Connection

对着背影说爱祢 提交于 2019-12-05 17:04:46
Im trying to make a server out of my computer so that clients from their computers can connect and communicate with my computer. I made the server on port 31350 and the client is trying to connect through my router's ip address. But it only works through lan when I have "localhost" or the name of my computer in the parameters for the socket creation. and not when I use my ip address, running the client and server on different networks. Here is the code. Here is the server that my computer is running. public static void main (String[] args) throws IOException { ServerSocket server = new