July 9, 2009 - 12:25 am
Mesh Map

Mesh Map

As I stated in my previous Mesh post, Mesh is a browser based RTS game. Or it will be. Right now, I’ve just started, but already I have a side scrolling map where a viewer can move around the map by placing her cursor to the edge of the browser window to make the map move in that direction, just like in other desktop RTS games. I have also made the sides of the screen fade to black (It starts to fade 50 pixels from the edge, which is also the distance at which screen scrolling begins. What a coincidence!)

Through a few simple calculations, I’ve actually managed to make the map scroll faster the closer the cursor is to the edge of the screen. Unfortunately (and possibly, fortunately for people who go away with their mouse cursors at the edge of their screens), the map is separated into different ‘pages’ that I will explain in greater detail in the future. For now, a viewer can switch to an adjacent page by ‘overscrolling’ and clicking on the black gap where an arrow appears. Pages are randomly generated on the client side for now, but the way they are written, it is easy to move the generation (and, in the future, loading) to the server through AJAX.

There is also a space where I’m going to make a menu that may or may not resemble a ribbon. :|

Edit: I’ve had to completely rewrite the map, so this no longer applies. :(

Leave a Comment