Jump to content

Search the Community

Showing results for tags 'socket'.

  • 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 11 results

  1. I posted a response in a thread that had some applicable information to it, but it never got a response and I have questions, so this is sort of a re-post. I've created an HTML5 clone of a game I saw in a casino recently wherein players "grab" cards as they are dealt in order to reach a target score determined randomly before the game starts. I specifically created it to be played using physical buttons around a TV embedded into a table. I used the EaselJS APIs and I'm pretty happy with the results. The next level, so to speak, would be in allowing players to use their mobile devices to grab cards from a main play area (i.e. the TV). If you've played any of the Jackbox Party games, you'll know what I mean. I've gathered that in order to do this I'll need to leverage node.js and sockets.io to get players' mobile devices talking to the main game screen, but that's where my understanding ends. I don't really intend on releasing this to the public or anything, more for just me and my gambling friends, so I wan't to spend as little as possible, ideally nothing, on server usage. I've already setup a webserver in my home, strictly to serve internal IPs, using XAMMP on Windows. I created a basic node js server and I'm able to send messages back and forth, basically culling information from tutorials. What I'm looking for is how to best approach having players, using their mobile devices, interact with a separately rendered "main" screen. So, for example, the main screen displayed on the TV flips over a 10 of hearts. If a user wants that card, they tap a button on their device to add it to their hand. Unless I've missed my mark, the client (the player's mobile phone) sends a request to the node server, which then pings the main screen to give it info regarding which card is showing. While the main screen then locally stores that information into it's arrays (tracking players and their points), it sends a ping back to the server, which in turn sends a ping back to the client to animated the card image to their device and updates a score display. Do I have all that right or is there some far easier way to do this? I can't have the node server file the same as the main screen because it doesn't know how to process any of the other stuff going on, but I could be wrong. How do I tell the node server to get the card value from the main table and send it back to the client in one elegant function? There are other things I need to do, but this is the central piece to the entire project.
  2. Would like to showcase our new game Royalz.io. Royalz was made with pixi.js, node.js and socket.io. Try to be the sole survival in this action packed 2d battle royale game. Collect armor, food and ammo as you try to take down the other players. Play here: https://lagged.com/io/royalz
  3. for (var i in Game.playerMap) { for (var e in Game.weaponMap) { game.physics.arcade.collide(Game.playerMap[i], Game.weaponMap[e].bullets,Game.colision(i), null, this); } }; Game.colision = function(id){ //console.log(id); //Client.socket.emit('colision',"colision"); }; I want to make collisions and send them via socket to the server ... but for now I have a problem because it constantly sends me collisions without detecting between the shot and the enemy .. any ideas?
  4. Hello, I am creating realtime game using node + socket.io. At the moment I'm trying to figure out how could I animate other players movements. This is how I put other players on map: socket.on('showPlayers', (data) => { for (var key in data.players) { if(key != data.id) players[key] = game.add.sprite(data.players[key].position.x, data.players[key].position.y, 'player', 1); } }); And Updating their positions: socket.on('updatePlayers', (data) => { players[data.id].position = data.position; }); To animate my own player I am simply using: // Player player = game.add.sprite(48, 48, 'player', 1); player.animations.add('left', [3,5], 5, true); player.animations.add('right', [6,8], 5, true); player.animations.add('up', [9,11], 5, true); player.animations.add('down', [0,2], 5, true); Best Regards!
  5. A small simple multiplayer game https://github.com/code0wl/Multiplayer-Phaser-game There is also book that I have just published showing the steps to take to create such a game Preview: http://www.codeowl.tech:3000/
  6. Hello everybody! I can create single player games with phaser and now I want to start making multiplayer games using socket.io + node.js So unfortunately I haven't found any tutorials about how to create games on phaser with phaser. I have never had projects with serverpart(so I have no experience in it) So that's all I could understand and write myself :[ SERVER PART var express = require('express'); var app = express(); var serv = require('http').Server(app); var counter = 0; app.get('/', function(req, res) { res.sendFile(__dirname + '/client/index.html'); }); app.use('/client', express.static('/client')); serv.listen(2000); console.log('server started'); var io = require('socket.io')(serv); io.sockets.on('connection', function(socket) { counter++; console.log('connection #' + counter); }); Client <script> var socket = io(); var sendInfo = function() { socket.emit('objAppear'); } </script> <button id="btn" onclick="sendInfo();">Appear</button> Of course that's the simplest thing to create using node + socket.io So now I want to create multiplayer in games I've already created. But how?!?! I can't find any tutorials. Can you please help me. Server part is too hard for me
  7. Hello. I know there are some tutorials out there. Mostly there are html5- no game engine focused. Since I am using Phaser I have some doughts on how to proceed. My game has multiple classes like player classes. The class code is something like this: var Player = function () { sprite... physics properties... groups... etc... } Well this was fine in offline. I think that I should apply an id to every player in the game (associated to unique socket id). Probably add a property ".id" to the Player class. How should I do that? Should I create a new Player for every client that joins. The flow would be something like this then. Client connects to server => I create a new socket id => I send that id to the front game => Create a new class Player with that id in its properties. Would that be ok? And another thing should I create the players with Game.player = new Player(id); (where Game is my state) or not add the players directly to the Game state but create a list of players {} and add each player to the world and to that list? Sorry if it sounds confusing but I really need help on this.
  8. 3D realtime editor minimal proof of concept on Github. https://github.com/GrosSacASac/3D-realtime-editor-proof-of-concept I put it on Github because some people were interested to see how it works. Maybe on this forum also. Note the poor code quality because it was a rapid prototype. The camera and the objects are the same in every tab open. Tested in Firefox and Chrome
  9. Hi guys, At first, I want to apologize for my bad english. I'll try to do my best. I'm creating a phaser multiplayers game based on the tower defense concept. There is a wave of monsters who walks along a specific path during an undertermined time (until every monsters of the wave died). Each monster of the wave is a sprite which has his own tween. Here I encountered 2 problems : 1) If I open a new tab in the browser running phaser, do some stuff, and come back to the tab with phaser, some tweens are crashing and the path of some of the monsters (not all) is not respected anymore. Do you know what could happened ? 2) As a multiplayer games, Im using sockets to establish a communication between clients and server. When all clients are ready, the server give them the order to start the wave of monsters, the tween.start() is launched at the same time on every clients phaser instance. But I noticed that, for some reasons I ignore, there is a small delay between clients, and the monsters are not at the exact same position in all browsers players. How could I fix that ? Thank you all for taking your time to help me.
  10. Hi all, I've been a bit more of a lurker when it comes to this forum. I've made a couple posts, all related to pixi and have been more active on their github forum than on html5gamedevs. The fruits of about half of a year's work has finally come together in a beta game on Facebook. I'd love for anyone who has a chance to check it out. Any and all feedback is welcomed (you can either reply here on in our in game support ticket center). We use a good bit of DOM elements for our menu UIs and Pixi to render the game. Socket.io and Nodejs are used in the javascript backend and CI for the html framework. As I have been the lead programmer on the game, I am more than willing to answer questions anyone might have related to the technical side of developing a game like this. I'm also open to any suggestions or tips Please keep in mind that this is a beta and there are some bugs, but we are actively developing the game and released it into beta to help generate some revenue while we continue to improve the game. We also just pushed out a patch that needs some bug fixes, so there are at least two pretty visible known problems. The url is https://apps.facebook.com/monsterislandonline/ **The screenshots are not full game screenshots, as I simply "Save as Image"d the game canvas.
  11. This is a clone of Scrabble but in real-time with multiplayer. This is for learning purpose and the game is not playable 24/7. But when it is it's very fun. I thing all the massive multiplayer games are fun if they easy to begin. And that's what :LETTRS :LITEROJ is all about. You start as a one block (letter) and You move across the board. You can put letter on board by pressing space bar. If You need new letter just type it on the keyboard to switch. This is work in progress as I learn more and more about node.js developing. Play the "game" here: 37.139.3.4:1337 . For now it just a big sandbox. More info at my site's blog post: http://p1x.in/blg/lettrs and dedicated page at http://p1x.in/literoj
×
×
  • Create New...