Creating a grid
Creating a grid
I am starting to make a game using c which contains a 5x5 board. I know I need to create a matrix but I'm not too sure on how to actually draw it. If there is anyone that would be able to help me on this..it would be much appreciated. Thanks..
24 Feb 08, 8:59PM
To make the matrix you just need to draw a series of squares.
Where they but up you'll have a double thickness boundary, alternatively you can overlap the squares by 1 pixel (or whatever your boundary is) and then there won't be any overlap.
Off course you could properly work out which squares have common boundaries etc, but I suspect its better for you to get going on this project first, then refine the logic at the end.
24 Feb 08, 9:15PM
Thanks for that..but how do I draw squares?
24 Feb 08, 9:32PM
Well thats a tricky question?
What compiler are you using?
More importantly what type of computer are you using: Windows, Linux, OSX, etc..
If you want to be totally generic (i.e. write stuff for any platform and most compilers) then you should check out the Qt library: http://trolltech.com/products/qt
24 Feb 08, 10:22PM
wel thats the tricky bit because I'm writing for the PSP so I'm using Cygwin.
24 Feb 08, 11:09PM
Sorry. No idea.
Sounds like an interesting project. Good luck.
25 Feb 08, 10:54AM
Thanks and thanks for trying to help as well..much appreciated!
Login