
You are almost there Aki but not quite, rather than Grids, you should look at it as points. when programming 2D you have crossed the threshold into maths/physics... so important things to note as far as 2D programming goes is you need to know printing to screen starts on the top left corner. Left = x axis (which counts from left to right) Top = y axis (counts from top to bottom) To draw a shape on screen you need to keep track of its top-most part and its left-most part and have two lines horizontal and upright respectively. where the two lines cross is the x, y location of the shape. then you need to keep track of the width and height of the object also in points (pixels) (not centimeters or inches etc) width = the distance from x to the right of the shape height = the distance from y to the bottom of the shape This happens for all polygons. also you need to remember that the baic shape is the triangle and not a quadrange. from a triangle ou can combine them smartly to get any shape you want. 3D is not much different other than there is an additional Z axis which is the depth Steve Obbayi SKYPE: sobbayi http://sobbayi.com http://blog.sobbayi.com ----- Original Message ----- From: "aki" <aki275@googlemail.com> To: "Skunkworks forum" <skunkworks@lists.my.co.ke> Sent: Wednesday, March 17, 2010 11:06:49 AM GMT -05:00 US/Canada Eastern Subject: [Skunkworks] Grid based programming? Just checking if anyone has done 2D graphics programming and can share some insights. Is it grid based such that the grid gives eg location using an array? I think it does but how many grids then makes the screen display? L plates... :-) _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke