Jump to content
  • Advertisement

TufanMeric

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About TufanMeric

  • Rank
    Newbie

Personal Information

  • Interests
    Art
    Design
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. TufanMeric

    Need help optimizing the bandwidth

    Thank you all for the help, it's a lot better now.
  2. TufanMeric

    Need help optimizing the bandwidth

    I managed to make it 936KB/30Sec, I lowered update frequency from 60/sec to 30/sec, made bullets move client-side, disabled updates for inactive entities and bam! 15MB/30s to 1MB/30s. My wallet and players' internet connections thanks you, kind sir.
  3. TufanMeric

    Need help optimizing the bandwidth

    I'm currently sending events like [bullet moved...x60/second], will try to change that. Except that, at this point I can't add any client side prediction without making huge changes.
  4. I made a diep.io-like game but i think it uses way too much data, 30 seconds in battle (dozens of bullets flying around) means 10MB download for client. I only send entity updates when they are changed 60 times a second, the only thing I don't send in game loop is attack animation, I send attack animation packet to all players instantly after player starts attacking. I'm using Binary WebSockets with Node.js ws library, I tried making packets as small as possible. Is this normal for a game or am I doing something wrong?
  5. Thanks for your time and detailed explanation, that helped and saved me a lot of time rewriting things in Java.
  6. I've built half the game server with node.js, should I switch to java before it's too late? My game has some turrets that attack players in their range using the code below. inRange = (x1, y1, x2, y2, w, h) => x1 < x2 + w && x1 > x2 - w && y1 < y2 + h && y1 > y2 - h; for (let i = 0; i < this.room.entities.length; i += 1) { if ( inRange( entity.body.position[0], entity.body.position[1], this.body.position[0], this.body.position[1], 500, 500, ) ) { ...attack } } I think this might not be the best way to do that in Node.js when there's 150-200 turrets since Node.js is single-threaded, which makes me think about rewriting the server in Java. I'm currently using p2.js for physics, I will probably use dyn4j or JBox2D on Java.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!