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

  • Home
  • SEARCH
  • 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 137719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:09:02+00:00 2026-05-11T07:09:02+00:00

I have a game that’s based on a 25×20 HTML table (the game board).

  • 0

I have a game that’s based on a 25×20 HTML table (the game board). Every 3 seconds the user can ‘move,’ which sends an AJAX request to the server, at which time the server rerenders the entire HTML table and sends it to the user.

This was easy to write, but it wastes a lot of bandwidth. Are there any libraries, client (preferably jquery) or server-side, that help send differential instead of full updates for large tables? Usually only 5-10 tiles change on a given reload, so I feel like I could cut bandwidth use by an order of magnitude by sending just those tiles instead of all 500 every 3 seconds.

I’m also open to ‘you idiot, why are you using HTML tables’-type comments if you can suggest a better alternative. For example are there any CSS/DOM manipulation techniques I should be considering instead of using an HTML table? Should I use a table but give each td coordinates for an id (like ’12×08′) and then use jquery to replace cells by id?

A clarification: the tiles are text, not images.

  • 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. 2026-05-11T07:09:03+00:00Added an answer on May 11, 2026 at 7:09 am

    You can model your game board as a multidimensional javascript array:

    [[x0, x1, x2, x3 ... xn], ..... .....] 

    each entry is an array representing a row. Each cell holds the numerical value of the game piece/square.

    This model can be the ‘contract’ you send to the server via ajax as JSON. The server calculates the same array and sends it back to the UI. You can render that array into a table, divs or whatever you like. Prototype.js and jQuery make creating dhtml super easy.

    This array format will be much smaller than a whole HTML response laden with markup. It also gives you freedom to render the board in whatever way you like.

    You can further compress this format and just send the deltas. For example: save the coordinates of tiles changed by the user and send those to the server:

    [(x1, y2),.....(xn, yn)] 

    Or you can do it the other way around: send the full model array to the server, and have the server calculate the deltas.

    Check out Sponty, and watch the ajax traffic every few minutes or so, we do something very similar: http://www.thesponty.com/ The client sends the full model to the server, and the server sends the diffs.

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

Sidebar

Related Questions

I have a table that holds information about cities in a game, you can
How can I have that functionality in my game through which the players can
I have a fairly simple game that works perfectly on every version now up
I have written a game that uses GLUT, OpenGL and FMOD. The problem is
I have an OpenGL ES game that I am hacking together. One part of
The kind of simulation game that I have in mind is the kind where
We have a Silverlight 2 project (game) that will require a lot of character
I have an automatically generated XML file for the game that I run. It
I have an application that tracks high scores in a game. I have a
I have a map for my game, I have a script that on a

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.