Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / help with my code.....

Author
Message
beginner98
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 10th Jul 2009 18:14 Edited at: 10th Jul 2009 18:43
here is my code, it is for a block breaker type game. (using sprites)

whats wrong with it? cos the top left block with work but the other 2 don't anyone smart enugh to figure this out?




c++ = easy GDK = IMPOSSIBLE lol
Funkbrotha10
15
Years of Service
User Offline
Joined: 2nd May 2009
Location:
Posted: 11th Jul 2009 01:13
first of all it appears as if you are trying to set the position of all of your bricks manualy. this is a complete waste of time. use a 2D array


int BlockLayout[5][5] = {{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0}};


to set the position of your blocks then loop through it using a for loop


for ( int BlockWidth = 0; BlockWidth < 5; BlockWidth++)
{
for( int BlockHeight = 0; BlockHeight < 5; BLockHeight ++)
{
if ( BlockLayout[BlockWidth][BlockHeight] == 0)
{
dbSprite.....
}
}
}

it was once said that a million monkeys at a million keyboards could re-produce the works of shakespear...
Now thanks to the internet we know that that is not true
beginner98
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 11th Jul 2009 13:45
thanks for the help, I finished it now.

c++ = easy GDK = IMPOSSIBLE lol
Funkbrotha10
15
Years of Service
User Offline
Joined: 2nd May 2009
Location:
Posted: 13th Jul 2009 04:21
and also instead of doing the whole


it was once said that a million monkeys at a million keyboards could re-produce the works of shakespear...
Now thanks to the internet we know that that is not true

Login to post a reply

Server time is: 2024-11-25 06:37:05
Your offset time is: 2024-11-25 06:37:05