Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:28:38+00:00 2026-06-02T02:28:38+00:00

I just started learning HTML5 canvas and Google App Engine’s Channel API. I build

  • 0

I just started learning HTML5 canvas and Google App Engine’s Channel API.

I build a simple game demo based on a isometric map. Right now I want to implement character movement, but I am wondering how I should implement it.

current demo: http://cheukalex.appspot.com

This is how I think it would be implemented:

The client will handle the movement. Once the arrow keys are pressed, the client will do the movement, then sends the new coordination to the server which then will be broadcast to other users on the server to update the location of your character.

Problems I thought of:

  1. What if I want to implement “movement speed”, as in how fast can the
    user walk five squares for example. The delay between each movement
    will be done on the client side. But will that be safe? since
    javascripts are easily edited.

  2. How do I deal with latency? If i built a simple chase-tag game, how would I sync up the users so situations where, one person looks like they “tag” another user, but the other user see him 1-2 squares behind, wont happen?


EDIT: @nycynik, you are right, the latency is around 200ms. I have tested it here.

Latency Test: http://cheukalex.appspot.com/latency

Thats is the smallest latency it will ever get. 200ms is pretty fast. Then it might be my code that is slow?

How i implemented the whole game is.

  1. Client enters website
  2. Server creates token, open channel, store client data ( channel id ) in DB
  3. …. some logic
  4. When Client press arrow keys, it notifies the server which client moved and what direction
  5. Server recieve movement, does logic, loops through database (only currently online clients), broadcast message to all clients the position of every client on the map in json. Client then “moves”.

Something wrong with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:28:39+00:00Added an answer on June 2, 2026 at 2:28 am

    This was supposed to be a comment to the first answer, but it won’t fit.

    There might not be much you can do with the response time, because network latency will really be an issue for now. Perhaps you can just work on the user experience side. To make the delay “acceptable” to the user, why don’t you add an animation?

    For example, when the user hits an arrow key, the horse can look like it’s pulling back slowly and getting ready to jump (behind the scenes you’re sending a request through the Channel API). When you get the response from the server, the horse can then complete the jump and land on another position.

    Though there will still be an issue of latency, your users might find it “acceptable” if the latency isn’t that obvious.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I´ve just started learning GWT and I´m trying to implement http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload and but failing
I just started learning Python... I am writing a simple program that will take
I just started learning Backbone.js, and have been working on (what else) a simple
I just started learning RoR. This is my /app/trip_controller.rb file class TripController < ApplicationController
I just started learning HTML5, I started with normal text file and changed its
I just started learning Erlang. My task to write a simple script for testing
I just started learning PHP and am having some trouble getting a simple login
I just started learning ASP.NET and HTML5, and looking for experts inputs. I'm exploring
I just started learning JavaScript and am wondering why this simple snippet hangs when
I just started learning c# on vs 2008. I found key combiations for select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.