|
-
Jun 29th, 2006, 03:50 PM
#1
Thread Starter
New Member
How to make grid visible ?
Trying to make a grid based online game, I would like to be able to see how to see the grid while running test, or to make it togglable.
I want to be able to see how the tiles for the graphics layout with and without the grid. Possible?
-
Jun 29th, 2006, 03:55 PM
#2
Frenzied Member
Re: How to make grid visible ?
-
Jun 29th, 2006, 07:58 PM
#3
Lively Member
Re: How to make grid visible ?
jeroen79 is right, you need to manually add lines to your program. There is another way though, assuming your images for your grid are bigger than say 5px wide and high, you can make a 'test' tileset where you draw black lines on the images around the border. That would work, and depending on how many images you are using it may be faster. Drawing lines slows rendering time considerably.
-
Jul 6th, 2006, 08:48 PM
#4
Thread Starter
New Member
Re: How to make grid visible ?
Will this be coded or done differently. Sorry. Not understand fully.
-
Jul 6th, 2006, 08:50 PM
#5
Fanatic Member
Re: How to make grid visible ?
dont do it that way, just draw horizontal lines across the screen every height of the sprite and vertical ones every width of the sprite. It is just that simple
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Jul 11th, 2006, 03:26 PM
#6
Thread Starter
New Member
Re: How to make grid visible ?
I can see drawing lines and importing somehow, but drawing lines by height and width without coding is doable... i will reattempt, but this latest info is c onfusing.
-
Jul 12th, 2006, 03:43 PM
#7
Junior Member
Re: How to make grid visible ?
well you could do this also....
Dim wid As Long
Dim hig As Long
Dim X As Long
Dim Y As Long
Dim SresW As Long
Dim SresH As Long
'total width of the area
wid = Picture1.Width
hig = Picture1.Height
'how many squares across
X = Text1.Text
'how many squares Down
Y = Text2.Text
SresW = wid / X
SresH = hig / Y
For i = 1 To X
Picture1.Line (SresW * i, 0)-(SresW * i, hig)
Next i
For a = 1 To Y
Picture1.Line (0, SresH * a)-(wid, SresH * a)
Next a
this will draw the lines for you according to the size of the picturebox and how many boxes you want.
so you can make 2 textboxes or you can just change them to a specific number.
Last edited by [email protected]; Jul 12th, 2006 at 04:04 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|