ghost mansion

Libraries, utilities, bootloaders...

ghost mansion

Postby adekto » Sat Jul 19, 2014 9:23 am

hi this is just a bit of a dev log on one of the games i pitched way back

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]);
  }
}
User avatar
adekto
 
Posts: 448
Joined: Tue Feb 25, 2014 9:47 pm
Location: belgium

Return to Software Development

Who is online

Users browsing this forum: No registered users and 23 guests

cron