tanks icon indicating copy to clipboard operation
tanks copied to clipboard

Canvas instead of html + jquery ?

Open SwiTool opened this issue 8 years ago • 10 comments

Hey,

I noticed a lack of performance here. Okay it is not the main purpose of the tutorial but we can't do html updates in a graphical game. What if you replace all of this by a canvas? I'm making my own tanks game, maybe you could inspirate from what i've done, later.

SwiTool avatar Jul 19 '17 18:07 SwiTool

WebGl would be great, take a look at pixi.js I built a similar game with that.

z3t0 avatar Jul 20 '17 04:07 z3t0

Indeed it seems nice, I already heard about pixi.js, gonna look into this.

SwiTool avatar Jul 20 '17 09:07 SwiTool

@z3t0 Check my fork here it's a non multiplayer for now, but I'm using PIXI.js and it shoes the basics (move, shoot, delimited area)

it's deisgned to have as many tanks as we want, each tank has different stats and bullet stats.

Please check it 😄

SwiTool avatar Jul 27 '17 16:07 SwiTool

thanks i will @SwiTool

z3t0 avatar Jul 27 '17 21:07 z3t0

Also if you plan on adding multiplayer take a look here It uses pixi.js for rendering and another library for networking.

z3t0 avatar Jul 27 '17 21:07 z3t0

I use socket.io for networking. It is already multiplayer but it doesnt sync for now. I will make updates in a few days

SwiTool avatar Jul 28 '17 06:07 SwiTool

Still worth checking out the networking library I'm using in that project as it does a lot heavy lifting including interpolation and prediction.

z3t0 avatar Jul 29 '17 00:07 z3t0

What is the name of it? I only see socket io

SwiTool avatar Jul 29 '17 03:07 SwiTool

@SwiTool lance-gg

z3t0 avatar Jul 29 '17 10:07 z3t0

It seems hard to use. But if i encounter lags problems i'll bend over it. Thank you for the tip

SwiTool avatar Jul 29 '17 19:07 SwiTool