In fact, I had this idea in my head for a kind of evolution simulator, not quite like the Conways Game of Life, but one part where they correspond is that they will both be based on a square grid.
Now, personally, I like working in HTML + Javascript + for simple applications, since it allows you to quickly create a user interface, and if you are not doing something highly computational, then JS in the browser is a decent platform.
The problem I'm trying to solve right now involves drawing and updating the grid. I might have missed something, but it looks like there is no simple and easy to calculate way to do this for an 80x40 grid. An easy way would be to create a div with an absolute position and a specific background color for any square that is NOT empty. However, it can get very slow with anything over 60-70 color squares.
I am definitely ready to switch to another language if the situation requires it, but first I just want to know that I'm not stupidly missing the easy way to do this using HTML + JS.
The response must include one of the following values:
a) A smart way to draw and update an 80x40 grid (where the squares change color and โmoveโ) in HTML + JS
b) Another language that can do this fast enough. I would prefer not to spend a few days learning DirectDraw or something.
source share