i want to create a game like BlasterBall. i have never created a game with levels before and i am wondering when the level goes up it changes.
Here is a link to a youtube video showing what BlasterBall is:
http://www.youtube.com/watch?v=xqTAY0b5V04&feature=related
i want it so like in the video it changes the level and the map. would i do this by creating a bitmap or using tilesets (are they the same i forgot) and having a difrent one for each level. if i did do that i never done collision using a bitmap/tileset.
BTW i never tested the below code.
is this how i would do collision
:#include "DarkGDK.h"
void DarkGDK() {
dbSyncOn();
dbSyncRate(60);
dbCreateAnimatedSprite(1, "tileset.png", 2, 2, 1);
int map[8][8] = {
{2, 2, 2, 2, 2, 2, 2, 2},
{1, 1, 1, 4, 4, 1, 1, 1},
{1, 1, 4, 1, 1, 4, 1, 1},
{1, 4, 1, 1, 1, 1, 4, 1},
{1, 4, 1, 1, 1, 1, 4, 1},
{1, 1, 4, 1, 1, 4, 1, 1},
{1, 1, 1, 4, 4, 1, 1, 1},
{3, 3, 3, 3, 3, 3, 3, 3}
};
while (LoopGDK()) {
dbCLS();
if(dbSpriteCollision(ball,2))
{
dbDeleteSprite(2); i know this is wrong but i dont know how else to do it
}
for (int y = 0; y < 8; ++y) {
for (int x = 0; x < 8; ++x) {
dbSetSpriteFrame(1, map[y][x]);
dbPasteSprite(1, x * 16, y * 16);
}
}
dbSync();
}
return;
}