hi all;
i am writing a breakout game and am having trouble with the block creation. i thought about using a class to handle the blocks but i am new to c++ and dont really understand how to use classes and arrays
[/edit]
it would help if i gave you the code i figure
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
void Populatefield( void );
void Gameupdate( void );
int NumberLives = 3;
int LevelNumber = 1;
int BALL = 1;
int BlockStartX = 350;
int BlockStartY = -250;
// the main entry point for the application is this function
void DarkGDK ( void )
{
// Set up game speed and camera
dbAutoCamOff();
dbSyncOn ( );
dbSyncRate ( 60 );
dbPositionCamera ( 0 , 0 , -500 );
dbPointCamera ( 0 , 0 , 0 );
//Set up the field
dbMakeObjectSphere ( 1 , 10 );
dbMakeObjectBox( 2 , 40 , 5 , 5 );
dbMakeObjectBox ( 3 , 800 , 10 , 10 );
dbMakeObjectBox ( 4 , 800 , 10 , 10 );
dbMakeObjectBox ( 5 , 10 , 800 , 10 );
dbMakeObjectBox ( 6 , 10 , 800 , 10);
dbPositionObject ( 3 , 0 , 300 , 0 );
dbPositionObject ( 4 , 0 , -300 , 0 );
dbPositionObject ( 5 , -400 , 0 , 0 );
dbPositionObject ( 6 , 250 , 0 , 0 );
dbPositionObject ( 2 , 0 , -290 , 0 );
dbRotateObject ( 1 , 45 , 90 , 0 );
Populatefield();
// our main loop
while ( LoopGDK ( ) )
{
// Gameupdate();
// update the screen
dbSync ( );
}
// return back to windows
return;
}
void Gameupdate()
{
dbMoveObject( 1 , 1 );
}
void Populatefield()
{
}
Artificial inteligence can not compare to natural stupidity