Scrolling a picturebox with images laid on top

mcapone888

Member
Joined
Jun 17, 2011
Messages
10
Programming Experience
Beginner
Hi everyone. While I understand VB.Net at a basic level, I consider myself an advanced novice.

I am looking at creating an old turn-based stratedgy board game in VB.Net. My main windows form will be broken up in to six parts (three across, two down). The top-left, top-right, bottom-left, and bottom-right parts of the form would be reserved for the four player character (items such as character image, stats, gold, health, etc.). The bottom-center part would be reserved for buttons to roll dice, open inventory screens, quest text, etc.

Now the question I have is about the top-center part. This is where I will display the game board. The board is basically a big grid which is made up of 14 tiles across and 14 tiles down (so 196 'locations' a player character can move to). The board is also populated with monsters, furnitures, tokens, etc.

The entire board will be too big to display in this top-center part without scrolling. So my question is: Would it best to draw each tile of the game board individually, or to draw the game board as one big image? My concerns is about scrolling the board, with the concern that the pieces on the board (separate images laid on top of the board) would also have to scroll along with the board.

What would the best way to do all this? I am not looking for code, but just some ideas how to implement this. I will do the research myself, but just need an idea on what built-in components to use, and any built-in functions I should use to draw the board, game pieces, and to achieve a scrolling effect.

It is important to note that there would not be any animation. Basically the user would click the area he would like to move his character to on the game board and the image of the player character would simply move instantly to that spot (if it is a location he is allowed to move to, of course).

Thanks in advance for any information you could provide me!
 
Your decision should really be based on how you are going to program the location and moving of pieces rather than scrolling. The really important thing is to avoid redrawing as much as possible which is why I would recommend that whether you go for a single image or tiles it should be the background image of picture box(es) contained in a scrollable panel. This will effectively render the map 'permanent' and auto repainting while giving you the opportunity to draw or, in the case of tiles, to load a transparent image directly onto it for the pieces making them automatically scrollable also.
 
Back
Top