Welcome

Welcome to my blog. I mainly blog about the basics of running Flash games over the internet, but sometimes I get distracted. Here you will find my efforts at programming turn based Flash games, plus links to all the games I have written. You are free (as in beer) to get all the code, just email me - nicolas_evans at yahoo.com (sorry you cant click on it - I dont want more spam).

Building Multiplayer Games in Flash.

The Posts

Wednesday, April 26, 2006

Hi. I am busy working on my third conversion, Mammoths. You can find it in the links, as its easier keeping those up to date than the posts. Am finding it a lot easier to convert a game now. However I did run into one issue - its not obvious which piece the opponent moved. So I added a shading movieclip with an alpha of 20 percent for the route moved. Here is the code:
// in the constructor
for (i = 0;i<15;i++) {
  mcCa.attachMovie("McMarker","mcMarker" + i,++gnNextDepth,{_x:-100,_y:-100,_alpha:20});
}
// at the start of turn
k = 0;
i = gnStartI;
j = gnStartJ;
mcCa["mcMarker" + k]._x = (i - 11) * 40;
mcCa["mcMarker" + k]._y = (j - 11) * 40;
do {
  if (i < gnEndI)
    i++;
  else if (i > gnEndI)
    i--; 
  if (j < gnEndJ)
    j++;
  else if (j > gnEndJ)
    j--;    
  k++;
  mcCa["mcMarker" + k]._x = (i - 11) * 40;
  mcCa["mcMarker" + k]._y = (j - 11) * 40;
} while ((i != gnEndI || j != gnEndJ) && k < 15)

# posted by nicolas_evans @ 10:35 AM
Comments: Post a Comment




This page is powered by Blogger. Isn't yours?