asyncrobot

Members
  • Content count

    12
  • Joined

  • Last visited

About asyncrobot

  • Rank
    Member

Contact Methods

  • Twitter
    asyncrobot

Recent Profile Visitors

454 profile views
  1. asyncrobot

    Nebulaz.io - another io game about ship fleets

    Thanks @Marius. I am planning to add different ship types (if I could find some time), that's why I added "buy ship" button.
  2. asyncrobot

    Nebulaz.io - another io game about ship fleets

    Hi @mehmetegemen I was expecting a harsh response when I pointed that server was written in C++ Sorry for the long post. Ship movements are based on a model called boids. Here is the original link, if you are curious about it. Here is an explanatory video (which is not mine). I wanted to simulate as many boids as possible, I implemented a simple boids model using javascript. Implementation was quite simple and it was not optimized as you can guess. On my laptop (with an i5 CPU), I could simulate around 600-800 of them with good framerates. The bad part is my implementation complexity was O(n^2) and I was greedy about simulating more boids So I decided to write one with C++ and using a more optimized approach. I was full of hope when I started the first implementation, I started with a multithreaded design that can support many online players but the complexity of the project increased a lot, so I concede to change my design to a single threaded one. (Basically, two threads that share a single mutex) I implemented a grid (basically a 2D bucket list) to quickly test my boids with each other. It was based on this tutorial. Everything was defined as serializable entities with poor names (FleetEntity, FoodEntity, HealerEntity, ShipEntity, and ObstacleEntity). On every tick, all object are updated according to their update method. Server tick count is 20 per second and updates are sent 10 times a second. Every update is prepared for each player but meta-data updates are shared between all players. Meta-data update contains information like player scores, minimap data etc. In order to create player updates, the server queries all entities in the view rectangle (400 by 400 units), serializes it into a binary array and pushes it to clients. So clients receive only the part they are allowed to see. I only tested the server with g++ and on Linux. It should compile on Windows too. For production, I don't create releases. I have a separate branch in git for my production code, and it is compiled on the server. The client is compiled with google closure tool. The client works as a terminal. It sends mouse position to the server and draws what is received. I spent most of my time on animations and visuals. Apart from the shockwave filter, those trail effect is implemented by swapping two offscreen render targets. On every frame, a particle image (smoke) is drawn for every ship. When it is rendered in sequence, trail effect is achieved. It is quite similar to this example . When it was almost ready, I wrote a simple bot and spawned 200 of them on the remote server to check CPU/ram/bandwidth usage. I was happy with the results. 200 players (4 ships each) uses 10% of the CPU and only 10MB of ram Bandwith usage is usually quite low (1k-5k), but it can peak to 30kb/s if the screen is full of ships. If a client's queue starts to pile up, the server stops sending unimportant messages. If the client can't receive a certain amount of messages, the server closes that connection. I test it with OVH's "VPS SSD 1", and I am impressed by the value. Currently, the site uses that plan. https://www.ovh.ie/vps/vps-ssd.xml I think I neglected the gameplay part of the game and mostly dealt with technical stuff. I wanted to make a game that can support 100 - 200 concurrent players with 10-20 ships. I think all time high was around 30 online players and that isn't a common thing My previous game (spaceblast.io) had some performance issues. It was written in JavaScript and can host 70 concurrent players on the same server. Most of the CPU was used by physics simulation. I also made that open-source afterward. That also motivated me to write it with C++. If you want to check that out, here is the GitHub link. But next time, I will probably use NodeJS again. https://github.com/ercang/simple-physics-js Again, sorry for the long post
  3. asyncrobot

    Nebulaz.io - another io game about ship fleets

    @Capitaine Herlock thanks
  4. Hi everyone, I have been working on another io game, and the first version was completed almost two weeks ago. Here is the link http://nebulaz.io Features: The game is based on mining resources and creating a fleet with the points you collect. Ships auto shoot nearby resources or other ships. Players can buy ships with the resources. On the map, there are 4 health regen areas marked as green on the minimap. Development Notes: I used pixi.js and shockwave filter for explosions Howler.js for spatial audio Communication is in a binary format. The game also works on mobile devices, thanks to pixi.js. There is no client side prediction, everything is calculated on the server. The web server uses node.js for static content. The game server is written in C++ using uWebSockets. Here is a video on my twitter. https://twitter.com/asyncrobot/status/976192042215923715 I would like to hear what you think about this, Thanks!
  5. asyncrobot

    Space Blast

    Thanks @True Valhalla , I will check with AdBlock Plus.
  6. asyncrobot

    Space Blast

    @True Valhalla I heard the same thing from several people but I couldn't reproduce it. I really appreciate if you can give me more information on that. Such as your PC, browser and error prints on developer console. I didn't implement support for big endian devices but I think that is not very common. I am planning to support that later. I added a small script to check this, if you click on the link below it should say "little endian". That might be the case, but I am not sure. http://www.spaceblast.io/endian.html @elparole Thanks, I wanted to support mobile with this one. But it uses too much processing power, my phone becomes very hot and I can see the drop in battery level Without upgrading your damage skill it is not easy to destroy enemies. May be I should change that, game balance is hard to tune. Another strategy is to destroy enemies by shooting nearby asteroids. Asteroids explode into smaller ones and if they bump into a moving asteroid that also destroys ships. I am planning to make this more effective.
  7. asyncrobot

    Space Blast

    @GAME.WTF Thanks for adding the game to your site. @NicoA Thanks! Most of project was started from scratch. For eg. renderer class uses canvas element directly, most of the code is vanilla js. I used nodejs for the server and websockets of course
  8. asyncrobot

    Space Blast

    @FakeWizard Yes graphics are similar to agar.io and diep.io @scheffgames Thanks I wanted graphics to be simple and responsive but of course there are plenty of room for improvement.
  9. asyncrobot

    Space Blast

    Thank you, I'm glad that you enjoyed it I didn't use anything specific for the network capability. I read these articles and pick something I could achieve http://gafferongames.com/networking-for-game-programmers/ Basically server sends entity information (position + velocity) at a constant rate, when client receives that, it applies new properties directly for the simulation. I only apply some smoothing on the graphics layer. Until client receives new data from server, client runs simulation with the data it has. About sending data, I wrote serializers for each game object. If a property gets modified, only modified part is sent automatically by the server.
  10. asyncrobot

    Space Blast

    Hi everyone, I was working on a game called "Space Blast". You can play it by clicking the link. http://www.spaceblast.io There isn't much players currently. Features: XP based level up system. Player's XP is reduced to half when player ship explodes. Players shoot asteroids and other players to gain XP. Asteroids divide into smaller pieces. If a moving asteroid hits a ship, ship explodes. Players gain skill points on each level up. Upgradable skills: Health, Health Restoration, Speed, Fire Rate, Bullet Speed, Weapon Damage. Development Notes: I wanted to make physics simulation deterministic, so I wrote a small library for simple impulse based physics simulation. Only circular bodies are supported and no rotation is implemented. But still it is hard to get the same simulation running on the both ends. Also I think I spent too much time here. There can be lots of moving bodies, so the communication is in binary format to reduce the traffic. Only client and server specific code is separate. All game related code is shared between client and server. This really ease the development for me. Game simulation runs on clients and server at the same time. Minified game source (client javascript) is about 70 KB. It is not very important but I am quite happy with it Sound effects are played in different playback rates (90% - 110%), this also gives some variety. When player ship explodes it adds a lowpass filter. Game also works on mobile devices but it requires good processing power. Any feedback is welcome. Thanks!
  11. asyncrobot

    Postmortem: Medieval Defense Z

    Hi, game looks very nice and animations are smooth, but I have a question about your conclusion with pixi.js. Can you explain this more? Also I was wondering, if you put this on app store, what will you use to wrap it? (Intel XDK, ludei etc.) Do you have a preference? Thanks.
  12. Hi all, I have been working on my hobby project. It is a multiplayer bomberman style game. Mainly I used threejs, websockets and nodejs. It is still in early development stage, so there might be bugs There is no need to sign up, you need to provide a nickname to start playing. I recently set up this server, so probably, there might be no one to play I would really appreciate if you guys can give some feedback. Screenshot: http://imgur.com/1TF13ma http://www.bomberarena.com/ Thanks.