need suggestion: creating simple board-game in vb.net using visual studio

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
newbie vb.net question, trying to convert myself from java...

Is there an equivalent to a java "grid" form in vb.net? or no?

From my exploring around the visual studio windows-forms controls, I'm thinking to create a large PictureBox as the game board and place smaller "game piece" images on top of that, depending on their x/y coordinates -- which I'd manage as a 2D array internally.

Is that the best/only way? Any other suggestions?
I've googled -- and found a checker-board sample app, but no sample-code :(

thanks for suggestions

 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
anyone?

another alternative: design the form with 64 seperate images -- which would be a ton of redundant code when it comes to the "piece clicked" controls, but maybe easier to determine when a player clicks a certain spot.

Opinions?
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Why not use a user control, and write some code to draw the board, and pieces? That's what I'd do.

That way you've only got one set of events to deal with. The problem with having 64 different picture controls is you need to write code to handle the clicks for each one.
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
Originally posted by: Mark R
Why not use a user control, and write some code to draw the board, and pieces? That's what I'd do.
..snip..

By "use", you mean "create my own" ? Or is there one in visual studio I'm overlooking?
(vb.net noob)

Are you suggesting something like what I try to [poorly] explain in my OP?

 

ArmchairAthlete

Diamond Member
Dec 3, 2002
3,763
0
0
I just know I didn't use this Java "grid" thing for a tile-based game I created in Java. If I wanted to do it right that wasn't the best way (had to have scrolling for example).