Otho Posted March 4, 2017 Share Posted March 4, 2017 About: The game is called Prank and I am developing it alone in HTML5. The gameplay is inspired mostly by liero. Gameplay: You choose 5 weapons and try to kill the other players while destroying the terrain. Techinical: I have not used any framework or engine. I am programming it in Typescript and rendering things using canvas 2D, but I am considering to use some kind of render library to improve the game performance. At moment the game can only be played locally, but I want to add online multiplayer. I will post a link to the game in a few weeks, because it still needs a little more polishment. scheffgames 1 Quote Link to comment Share on other sites More sharing options...
scheffgames Posted March 5, 2017 Share Posted March 5, 2017 Nice. Are you using Bresenham algorithm by any chance for destructible terrain? Quote Link to comment Share on other sites More sharing options...
Otho Posted March 5, 2017 Author Share Posted March 5, 2017 I use a quadTree for the collision and manipulate the image using Bresenham. I took these pictrue with the character at the same position, but one shows the quadtree and the other shows the image. They are not perfectly in sync, but it is good enough. scheffgames 1 Quote Link to comment Share on other sites More sharing options...
scheffgames Posted March 5, 2017 Share Posted March 5, 2017 Oh, cool! I've played with destructible terrain in Unity and had lots of fun - all kinds of explosions, raining pixels on various slopes, realistic and random pixel collisions, etc. I haven't used quadtrees - they seem very good for performance so it's a thing I'll keep in mind. My final goal was to make an unlimited destructible world using chunks of screen data stored and reloaded on the HDD as the come in view - had something relatively working but I abandoned the project in the end. One interesting thing to note regarding performance is using a limited color palette - with the standard rgba (0-255 per channel) you have to store a 4 million someting integer for each pixel - 4 bytes. That may not seem like much but it adds when the whole world is tens of thousands of pixels in width and height. One can pack quite a lot of color variation in a singly byte thus drastically reducing the amount of data required for each pixel. Another handy trick is to use 4 pixels or 16 as the smallest destructible unit thus improving performance even more. Otho 1 Quote Link to comment Share on other sites More sharing options...
Otho Posted March 5, 2017 Author Share Posted March 5, 2017 My maps aren't that big. They are 2048x2048, so I am not having much problems with memory. I have a constant on my QuadTree that defines the size of the smallest destructible unit, but the game is working fine with 1. What I am having performance problems is rendering everything on screen. I am considering using PIXI js so it would use webgl instead of canvas2D, but I am not sure it will be worth the effort. Quote Link to comment Share on other sites More sharing options...
scheffgames Posted March 5, 2017 Share Posted March 5, 2017 Yeah, that will happen if you're constantly updating the hole visible screen every time something changes. I got around this by splitting the world into 128x128 (or 64x64) chunks and update only those if a change occured at that location. Quote Link to comment Share on other sites More sharing options...
mariobros Posted April 28, 2018 Share Posted April 28, 2018 I found your topic today and wonder how is your game? Is it available to play? I'm working on something similar (i guess). You can check it here: https://lier.io Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.