grimsk8ter11
Unregistered
So in response to daves challenge, ill offer a little help.
This is what im using for the image handling in my C++ Tetris, feel free to try to figure it out till my example is done.
http://www.kingdomofcryshall.com/CImg.h
yes, indent = 2 spaces, blame verr for getting me in the habit.
Misunderstood
Unregistered
grimsk8ter11 Wrote:So in response to daves challenge, ill offer a little help.
This is what im using for the image handling in my C++ Tetris, feel free to try to figure it out till my example is done.
http://www.kingdomofcryshall.com/CImg.h
yes, indent = 2 spaces, blame verr for getting me in the habit.
He did the same to me!!!
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
How many pieces should it have ?
grimsk8ter11
Unregistered
mine is random, i am using CImg to generate blocks in random shapes with certain limits (ie. no more then 5 squares, no less then 2).
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Okay.. Willyou do it so you can flip them 90degrees?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Okay.. well I will probably dosome kind of entry .. meantime you can check my old game bouncing ball which is somehow related to tetris:
hmm.. cant find the url... I will post it when i get home..
grimsk8ter11
Unregistered
CImg has a function for rotating images, so the up and down keys will rotate. I'll try to find an example code using CImg for people who want to learn C++ a little better, but it is rather complicated.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Yeah, well I will do my thing in VB, so i'll figure something out.
can we make it crude and use picturebox's/ simple collision detection?
I dont know the first thing about direct draw -embarassed-
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Well you can basicly just use "shape" objects, thats the easiest way. I might blit images.. not sure yet..
Dragoons Master
Unregistered
I just got into winxp(I was using 2k) so I'll do this later, but I will! I think DD will look better and I'll use VB couse I never worked w/ GFX in C++(but I can make a text Tetris, like a DOS Tetris xD).
Thats why I rarely come here now because I was just copy-pasting so I decided to make my game from scratch... and .. its hard xD
from scratch is hard but its way more rewarding. Also doing so you really learn the language and you can actually add stuff in and make a real good game. I will give this a shot if I can but I will need to look at some vb tutorials first cause i Know this is above what I know.
Working on it right now, but I'm having a bit of trouble thinking about how I'm going to do the blocks. I was thinking of generating 4 random 32*32 blocks and linking them up together randomly, but aren't there any better ways?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Well at the moment Im only using squares and rectangles, the thing Im having trouble with is to remove the bottom line, and removing a row of a shape and leaving the other part there. hehe
.. so Im in big troubles, I think I will investigate another way to fix this..
Tetris is actually pretty hard, compared to pong/asteroids/frogger/any oldtime game.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Not working as it should... try it... I tryed and failed coding it =/
Download Source: http://www.filesend.net/download.php?f= ... b53bcec61e
Image:
http://img182.imageshack.us/img182/8448/tetrisfu3.png
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
Basically all it is is having a Type per shape, creating the different shapes before hand. Then, have code checking if the different lines are completed, if they are, go through all the shape's that partake in that line and edit some of the type accrdingly. You can then use BitBlt or BltFast to create the shapes depending on what bits are missing and so forth.
Of course, it is probably much harder in practise... but I don't have time to do the challenge  Damn Math's revision...
Grrr... damn GCSE's *growl*
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Awesome, I guess I'll try a tetris clone tonight as well.. Sounds like a cool challenge!
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Yeah, but it was more difficult that I thought in the begining. I might create a new one. And hopefully that one will work.
And the download above is the source code.
Misunderstood
Unregistered
I guess I'll start a Java one  .
But you guys have a head start  .
Misunderstood
Unregistered
How many slots are there normally vertically and horizontally?
Misunderstood
Unregistered
|