at the moment it far from finished but this is what i got running so far:
- -basic opening cinematic
-gamestate's
-map draw
-player and controls
need to do:
- -collision map
-items
-enemy's
-npc
-secrets & puzzles
one of the things i am trying is to get a really optimized game map using some arrays and a way to reuse parts or even hole rooms without duplicating the data
- Code: Select all
byte walls[][4] =
{
{2,2,83,1}, //0
{2,2,1,46}, //1
{2,46,15,1}, //2
{33,47,16,1}, //3
{15,10,3,3}, //4
{15,20,3,3}, //5
{15,30,3,3}, //6
{10,10,10,10},//7
{10,10,10,10},//8
{10,10,10,10},//9
};
byte rooms[][10][2] =
{
{{0,3},{4,6},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
{{10,11},{2,3},{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,0},{0,0},{0,0},{0,0},{0,0},{0,0}},
};
void roombuilder(byte x,byte y){
for (int i = rooms[y][x][0]; i < rooms[y][x][1]; ++i)
{
gb.display.drawRect(walls[i][0],walls[i][1],walls[i][2],walls[i][3]);
}
}