![]() |
A Challenge! - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: A Challenge! (/showthread.php?tid=260) |
- grimsk8ter11 - 23-08-2006 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 - 23-08-2006 grimsk8ter11 Wrote:So in response to daves challenge, ill offer a little help. He did the same to me!!! - William - 23-08-2006 How many pieces should it have ? - grimsk8ter11 - 23-08-2006 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). - William - 23-08-2006 Okay.. Willyou do it so you can flip them 90degrees? - William - 23-08-2006 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 - 23-08-2006 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. - Joost - 23-08-2006 Is this a contest? - William - 23-08-2006 Yeah, well I will do my thing in VB, so i'll figure something out. - Coke - 23-08-2006 can we make it crude and use picturebox's/ simple collision detection? - Coke - 23-08-2006 I dont know the first thing about direct draw -embarassed- - William - 24-08-2006 Well you can basicly just use "shape" objects, thats the easiest way. I might blit images.. not sure yet.. - Dragoons Master - 24-08-2006 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). - Krloz - 24-08-2006 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 - halla - 24-08-2006 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. - Joost - 25-08-2006 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? - William - 25-08-2006 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.. - Joost - 25-08-2006 Tetris is actually pretty hard, compared to pong/asteroids/frogger/any oldtime game. - William - 25-08-2006 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 - Robin - 25-08-2006 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 ![]() Grrr... damn GCSE's *growl* - William - 25-08-2006 Awesome, I guess I'll try a tetris clone tonight as well.. Sounds like a cool challenge! - William - 26-08-2006 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 - 26-08-2006 I guess I'll start a Java one ![]() But you guys have a head start ![]() - Misunderstood - 26-08-2006 How many slots are there normally vertically and horizontally? - Misunderstood - 26-08-2006 I set it to 30x60 xD |