KayacChang

Top-Down Tank Game Showcase

Recommended Posts

Hi everyone,
 
I just create a simple show case for PIXI.JS.
 
A top-down Tank game with: 
 
1. Physic engine integration with matter-js.
2. ViewPort for 2D camara.
3. Custom Tile map and grid system. 
4. Dynamic generate new area .
5. Keyboard Control.
6. GUI Interface.
 

Share this post


Link to post
Share on other sites

you should switch from just "keydown" to setting FLAG to true on keydown and setting it to false when its up. In update, if flag is true - move the tank.

When I press "W" tank moves a bit, then autorepeat starts, like in old NES tetris. Im not a hyper-tapper :)

Share this post


Link to post
Share on other sites

Hello @ivan.popelyshev , Could you told me which OS and Browser you use?

The keypress holding functionality work fine in my system, using Mac OS and Chrome.

And Yes, I will change my movement logic, this is a great idea to both fix the problem and improve performance.

Thank you very much.

Share this post


Link to post
Share on other sites

Add multiplayer to your game. This article are awesome: Real Time Multiplayer in HTML5. The article explains how to use some methods for network latency compensation. I deployed the example from the article on Heroku. You can run it in two browser windows: https://battle-world.herokuapp.com/?debug (It is free hosting and sometimes you need to way a few seconds when server is waking up) The article has links on another good articles about network latency compensation methods. I am rewriting the code example from the article to TypeScript.

Share this post


Link to post
Share on other sites
On 10/14/2019 at 6:20 AM, KayacChang said:
5. Keyboard Control.

Great little demo! I would suggest definitely making the keyboard changes as suggested by Ivan, it's a bit iffy for me. Windows 10/Chrome.

I even tried to bug it out by messing around with pushing tanks into objects and everything seemed pretty solid! No issues there.

Share this post


Link to post
Share on other sites

My dream is to make the Battle City game with multiplayer. I will take textures, tiles and some rules from the original games but I need to create right rules for a few teams and coop mode. I think it will be a good practice.

Edited by 8Observer8

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.