|
-
Oct 17th, 2001, 09:45 PM
#1
Thread Starter
Fanatic Member
How would i go about making a column's clone?
hello
i think the time has come where i would finally like to learn how to make some kinda of game..... something simple.. like an arcade game..... pong, whatever...
i just need some help to get into the right mindset, and get some ideas about how certain things are usually done in the gaming world 
right now, my objective is to make a game called columns...
i attatched the original game... it's a small but very amusing game ...
i made one attempt, just using shape controls (used 6 shapes in control arrays .... each shape array was a column... and there were about 18 indexes in each column......
i had them colored vbwhite... then, i was using some random numbers to generate new sets of 3 blocks that would be random colors... this works great... then, everytime the timer went off i would go through some logic....
check to see if it was at the bottom, if not, move blocks down (really just changing the next block's color, and changing the trailing block back to white.....
this worked..
until i tryed checking to see if the block ahead was white, or if it was cleared.... well i ran into some problems, and im thinking that the way im trying to do this isn't the most efficient or feasible.....
so, could some of you gaming guru's check out the columns game attatched to this post (if you haven't already played it ) and suggest to me how one might go about making something like this?
i just really want the main concepts. (but i probly will be back later asking for help when something goes wrong)...
any tutorials or things like that would be helpful as well.....
i appreciate your time
-
Oct 17th, 2001, 10:02 PM
#2
Ok, here is the way i would do it.
First, create a 2D array for the grid spaces. Something like 25x10. Next, create a type:
Code:
Type Column
X as long 'x position in array
Y as long 'y " " "
F as byte 'first color in column, top down
S as byte 'second color in column...
T as byte 'third ....
End Type
Now, while the game is running, if there is not a column in play, fill in the values in a single Column variable (only use one, youll see why later). Y values should go from the top down (like the screen). Now, for each game tick(each update), drop the block by one y value, check user input, and move the block accordingly, etc. Check the grid to see if Grid(Col.X)(Col.Y+2) <> 0. If so, there is already a block there, stop moving that block. In the grid, fill in the values:
Code:
Grid(Col.X)(Col.Y) = Col.F
Grid(Col.X)(Col.Y+1) = Col.S
Grid(Col.X)(Col.Y+2) = Col.T
Then, you can check the values in the array for groups of three or more in a row (you can do that). Then, if there are any, shift all blocks above the one that should be removed down 1, and fill in with a 0 at the top, and repeat the process.
Z.
-
Oct 18th, 2001, 07:36 AM
#3
Good Ol' Platypus
You could write some logic for it:
VB Code:
Function CheckColumns(NumColumns As Byte, NumRows As Byte)
Dim I As Byte
Dim J As Byte
For I = 0 To NumColumns
For J = 0 To NumRows
'check here
Next J
Next I
End Function
And then, you could have another function that would shift all of them down, etc.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 18th, 2001, 07:37 AM
#4
Good Ol' Platypus
And also in VB, arrays are called this way: Array(multidimensional,grids,are,cool)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Oct 18th, 2001, 07:46 AM
#5
.... Oh yeah... -.-;; Learn C++ =P.
Z.
-
Oct 18th, 2001, 06:37 PM
#6
Thread Starter
Fanatic Member
First, create a 2D array for the grid spaces. Something like 25x10. Next, create a type:
heh sorry to be dense, but what control would u use for this 2d array of grid spaces?
:P
ty for all the response too! im gonna try and start this tonight
-
Oct 19th, 2001, 10:50 AM
#7
No control. Just a standard 2d array:
Code:
Dim Grid(25, 10) as Long
Z.
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
|