Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the lightest way to make a huge chess-like grid?

I'm working on a browser-game and I can't help but wonder about what's the lightest way to make the grid/board on which the game takes place.

Right now, as a mere sample, I'll show you this:

-link no longer active, it was basically a 25x25 table+tr+td grid-

Now, as the grid gets bigger and bigger, the table and its td's create a very heavy filepage which in turn...sucks in more resources from the browser engine and computer.

So, is a table with td's the most lightweight way to craft a huge grid-like board or is there something lighter that you recommend?

Cheers Sotkra

like image 876
Capagris Avatar asked Apr 03 '10 15:04

Capagris


People also ask

How do you make a weighted chess piece?

Find a piece of something round and hollow, the same size as your hole. Then you can hammer lead fishing weights into the form to the size you want, take out the weights, glue them in and felt the bottom. Caution: the pieces MUST be clamped securely before drilling.


1 Answers

Computing a table layout is a very complex work for a browser, because it has to know the dimensions of the last cell to calculate the exact width of each column. So, if you use a table, add table-layout:fixed early.

Floating boxes or relative positioning may be faster to render.

like image 171
fuxia Avatar answered Oct 11 '22 14:10

fuxia