   how to set dimensions of game grid ? AS3 CS3
  Dear All,Im trying to make a game using ActionScript 3.0 Flash CS3 (Client Side) and C# (Server Side)at the moment i want to setup the Game Grid (ROWS&Columns)so, how can i programaticaly find the point of (row x column)example:______________#0 1 2 3 4 50 12....x345..........y______________so my Questions are:- how can i draw this Grid programaticaly to locate x and y ? - how can i find X and Y using ActionScript 3.0 Functions?- how can i calculate the distance between x and y ?looking forward to hearing from you guys =)Thanks in advance.   
  i don't think that mat and physics is the best section in which write about grid issues.. mayebe isometric land is better(and also i don't think this is the best forum for actionscript language..)Quote:so, how can i programaticaly find the point of (row x column)the data structure at the base of a grid is a bidimensional array,so you can use a nested for loops to get some points:for(x=0;x<10;x++) {    for(y=0;y<10;y++) {   // do something with point x-y}}this will iterate trought a 10x10 grid.Quote: how can i draw this Grid programaticaly to locate x and yin Actionscript tou can use a Sprite object to draw,now i don't remember exact syntax but you can fin it here:http://www.adobe.com/devnet/flash/quickstart/drawing_commands_as3/#section1Quote:how can i find X and Y using ActionScript 3.0 Functions?you have a virtual coordinate system that is your grid.for example you know that there is an actor at coordinate 3-5 (row 3, column 5)in the screen space the real X is 3*pixel_of_each_gridboxthe sprte is large 100 pixel, you've got a grid of 10x10 formed by 10pixel box.the real position of actor in sprite coordinates is 30x50Quote:how can i calculate the distance between x and y ?i think using pitagora formaul is the best wayhope responding your questioni leave you some links, mayebe could be usefulhttp://www.as3blog.org/?p=50http://www.yarrcade.com/category/game-development/grids/;  Thanks alot for your replyam sorry for posting this in here but I thought it had some math questionsI'll try what you said , it seems like useful answers. I'm happy with the resources as will =)thanks again   