본문 바로가기

PROFILE/Independent project

Triple Pang - Hexa Game / Windows based / C++, API, DirectX / JUNE. 2008




Title Triple Pang Windows version
Screen capture
Genre Puzzle Arcade Hex Game
period 2008.04~2008.05
Environment Windows XP, Visual Studio 2008
Skill C++, Windows API, DirectX, PhotoShop
contents Swap a single gem with your iPhone, scored by bombing lines in a vertical and horizontal position and get a new jewel on the top. Simple puzzle game
Source codevoid map(){
                  BeginScene();
                  for(int j=0;j<7;j++)
                                    for(int i=0,k;i<7;i++){
                                                     IMG[rand()%7]->Set(m_pD3DDev);
                                                     RectCHAR[i][j].Draw(m_pD3DDev);
                                    }
                  EndScene();
}
virtual void OnUpdateGraphic(){
                  time+=0.2;                // Timeout notification
                  if(time>=430)exit(0);
                  Change();
                  ascore[0]=nscore%10;            // Score part
                  for(int i=1,point=nscore;i<4;i++){
                                    point=point/10;
                                    if(point==0)break;
                                    ascore[i]=point%10;
                  }
                  if(nscore>=1000)     exit(0);     // Score renewal
                  RectBar.Create(m_pD3DDev, 15,time+82, 45, 517, 0xffffffff);
}