05.02 - Designing Tetris

Started by
23 comments, last by Teej 22 years, 8 months ago
Teej,
Thanks for the time and feedback. The blinking wasn''t especially annoying to me because I''m on a P4, although I was seeing an occasional hesitation that I attributed to drive access from other programs. It all makes more sense now, especially in light of realizing while starting Blocks and Lines (yep, I have an odd hybrid idea for this one too) that I only needed the one clear and one flip, but then neglected to go back and fix the pong game.

Hey, has anyone told you yet? You''re doing a great job here

Thanks again,
videns
EZ
Advertisement
videns: Thanks

Just a note to those who read this article before today, July 11th: the defines I gave in the article were incorrect:

WAS:

// Play Area Position
#define PLAYAREA_OFFSET_X 241
#define PLAYAREA_OFFSET_Y 33

CORRECT VALUES:

// Play Area Position
#define PLAYAREA_OFFSET_X 241
#define PLAYAREA_OFFSET_Y 97

In other words, you would have noticed your blocks starting four rows above the play area in BACKGROUND.BMP. (These values are correct in the article as of today).

Also, if you''d like to use BltFast() instead of Blt() for this project, be sure to remove all clipper code or you''ll have a blank screen -- BltFast() doesn''t work with clippers.

Teej

Teej, looks as if your webpage is down again. Either that or Angelfire is having problems.

On a note of encouragement, things are great so far. Even though things seem to be slowing down a bit conversation-wise, keep motivated because we all appreciate what you''re doing with this forum. Thanks a bunch.
PiotyrSoftware Engineer by day, Game developer by nightThe early bird may get the worm, but the second mouse gets the cheese.
Well, it''s not much, but here''s what an hour of boredom will do for a background:

Background3b.bmp

If people are having trouble downloading the basecode files, I can put them up later as well.
PiotyrSoftware Engineer by day, Game developer by nightThe early bird may get the worm, but the second mouse gets the cheese.
Hi all,
Teej, when I use your website link it takes me to a huge page of links and I can''t get at that all important Basecode3...(Fantastic forum by the way - but you already knew that!)

Piotyr - if you could add the basecode files to your site as an alternative I''d be eternally grateful..(nice job on the blocks background).
Piotry''s right Teej, the convos may have died down a bit recently but you''re doin a great job.. keep it up. I (and I guess everyone else) am learning a lot from this.

Unfortunately, theres gonna be even less chat now cos Im off. And I wont be able to participate in this great forum for another 5 weeks Oh well not all bad, Im off to S.Africa.

Hopefully I will be able to catch up when I get back, but if not Ive still learnt a lot.

What this does mean is that if anymore people want a copy of my top down shooter, they should e-mail me quickly... trust me it will give you some big clues if you are stuck with the Tetris clone challenge.


Till Next Time,
Crash,





We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success
"We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success." - 2000"If You Keep Looking Forward Your Gonna End Up Looking Backwards At Yourself Running Sideways!" - 2001
OK, by popular demand, I put the basecode files up on my ftp as well, including the images for this Blocks ''n Lines section.

Basecode1.zip

Basecode2.zip

Basecode3.zip

Zip of images for 05.02

If for some reason, they aren''t working, just e-mail me and I should be able to get them working shortly.

Piotyr
Software Engineer by day, Game developer by night

The early bird may get the worm, but the second mouse gets the cheese.
PiotyrSoftware Engineer by day, Game developer by nightThe early bird may get the worm, but the second mouse gets the cheese.
Ok Ok, I give up. Can someone give me a hint on setting up the directdraw surface in INITTERM? I dont think I''ve quite got the hang of DX yet!
nmoog:

You should probably go back and review the material in the 04.0x series of articles and ask your questions about DirectDraw there (where they would be more relevant to the topic). Also, it would help if your question was a bit more specific.
Hey all,

I am having a bit of trouble with the organization of my files. I guess I don't fully understand header files. My problem is this -- I wrote a couple of structs to hold info for various objects in my game. I put them in a header file and then expected to be able to use them in my Game_Main file. Well, Game main doesn't recognize them, so I think that I have to use the extern keyword. Is this the correct way to do this:

/*In ball.h*/
typedef struct ball {
int ypos;
int xpos;
int dy;
int dx;
} ball;

/*In GameMain.cpp*/
extern ball myball;

When I looked at Teej's Global.h, I noticed that he did not have to use extern in the main program, but I am not sure why. I am guessing it has something to do with

#ifndef GLOBALS_OWNERSHIP
extern
#endif

but I can't figure out exactly how this works. It appears that this code allows him to only declare the "G" type once and then use it freely throughout his code without ever having to declare it locally. Can anyone explain in a bit more detail?

Thanx,

The Commissioner

P.S. sorry about posting this here, it is just because my questions were a result of working on the tetris/pong clone. I will choose where to post more wisely next time


Edited by - Commissioner on July 16, 2001 9:47:41 AM
__^__                                         /(o o)======================================oOO==(_)==OOo==========================A picture may be worth a thousand words but it also uses up a thousandtimes more computer memory.

This topic is closed to new replies.

Advertisement