Jump to content

Search the Community

Showing results for tags 'websocket'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 19 results

  1. Hi, I have a strategical question. Imagine a standard multiplayer shooter. What are the ways to broadcast and sync the shooting events? I ask because I'm confused by the weapons like automatic rifles - they shoot many times per second, or can fire just 1 bullet, it depends on how long you press the mouse button down. If in a match there are 20 players, all of them have rifles and shoot constantly - does this mean, that each player sends tens of websocket messages every second, which means the server side broadcasts hundreds of them every second? And if there are hundreds of parallel matches - that feels like a huge network traffic generation. Are there smarter ways to sync shooting?
  2. I have multiple servers in multiple locations. I need to get the frequency at which the websocket messages are received. When I connect to a low-latency server, the frequency is normal (50 - 60 ms). But on high latency servers, the frequency sometimes is 0. I asked a similar question not to long ago, but the answer there was that the socket is buffering messages. I find this unlikely since it only happens on high latency servers. Here is the code responsible for handling the websocket: startTime = Date.now(); ws.onmessage = function (evt) { prevData = recivedData; var receivedMsg = evt.data; recivedData = JSON.parse(receivedMsg); const endTime = Date.now(); ms = endTime - startTime; startTime = endTime; if(msAvg == null){ msAvg = ms; } msAvg = Math.round(((msAvg * 5) + ms) / 6); id = recivedData.id; } ms is the frequency in milliseconds. How can I get to the bottom of this issue?
  3. Im receiving websocket messages on my webpage, and i'm trying to calculate the frequency at which they are received. I do this like so: let startTime = new Date(); ws.onmessage = function (evt) { prevData = recivedData; var receivedMsg = evt.data; recivedData = JSON.parse(receivedMsg); const endTime = new Date(); const timeDif = endTime - startTime; startTime = endTime; console.log(timeDif) } But it seems timeDif sometimes is 0, and I find this unlikely. People in other questions of mine have sad that its due to the websocket buffering incoming messages. How do I prevent this?
  4. Hello, I am working on a catch and run game, and I have cat and rat meshes along with a height map that creates walls for me. I have the locations of rat and cat, also my objective is using websocket to play this game, so I should know information about locations. Simply, I want to send some information to the users so, they can decide which way to go. In Gazebo simulation program, LaserScan that has distance array to the obstacles with decided view of angle such as pi radian is used for deciding which way to go with no knowledge of the world. How can I achieve this goal? How can I get the distances to obstacles which provided with some decided angle of view. I want to do this in that way, because any indexing can be wrong for some situations like roundoff errors may occur, but any suggestions is welcomed. Please consider the fact that I will send this information to users, and wait them to understand quickly.
  5. Hi, About my project: It is intended to be an up to 2 player street-fighter/tekken type of game. For a game dev class I have to create and deploy a javascript game. I would like to add the feature that the user can use their phone as a (wireless ideally) gamepad/controller and their desktop would be the monitor to show the game (this would all have to happen in real time). I don't have any back end development skills, nor do I really have the time to pick them up, so something like Websocket would be impractical (I know there is Kaazing, but I followed their documentation step by step and this caused issues very early). My question is can I do something like this in real time with Ajax? I do not know how to use Ajax just yet, but I figure I can pick this up much faster than learning backend. If not is their something where I can just copy the code entirely include it within my project (ofcourse giving the proper credit where its due) and edit the front end to apply to my game & gamepad.
  6. Yatzy Solitaire - An HTML5 game by ludado.com Hello, Yatzy is a classic and incredibly addictive dice game. Its features: - You can play it on every device: desktop or laptop, mobile or tablet, even on your Smart TV. - You can play as guest or as a registered user. - Daily, monthly and all time global rankings. - Free to play. As a HTML5 games developer, you might believe that it is an easy to develop game, but it takes advantage of the Websocket API, so that the game logic is executed on server side. We would like you to give us feed back on the game. Thank you very much.
  7. Hello I started playing with phaser, some time ago. But now i wanted to try something new, something like Websocket + phaser. And i stuck :/ So, i want to make multiplayer "Game" but i stuck, i cannot happen that game will be still working in background. It should be working that i m logging at 1st tab and sprite is apearing, than i m logging at 2nd tab and on first another sprite is apearing but on different position. So at the end, at the 1st tab will be 3 sprites, or more, depends how many tabs you will open. Sry for my bad engladno :/ I hope you understood something. My code: Client: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var player; var cursors; function preload() { game.load.image('med1','client/assets/Unit/medievalUnit_01.png'); } function create() { game.stage.disableVisibilityChange = true; game.physics.startSystem(Phaser.Physics.ARCADE); cursors = game.input.keyboard.createCursorKeys(); game.input.mouse.capture = true; ws.send('NewPlayerJoined',nick); player = game.add.sprite(0,0,'med1'); player.nickname = nick; game.physics.enable(player, Phaser.Physics.ARCADE); ws.onmessage = function(data){ game.add.sprite(Math.floor((Math.random() * 100) + 1),Math.floor((Math.random() * 200) + 1),'med1'); console.log("NewPpl"); }; } function update() { if (cursors.left.isDown) { player.body.velocity.x = -100; }else if (cursors.right.isDown) { player.body.velocity.x = 100; }else{ player.body.velocity.x = 0; } if (cursors.up.isDown) { player.body.velocity.y = -100; }else if (cursors.down.isDown) { player.body.velocity.y = +100; }else{ player.body.velocity.y = 0; } } SERVER: const express = require('express'); const http = require('http'); const url = require('url'); const WebSocket = require('ws'); const app = express(); var players = {}; __dirname = 'E:/WebstormProjects/TestWorkingServer'; app.get('/',function(req, res) { res.sendFile(__dirname + '/client/index.html'); }); app.use('/client',express.static(__dirname + '/client')); const server = http.createServer(app); const wss = new WebSocket.Server({ server }); wss.on('connection', function connection(ws) { console.log("New Connection"); ws.on("message",function incoming(data) { ws.send("sumf"); }); }); server.listen(2000, function listening() { console.log('Listening on %d', server.address().port); });
  8. Hello! I'm faced with a problem and looking for a good solution. The problem is how to load test my websocket multiplayer game by simulating n real clients? My game works great when there are just a few clients while developing, but recently I had about a spike of new players join from a school at the same time, and my game did not scale well at all. So I have a scalability problem and I need to fix it, but the question is how do I know when it's fixed? I need a way to on-demand scale up to N number of simulated clients, to test my scalability. Problems with load testing websockets: I can't just open a bunch of browser windows on my computer and connect because my computer doesn't have enough resources to support that many clients. There are traditional web load testing tools like jmeter, but they are designed for opening http connections not websockets There are also websocket load testing tools like thor, but those just open a websocket connection and send dumb messages, and can't act as a real game client. What I need is a way so simulate a real game client that uses the same protocol as the game, and sends messages as a real player would, then be able to scale that up to 10, 20, 50, 100. Has anyone else run into this problem or have any recommendations? Thank you!
  9. Hello, I'd like to ask you guys about your experience and for some advice. I'm looking for some hosting which would allow me to run node.js app on the server side and allowed me to use websockets. I'm doing some screening know and I'd love to have some info from you guys to see what works for you the best? It would be nice if the hosting also supported php + mysql, I'm not necessarily looking for a free hosting, I'll be moving a company website there as well because I'm not too happy with my current provider considering what I pay for it and what i get back from them. Thank you for your advices.
  10. Good evening guys, I am looking for an Expert HTML5 Game Developer to be based in Hamburg. Please get in touch with Will Roeder +44 7809 471749 +44 203 745 7901 [email protected] Description HTML5, JavaScript, and WebGL are your passion. You like to get started with the latest online developments right away. You believe strongly in open standards. You take pleasure in applying your experience and expertise to ensuring that games made with HTML5 and Javascript stay on the right track. You're not afraid to try out future technologies. As an Expert HTML5 Game Developer - Game Technology (m/f), you will serve as the driving force behind the technical design of our new HTML5 area. Your passion and expertise lie in the development and implementation of new ideas. You give yourself ambitious goals, chase them, and inspire others to do so. As an Expert HTML5 Game Developer - Game Technology (m/f), you will form a part of our game core team. The game core team develops and maintains the libraries for our games and manages their integration into the studios. Place: Hamburg Country: Germany Contract Type: Full time Contract Duration: Open ended Education: Master's Degree Language Englisch (Fluent, Must have) Deutsch (Advanced, Nice to have) Candidates must have: – Experience with WebGL – Practical experience with Git – Experience with network communication / HTTP / Websockets / socket.io – Experience developing games with JavaScript and HTML5 – Passionate about gaming Candidates nice to have: – Experience with Unity3D is advantageous – Experience with ES6 and Typescript Career Level: – Senior Professional / Project Manager Sectors: Gaming Industry Functional Specialization: Software / System Architecture Software / Web Development Required Skills: Your job: Act as a catalyst in HTML5 for all issues related to technical optimization and development Assess the technical feasibility of a suitable framework and its expansion based on the specific adjustments required Select and evaluate tools that can perform WebGL exports Serve as the first point of contact for all questions regarding our HTML5 architecture Develop game prototypes in HTML5/JS/WebGL Develop HTML5 software libraries Develop HTML5 game development workflows and best practices Scrutinize and improve existing workflows Your profile: Several years of experience developing games with JavaScript and HTML5 Experience with WebGL Experience with one or several frameworks, such as Construct 2, Cocos2d-js, three.js, CreateJS, Phaser, etc. Practical experience with Git Experience with network communication / HTTP / Websockets / socket.io You are curious about new technologies Experience with other programming languages is advantageous Experience with Unity3D is advantageous Passionate about gaming Optional: experience with ES6 and Typescript Excellent written and spoken English We offer: Your professional growth is important to us. We provide agile structures, flat hierarchies, and ongoing training opportunities Results-oriented teamwork that values employee contribution A positive work-life balance with sports, catering, counseling, and active feedback Leading technology and analysis opportunities that give you the freedom to innovate Sustainable and profit-oriented growth, untouched by external investors
  11. Hi I am building a WebRTC multiplayer game. I want to use the HEADLESS mode but it doesn't seem to work? i set rendering to HEADLESS but it still renders. How do you actually use it? Also, is there a solution to not stop the update loop when tab change or window is minimized? If your curious to what I'm doing, here is my progress so far:
  12. Hi guys, I'm new to game dev, and I need your help I'm writing basic multiplayer deathmatch game (tanks), server side is almost finished and now I need to adjust the client. Server sends world updates every 20ms, including updated positions of tanks (x, y and angle). JS client is based on Phaser, but it doesn't use any predefined physics, all calculations are done on server. The problem : When client receives new position of tank, it has to update position of sprite. Currently this is done in 'update' function: tank.x = updatedPosition.x; tank.y = updatedPosition.x; tank.angle = updatedPosition.angle; But from user's perspective this movement looks buggy, because his tank 'jumps' from point to point without animation. Is there a way to make this continuous transition more smooth?
  13. I run into an annoying problem which I don't know how to solve. I don't know whether WebSocket Server delay sending the message or WebSocket delay receiving the message. var WebSocketServer = require('ws').Server; var wss= new WebSocketServer({ port: 88 }); var players = {}; var playerInc = 1; var gameLoopHandler = setInterval(function() { broadcast(new Date().getTime().toString()); }, 200); wss.on('connection', function connection(ws) { console.log("Player ID ", playerInc, "is connected"); // Add player to the player list var id = playerInc; players[id] = ws; playerInc++; // Listen when websocket disconnect ws.on("close", function() { delete players[id]; }) }); function broadcast(message) { for(var key in players) { try { var p = players[key]; p.send(message); } catch(ex) { } } } For every 200ms, I broadcast the timestamp of the server. Then, I compare the timestamp that I receive from my client side. var ws = new WebSocket("ws://127.0.0.1:88"); ws.onmessage = function(e) { var now = new Date().getTime(); var diff = now - e.data; console.log(e.data, now, diff); } I expected the different to be very low since it is operating in the same machine. But here is what I get Every 500ms or 1 second, there will be a big delay. Sometimes, it takes 1 second to receive the message.
  14. I'm using laravel's hoa websocket plugin for websocket event listeners, I attached a function on update event to send the players movement to other players. Using 2 browsers to simulate the multiplayer, the one that moves sends an events telling that a player is moving in a certain direction, on the other hand, the one that receives updates the player/enemies movement but it wasn't the exact movement compare to the senders' position. Please help me, below is my code: app.js var Player, randPos, sendUpdate, socket;socket = new WebSocket('ws://127.0.0.1:8899');randPos = function() { return Math.floor((Math.random() * 150) + 50);};sendUpdate = function(type, direction, objectPos) { return socket.send(JSON.stringify({ type: type, direction: direction, det: objectPos }));};Player = function(startX, startY, playerName) { var angle, getAngle, getDetails, getPlayerName, getX, getY, playerId, setPos, x, y; x = startX; y = startY; angle = 0; playerName = playerName; playerId = Number(new Date()); setPos = function(newX, newY, newAngle) { x = newX; y = newY; return angle = newAngle; }; getX = function() { return x; }; getY = function() { return y; }; getAngle = function() { return angle; }; getPlayerName = function() { return playerName; }; getDetails = function() { return { x: getX(), y: getY(), angle: getAngle(), playerName: getPlayerName(), playerId: playerId }; }; return { getX: getX, getY: getY, getAngle: getAngle, setPos: setPos, getPlayerName: getPlayerName, getDetails: getDetails, playerId: playerId };};game.js var bulletTime, bullets, create, downButton, enemies, enemy, fireBullets, fireButton, floor, game, hitWall, leftButton, localPlayer, player, preload, rightButton, upButton, update, wall;upButton = null;leftButton = null;downButton = null;rightButton = null;fireButton = null;player = null;localPlayer = null;bullets = null;bulletTime = 0;enemies = null;enemy = {};wall = null;floor = null;fireBullets = function() { var bullet; if (game.time.now > bulletTime && bullets.countDead() > 0) { bullet = bullets.getFirstDead(); switch (player.angle) { case 0: bullet.reset(player.x, player.y - 20); bullet.body.velocity.y = -400; break; case -180: bullet.reset(player.x, player.y + 20); bullet.body.velocity.y = 400; break; case -90: bullet.reset(player.x - 20, player.y); bullet.body.velocity.x = -400; break; case 90: bullet.reset(player.x + 20, player.y); bullet.body.velocity.x = 400; } bullet.angle = player.angle; bulletTime = game.time.now + 400; }};hitWall = function(bullet, wall) { bullet.kill();};preload = function() { game.load.tilemap('level0', 'game_assets/level0.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tiles', 'game_assets/assets.png'); game.load.spritesheet('player', 'game_assets/player.png'); game.load.spritesheet('enemy', 'game_assets/enemy.png'); game.load.image('bullet', 'game_assets/bullet.png');};create = function() { var map, startX, startY; game.physics.startSystem(Phaser.Physics.ARCADE); game.stage.backgroundColor = '#FFFFFF'; map = game.add.tilemap('level0'); map.addTilesetImage('assets', 'tiles'); floor = map.createLayer('floor'); wall = map.createLayer('walls'); game.physics.arcade.enable(wall); map.setCollisionBetween(1, 100, true, 'walls'); wall.resizeWorld(); game.physics.arcade.enable(map); game.physics.setBoundsToWorld(); startX = randPos(); startY = randPos(); player = game.add.sprite(startX, startY, 'player'); player.anchor.setTo(0.5, 0.5); game.physics.arcade.enable(player); localPlayer = new Player(startX, startY, 'stnight'); upButton = game.input.keyboard.addKey(Phaser.Keyboard.UP); leftButton = game.input.keyboard.addKey(Phaser.Keyboard.LEFT); downButton = game.input.keyboard.addKey(Phaser.Keyboard.DOWN); rightButton = game.input.keyboard.addKey(Phaser.Keyboard.RIGHT); fireButton = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); game.input.keyboard.addKeyCapture([Phaser.Keyboard.UP, Phaser.Keyboard.LEFT, Phaser.Keyboard.DOWN, Phaser.Keyboard.RIGHT]); enemies = game.add.group(); enemies.enableBody = true; enemies.physicsBodyType = Phaser.Physics.ARCADE; bullets = game.add.group(); bullets.enableBody = true; bullets.physicsBodyType = Phaser.Physics.ARCADE; bullets.createMultiple(1000, 'bullet'); bullets.setAll('anchor.x', 0.5); bullets.setAll('anchor.y', 0.5); bullets.setAll('checkWorldBounds', true); bullets.setAll('outOfBoundsKill', true); sendUpdate('start', '', localPlayer.getDetails()); game.camera.follow(player);};update = function() { player.body.velocity.y = 0; player.body.velocity.x = 0; game.physics.arcade.collide(player, wall); game.physics.arcade.collide(player, enemies); game.physics.arcade.collide(enemies, wall); game.physics.arcade.collide(bullets, wall, hitWall, null, this); enemies.setAll('body.velocity.y', 0); enemies.setAll('body.velocity.x', 0); if (upButton.isDown) { player.body.velocity.y = -86; player.angle = 0; localPlayer.setPos(player.x, player.y, player.angle); sendUpdate('pos', 'up', localPlayer.getDetails()); } else if (downButton.isDown) { player.body.velocity.y = 86; player.angle = -180; localPlayer.setPos(player.x, player.y, player.angle); sendUpdate('pos', 'down', localPlayer.getDetails()); } else if (leftButton.isDown) { player.body.velocity.x = -86; player.angle = -90; localPlayer.setPos(player.x, player.y, player.angle); sendUpdate('pos', 'left', localPlayer.getDetails()); } else if (rightButton.isDown) { player.body.velocity.x = 86; player.angle = 90; localPlayer.setPos(player.x, player.y, player.angle); sendUpdate('pos', 'right', localPlayer.getDetails()); } if (fireButton.isDown) { fireBullets(); } socket.onmessage = function(data) { data = JSON.parse(data.data); switch (data.type) { case 'start': enemy[data.det.playerId] = enemies.create(data.det.x, data.det.y, 'enemy'); enemy[data.det.playerId].anchor.setTo(0.5, 0.5); enemy[data.det.playerId].angle = data.det.angle; break; case 'newPlayer': sendUpdate('start', '', localPlayer.getDetails()); break; case 'pos': enemy[data.det.playerId].angle = data.det.angle; switch (data.direction) { case 'up': enemy[data.det.playerId].body.velocity.y = -86; break; case 'down': enemy[data.det.playerId].body.velocity.y = 86; break; case 'left': enemy[data.det.playerId].body.velocity.x = -86; break; case 'right': enemy[data.det.playerId].body.velocity.x = 86; } } console.log(data); };};game = new Phaser.Game(756, 700, Phaser.AUTO, 'game', { preload: preload, create: create, update: update});the json level { "height":45, "layers":[ { "data":[1, 1, 1, 1, 1, 1, 1, 1, 1,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], "height":45, "name":"walls", "opacity":1, "type":"tilelayer", "visible":true, "width":45, "x":0, "y":0 }], "orientation":"orthogonal", "properties": { }, "tileheight":32, "tilesets":[ { "firstgid":1, "image":"assets.png", "imageheight":64, "imagewidth":32, "margin":0, "name":"assets", "properties": { }, "spacing":0, "tileheight":32, "tilewidth":32 }], "tilewidth":32, "version":1, "width":45}and the php file that handles the websocket events <?phprequire __DIR__.'/../bootstrap/autoload.php';$server = new Hoa\Websocket\Server( new Hoa\Socket\Server('tcp://127.0.0.1:8899'));// when someone is connected$server->on('open', function (Hoa\Core\Event\Bucket $bucket) { echo 'new player is joined the world', "\n"; $data = array('type' => 'newPlayer'); $bucket->getSource()->broadcast(json_encode($data)); return;});// general stuff$server->on('message', function (Hoa\Core\Event\Bucket $bucket) { $data = $bucket->getData(); $data = json_decode($data['message']); $bucket->getSource()->broadcast(json_encode($data)); return;});// on closing$server->on('close', function (Hoa\Core\Event\Bucket $bucket) { echo 'a player leaved the world', "\n"; return;});$server->run();
  15. Hi Everyone, We have just launched a new service and JS library named PlugPIN. This free service makes it really easy for developers to turn smartphones into remote controls for games, apps or devices. You can check it out at: www.plugpin.com The idea about plugpin is that you can connect any smartphone to any device anywhere. Nog passwords, login's etc. Just fire up your browser, enter the pin and go. Currently there are just two examples displaying the functionality on the homepage. But there are some more examples in the documentation. Please check them out. And if you like it then don't hesitate to test it out. We would really like to know what you think about it and if you would like to use it. If you have any questions or remarks concerning PlugPIN JS. Then please don't hesitate to contact us. We are glad to help you out. Joost @ PlugPIN
  16. Hi everyone, I wanted to point everyone to two examples we just put online. They are part of the examples of a new free service named PlugPIN JS that we just launched. This service turns smartphones into remote controls for games, websites and apps. Here are the two links to the examples, both built with Threejs: 1. Simple Shooter http://surf.plugpin.com/apps/demo-walkthrough/ 2. Remote Controls with Gyro http://surf.plugpin.com/apps/demo-orientation/ The second example is fully documented under "onOrientationChange()" in the Docs. We hope you like it and that it sparks your creativity to make your games interactive by using your smartphone. If you have any questions concerning the examples or the JS Library, then please don't hesitate to contact us. We would love to hear what you think about it and how you would like to use it. Joost @ PlugPIN
  17. I want to create a board game that has a same system like Super Sync Sport from Google. I just know some technology that use for this game but I don't know how to start to make it. Thank you for your suggestions.
  18. Pyramids Multidevice HTML5 game by www.ludado.com @ludadogames Hello, Pyramids by ludado is a classic solitaire card game. Its features: - Easy to play but incredibly addictive. - You can play it on every device: Desktop or laptop, mobile or tablet, even on your Smart TV. - Play as guest or as a registered user. - Global rankings. - Free. As a HTML5 games developer, you might believe that it is an easy to develop game, but it takes advantage of the Websocket API, so that the game logic is executed on server side. We would like you to give us feed back on the game. Thank you very much.
  19. Hi there, A while ago I created a realtime(ish) multiplayer game for a university assignment using Phaser, Node and Web-sockets. I haven't been able to put it anywhere before it was marked, but now that it has been people can take a look This was the first proper game I have made and for some crazy reason I decided to attempt a multiplayer game. I didn't really have a clue how to implement multiplayer so there is probably (definitely) a lot of insane stuff going on in my networking code but it seems to work not too badly. Eventually I will upgrade the networking code to follow more along the lines of this valve article https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking I have previously detailed how my networking works in this post: http://www.html5gamedevs.com/topic/5798-updating-players-positions-using-nodejs-and-socketio-multiplayer/#entry34974 Anyway, the game is essentially a racing game with flappy bird mechanics. Get the the hive first while avoiding the obstacles. The backend is powered by node.js which handles starting the games etc. I also randomly generate a level each game so that the obstacles are in different positions/ move at different speeds/ etc etc each round. There are a few elements of the game that are in there just to fulfil the spec set by my uni, like the little video at the end of the course, and I may remove these if I get time. The game is a little buggy in places I know, but worked well enough to get me very good marks hehe Currently it is running on a single digital ocean server, and to be honest I have no clue how many clients it can handle before things start to go boom, so it might be interesting to find out! I have tested it with around 5 with no problems. How laggy the other players appear seems to depend a lot on your distances from the server which is located in Amsterdam. Here in Brighton UK the lag doesn't seem too bad. I created all the graphics myself, but they were greatly inspired by Chasing Aura. I am pleased with how the game looks, and think that it could benefit from a few more obstacle types along the course. One pretty big issue with this game is that the server is not authoritative, meaning that it relies on the clients to inform it about their positions accurately and truthfully. This in theory means anyone with a little bit of js know how can cheat by modifying the code client side. I'm not really sure of a good way to get around this with this sort of game so if anyone has ideas let me know! Anyway, you can take a look at the game here: http://188.226.161.72 I would love to know what you think, if you have any suggestions on how it could be improved etc. Likewise if you have any questions about how the game works please ask and I will do my best to explain! Bye for now Zef
×
×
  • Create New...