If you would buy a game of Monopoly in the 'real' world, you'd probably get a box, some playing figures, dice, bonus cards,property cards, game money, rule book and a game board. A lot of the similar stuff, like dice and game board, can be found in other 'regular' games. So, it would be logical to assume that computer games need similar 'components' to work. Yes, we'll make some of this stuff in our PC game. The first thing is to make a game board, or a game field, as I call it. Our game will use a big game field made of small fields. We'll create a field 15x10 in size. 15 columns and 10 rows. Each of the small game field blocks will hold one Block, Bubble, Baloon, whatever...
Here's the idea:
Ok, you probably get the idea now. Our game field is, basically, a bunch of blocks. Each block is defined with it's coordinates and a value (in this case, representing a speific color). So, how to make our empty form show something like this?
First add the next controls to the form:
(You can drag them from the tool box onto the empty form)
- Picture Box
- Button
Now we'll fine-tune some properties for our new controls. In the Properties window, on the left, there is a huge list of properties you can adjust. Click on your Form and and tweak the properties to the values shown in the next list:
Form - frmMain
- FormBorderStyle: FixedSingle
- MaximizeBox: False
- Size: 630; 470
- StartPosition: CenterScreen
- Text: My First Game
This will disable resizing of your form, set it's size and start position, and write 'My First Game' in the title bar. Ok, moving on - select the button, and set it's properties:
Button
- (name): butGame
- Location: 12; 6
- Size: 126; 53
- Text: New Game
Picture Box
- (name): picGameField
- BackColor: Web>Transparent
- Location: 0; 65
- Size: 480; 320
0 comments:
Post a Comment