Jump to content

  • Log In with Google      Sign In   
  • Create Account


Konrad Jablonski

Member Since 11 Jun 2012
Offline Last Active Sep 04 2014 09:09 AM

#5078292 Flash or Game Maker? Starting point to game development

Posted by Konrad Jablonski on 16 July 2013 - 04:43 PM

I never used Game Maker, but I think flash would be good starting point. You can do some action script and get used to coding.

 

On other hand if you seriously want to get into game industry and professional game development. Learning C++ would be best you can do. I went straight to C++ and I turned out fine... I think.

Problem with C++ you will be playing with console without seeing any cool results for few weeks before you know more about it. So it could be hard to stay motivated. 

If you are going for C++ approach, definitely invest into a some beginners C++ book! It's definitely more hardcore approach.

 

Awesome vid explaining how to get into game development.

http://www.youtube.com/watch?v=zAgpsks29W4




#5074999 learned c++, now what?

Posted by Konrad Jablonski on 03 July 2013 - 05:23 AM

LazyFoo is great like mentioned before.

 

I would also watch few parts of these tutorials. That's at least how I started with SDL smile.png

http://www.youtube.com/watch?v=E4RqHtEAAds

 

Note* those tutorials are for SDL1.2. New SDL2.0 has a little bit different functionality, but nothing to drastic. I would still stick with SDL1.2 because it has more tutorials/support online at this moment.

 

good luck smile.png




#5074498 Games by younger me

Posted by Konrad Jablonski on 01 July 2013 - 12:36 PM

This is gonna be hard to beat, but look at my first games Menu.h file :P This was written about 3 years ago as well :P The funny part, game works perfectly fine here is a video of it http://www.youtube.com/watch?v=4y-5io98vys

int CampControls()
{
  if ( CharacterMenuOpen == false)
  {
  if (EnterShop == false)
  {
  if ( MapMenuOpen == false)
  {    
  if (menu == 1) 
  {
   if (Battle == false)
   {
       if (key[SDLK_DOWN])
       {
        if (campDownKey == 1)
        {
          if (CampCursorCord.y != 544)
          {
             CampCursorCord.y = CampCursorCord.y + 39;
             campDownKey = 2;
               Mix_PlayChannel(2, MenuChoice, 0);
          }  
          }
       }
       if (!key[SDLK_DOWN])
       {
           campDownKey = 1;
       }
       
       if (key[SDLK_UP])
       {
        if(campUpKey == 1)
        {
          if (CampCursorCord.y != 388) 
          {           
             CampCursorCord.y = CampCursorCord.y - 39;
                Mix_PlayChannel(2, MenuChoice, 0);
          }
          campUpKey = 2;
          }
        }
        if (!key[SDLK_UP])
        {
           campUpKey =1;
        }
        
        
       if (key[SDLK_RETURN])
       {
                if (campEnterKey == 1)
             {
        if (active == false)
        {
           if (CampCursorCord.y == 388)
           {
              Find1 = true;
               Mix_PlayChannel(2, MenuChoice, 0);
               MapMenuOpen = true;
                 campEnterKey = 2; 
              CampCursorCord.y = 542;
           }
           if (CampCursorCord.y == 427)
           {//char  stats
                 Mix_PlayChannel(2, MenuChoice, 0);
             CharacterMenuOpen = true;
             CampCursorCord.y = 494;
             campEnterKey = 2;
           }
           if (CampCursorCord.y == 466)
           {
                  Mix_PlayChannel(2, MenuChoice, 0);
                  CampCursorCord.y = 503;
           //Shop
           EnterShop = true;
             campEnterKey = 2;
           }
           if (CampCursorCord.y == 505)
           {
              RestCheck = gold - RestCost;
              if (RestCheck >= 0)
              {
              StopCampM = true;
               Mix_PlayChannel(-1, NightToDay, 0);
            // Mix_HaltMusic();
              active = true;
              campEnterKey = 2;
              }
              else
              Mix_PlayChannel(2, MenuChoice, 0);
           }
           if (CampCursorCord.y == 544)
           {
              Mix_PlayChannel(2, MenuChoice, 0);
              CampCursorCord.y = 495;
              menu = 2;
              campEnterKey = 2;
           }
           }

           }
         }
                     if (!key[SDLK_RETURN])
         {
            campEnterKey = 1;
         }
       }
       }
   }   
}
}

if ((EnterBuy == false) && (EnterSell == false))
{
if (EnterShop == true)
{
   SDL_BlitSurface (BuySellChoice, NULL, screen, &BuySellChoiceCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
         if (campUpKey == 1)
         {
           if (key[SDLK_UP])
           {
              if (CampCursorCord.y > 423)
              {
              Mix_PlayChannel(2, MenuChoice, 0);
              CampCursorCord.y = CampCursorCord.y - 40;
              campUpKey = 2;
              }
           }
         }
         if (!key[SDLK_UP])
         {
            campUpKey = 1;
         }
         
         if (campDownKey == 1)
         {
           if (key[SDLK_DOWN])
           {
             if (CampCursorCord.y < 503)
             {
              Mix_PlayChannel(2, MenuChoice, 0);
              CampCursorCord.y = CampCursorCord.y + 40;
              campDownKey = 2;
              }
           }
         }
         if (!key[SDLK_DOWN])
         {
            campDownKey = 1;
         }
         
         if (campEnterKey == 1)
         {
           if (key[SDLK_RETURN])
           {
             if (CampCursorCord.y == 423)
             {
              //buy
              EnterBuy = true;
              CampCursorCord.y = 507;
              Mix_PlayChannel(2, MenuChoice, 0);
              campEnterKey = 2;
             }
             if (CampCursorCord.y ==463)
             {
             //sell
             EnterSell = true;
             CampCursorCord.y = 507;
               Mix_PlayChannel(2, MenuChoice, 0);
              campEnterKey = 2;                  
             }
             if( CampCursorCord.y == 503)
             {
             //back
             Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = 466;
             EnterShop = false;                    
             campEnterKey = 2;
            }
           }
         }
         if (!key[SDLK_RETURN])
         {
            campEnterKey = 1;
         }
}
}

if (EnterBuyEquipment == false)
{
if (EnterBuy == true)
{
   SDL_BlitSurface (EquipmentItemsChoice, NULL, screen, &EquipmentItemsChoiceCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
    BuyTxt = TTF_RenderText_Solid(MinionProBold2, "Buy", NormalColor);
    SDL_BlitSurface(BuyTxt,NULL,screen, &BuyTxtCord);

       if (campUpKey == 1)
       {
         if (key[SDLK_UP])
         {
             if (CampCursorCord.y > 429)
             {
              Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = CampCursorCord.y - 39;
             campUpKey = 2;
             }
         }
       }
       if (!key[SDLK_UP])
       {
        campUpKey = 1;
       }
       
       if (campDownKey == 1)
       {
         if (key[SDLK_DOWN])
         {   
             if (CampCursorCord.y < 507)
             {
              Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = CampCursorCord.y + 39;
             campDownKey = 2;
             }
         }
       }
       if (!key[SDLK_DOWN])
       {
        campDownKey = 1;
       }
       
         if (campEnterKey == 1)
         {
           if (key[SDLK_RETURN])
           {         
                   if (CampCursorCord.y == 429)
                  {
                  // buy equipment
                  EnterBuyEquipment = true;
                 CampCursorCord.y = 501;
                   CampCursorCord.x = 96;
                  Mix_PlayChannel(2, MenuChoice, 0);
                  campEnterKey = 2;                 
             }
             if (CampCursorCord.y == 468)
             {
                 //buy items
                  Mix_PlayChannel(2, MenuChoice, 0);
                  campEnterKey = 2;    
             }
             if (CampCursorCord.y == 507)
             {
             //back
             Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = 423;
             EnterBuy = false;
             EnterShop = true;                    
             campEnterKey = 2;
             }
           }
         }
         if (!key[SDLK_RETURN])
         {
            campEnterKey = 1;
         }
}
}

if (EnterSellEquipment == false)
{
if (EnterSell == true)
{
   SDL_BlitSurface (EquipmentItemsChoice, NULL, screen, &EquipmentItemsChoiceCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
   SellTxt = TTF_RenderText_Solid(MinionProBold2, "Sell", NormalColor);
   SDL_BlitSurface(SellTxt,NULL,screen, &SellTxtCord);
    if (campUpKey == 1)
       {
         if (key[SDLK_UP])
         {
             if (CampCursorCord.y > 429)
             {
              Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = CampCursorCord.y - 39;
             campUpKey = 2;
             }
         }
       }
       if (!key[SDLK_UP])
       {
        campUpKey = 1;
       }
       
       if (campDownKey == 1)
       {
         if (key[SDLK_DOWN])
         {   
             if (CampCursorCord.y < 507)
             {
              Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = CampCursorCord.y + 39;
             campDownKey = 2;
             }
         }
       }
       if (!key[SDLK_DOWN])
       {
        campDownKey = 1;
       }
            if (campEnterKey == 1)
         {
           if (key[SDLK_RETURN])
           {
             if (CampCursorCord.y == 429)
             {
                  // sell equipment
                   EnterSellEquipment = true;
                   CampCursorCord.y = 501;
                   CampCursorCord.x = 96;
                  Mix_PlayChannel(2, MenuChoice, 0);
                  campEnterKey = 2;                 
             }
             if (CampCursorCord.y == 468)
             {
                 //sell items
                  Mix_PlayChannel(2, MenuChoice, 0);
                  campEnterKey = 2;  
             }
              if (CampCursorCord.y == 507)
             {
             //back
             Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = 463;
             EnterSell = false;
             EnterShop = true;                    
             campEnterKey = 2;
           }
           }
         }
         if (!key[SDLK_RETURN])
         {
            campEnterKey = 1;
         }
}
}

if (EnterBuyEquipment == true)
{
   SDL_BlitSurface (BuyEquipment, NULL, screen, &BuySellEquipmentCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
   BuyTxt = TTF_RenderText_Solid(MinionProBold, "Buy", NormalColor);
   SDL_BlitSurface(BuyTxt,NULL,screen, &SellTxt2Cord);
    if (CampCursorCord.y == 467)
    { //Beginner gear 
      BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      
      LeatherSetFound = TTF_RenderText_Solid(MinionPro, "Leather Set", NormalColor);
      SDL_BlitSurface(LeatherSetFound,NULL,screen, &Buy1Cord);
      
      LeatherPrice = TTF_RenderText_Solid(MinionPro, "30", GoldColor);
      SDL_BlitSurface(LeatherPrice,NULL,screen, &Price1Cord);
       
      RustyDaggerFound =TTF_RenderText_Solid(MinionPro, "Rusty Dagger", NormalColor);
      SDL_BlitSurface(RustyDaggerFound, NULL, screen, &Buy2Cord);
      
      RustyDaggerPrice = TTF_RenderText_Solid(MinionPro, "20", GoldColor);
      SDL_BlitSurface(RustyDaggerPrice,NULL,screen, &Price2Cord);
      
      DaggerFound =TTF_RenderText_Solid(MinionPro, "Dagger", NormalColor);
      SDL_BlitSurface(DaggerFound, NULL, screen, &Buy3Cord);
      
      DaggerPrice =TTF_RenderText_Solid(MinionPro, "50", GoldColor);
      SDL_BlitSurface(DaggerPrice, NULL, screen, &Price3Cord);
    } 
    if (CampCursorCord.y == 433)
    { 
    if (CurrentLevel >= 5)
    {
                         // apprentice
     PoisonSwordFound =TTF_RenderText_Solid(MinionPro, "Poison Sword", NormalColor);
     SDL_BlitSurface(PoisonSwordFound, NULL, screen, &Buy3Cord);
          
      PoisonSwordPrice =TTF_RenderText_Solid(MinionPro, "250", GoldColor);
      SDL_BlitSurface(PoisonSwordPrice, NULL, screen, &Price3Cord);
      
     ShadowRobeFound =TTF_RenderText_Solid(MinionPro, "Shadow Robe", NormalColor);
     SDL_BlitSurface(ShadowRobeFound, NULL, screen, &Buy2Cord);
          
     ShadowRobePrice =TTF_RenderText_Solid(MinionPro, "300", GoldColor);
      SDL_BlitSurface(ShadowRobePrice, NULL, screen, &Price2Cord);
      
     RockPlateFound =TTF_RenderText_Solid(MinionPro, "Rock Plate", NormalColor);
     SDL_BlitSurface(RockPlateFound, NULL, screen, &Buy1Cord);
     
          RockPlatePrice =TTF_RenderText_Solid(MinionPro, "250", GoldColor);
      SDL_BlitSurface(RockPlatePrice, NULL, screen, &Price1Cord);     
     
     
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
     SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
     }
     if (CurrentLevel < 5)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
    if (CampCursorCord.y == 399)
    {
    if (CurrentLevel >= 15)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 15)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
    if (CampCursorCord.y == 365)
    {
    if (CurrentLevel >=20)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
    }
         if (CurrentLevel < 20)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
   }

    if (CampCursorCord.y == 331)
    {
        if (CurrentLevel >=25)
    {
    BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 25)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
    if (CampCursorCord.y == 297)
    {
      if (CurrentLevel >=30)
      {
        BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
        SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 30)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    if (CampCursorCord.y == 263)
    {
    if (CurrentLevel >= 35)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 35)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    if ((EnterApprentice == false) && (EnterBeginner == false))
    {
    
     if (campUpKey == 1)
     {
       if (key[SDLK_UP])
       {
          if (CampCursorCord.y > 263)
          {
           Mix_PlayChannel(2, MenuChoice, 0);
          CampCursorCord.y = CampCursorCord.y - 34;
          campUpKey = 2;
          }
       }
     }
     if (!key[SDLK_UP])
     {
       campUpKey = 1;
     }
     if (campDownKey == 1)
     {
        if (key[SDLK_DOWN])
        {
           if (CampCursorCord.y < 501)
           {
            Mix_PlayChannel(2, MenuChoice, 0);
           CampCursorCord.y = CampCursorCord.y + 34;
           campDownKey = 2;
           }
        }
     }
     if (!key[SDLK_DOWN])
     {
      campDownKey = 1;
     }
     
     if (campEnterKey == 1)
     {
       if (key[SDLK_RETURN])
       {
                   if (CampCursorCord.y == 433)
                   {
                    if (CurrentLevel >= 5)
                    {
                    EnterApprentice = true;
                    Cursor5Cord.x = 290;
                    Cursor5Cord.y = 453;
                    campEnterKey = 2;
                    Mix_PlayChannel(2, MenuChoice, 0);
                    }
                   }
                   if (CampCursorCord.y == 467)
                   {
                      //beginner
                      EnterBeginner = true;
                      campEnterKey = 2;
                      Cursor5Cord.x = 290;
                      Cursor5Cord.y = 453;
                      Mix_PlayChannel(2, MenuChoice, 0);
                   }   
                   
        if (CampCursorCord.y == 501)
        {
        CampCursorCord.x = 278;
        CampCursorCord.y = 429;
        EnterBuyEquipment = false;
        campEnterKey = 2;
        }
       }
     }
     if (!key[SDLK_RETURN])
     {
       campEnterKey = 1;
     }
     }
}

if (EnterBeginner == true)
{
   SDL_BlitSurface (Cursor3, NULL, screen, &Cursor5Cord); 
   if (campUpKey == 1)
   {
      if (key[SDLK_UP])
      {
         if (Cursor5Cord.y > 231)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
          Cursor5Cord.y = Cursor5Cord.y - 37;
          campUpKey = 2;
         }
      }
   }
   if (!key[SDLK_UP])
   {
   campUpKey = 1;
   }
   
   if (campDownKey == 1)
   {
      if (key[SDLK_DOWN])
      {
         if (Cursor5Cord.y < 453)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
         Cursor5Cord.y = Cursor5Cord.y +37;
         campDownKey = 2;
         }
      }
   }
   if (!key[SDLK_DOWN])
   {
      campDownKey = 1;
   }
   
   if (campEnterKey == 1)
   {
     if(key[SDLK_RETURN])
     {
       if (Cursor5Cord.y == 342)
       {
         //dagger
         Price = gold - 50;
         if (Price >=0)
         {
         gold = gold - 50;
         FoundDagger++;
         campEnterKey = 2;
         Mix_PlayChannel(3, MoneySound, 0);
         }
       }
       if (Cursor5Cord.y == 379)
       {
         // rusty dagger
         Price = gold - 20;
         if (Price >=0)
         {
         gold = gold - 20;
         FoundRustyDagger++;
         campEnterKey = 2;
         Mix_PlayChannel(3, MoneySound, 0);
         }
       }
       if (Cursor5Cord.y == 416)
       {
        // Leather Set
        Price = gold - 30;
        if (Price >= 0)
        {
        gold = gold - 30;
        FoundLeather++;
        campEnterKey = 2;
        Mix_PlayChannel(3, MoneySound, 0);
        }
       }
       if (Cursor5Cord.y == 453)
       {
         EnterBeginner = false;
         campEnterKey = 2;
       }
     }
   }
   if (!key[SDLK_RETURN])
   {
    campEnterKey = 1;
   }
}

if (EnterApprentice == true)
{
   SDL_BlitSurface (Cursor3, NULL, screen, &Cursor5Cord); 
   if (campUpKey == 1)
   {
      if (key[SDLK_UP])
      {
         if (Cursor5Cord.y > 231)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
          Cursor5Cord.y = Cursor5Cord.y - 37;
          campUpKey = 2;
         }
      }
   }
   if (!key[SDLK_UP])
   {
   campUpKey = 1;
   }
   
   if (campDownKey == 1)
   {
      if (key[SDLK_DOWN])
      {
         if (Cursor5Cord.y < 453)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
         Cursor5Cord.y = Cursor5Cord.y +37;
         campDownKey = 2;
         }
      }
   }
   if (!key[SDLK_DOWN])
   {
      campDownKey = 1;
   }
   
   if (campEnterKey == 1)
   {
     if(key[SDLK_RETURN])
     {
               if (Cursor5Cord.y == 342)
       {
         // Poison Sword
         Price = gold - 250;
         if (Price >=0)
         {
         gold = gold - 250;
         FoundPoisonSword++;
         campEnterKey = 2;
         Mix_PlayChannel(3, MoneySound, 0);
         }
       }
       if (Cursor5Cord.y == 379)
       {
         // ShadowRobe
         Price = gold - 300;
         if (Price >=0)
         {
         gold = gold - 300;
         FoundShadowRobe++;
         campEnterKey = 2;
         Mix_PlayChannel(3, MoneySound, 0);
         }
       }            
        if (Cursor5Cord.y == 416)
       {
        // Rock Plate
        Price = gold - 250;
        if (Price >= 0)
        {
        gold = gold - 250;
        FoundRockPlate++;
        campEnterKey = 2;
        Mix_PlayChannel(3, MoneySound, 0);
        }
       }                  
                         
       if (Cursor5Cord.y == 453)
       {
         EnterApprentice = false;
         campEnterKey = 2;
       }
     }
   }
   if (!key[SDLK_RETURN])
   {
    campEnterKey = 1;
   }
}



if (EnterSellEquipment == true)
{
   SDL_BlitSurface (BuyEquipment, NULL, screen, &BuySellEquipmentCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);   
   SellTxt = TTF_RenderText_Solid(MinionProBold, "Sell", NormalColor);
   SDL_BlitSurface(SellTxt,NULL,screen, &SellTxt2Cord);
    if (CampCursorCord.y == 467)
    { //SELL Beginner gear 
      BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      if (FoundLeather > 0)
      {
      LeatherSetFound = TTF_RenderText_Solid(MinionPro, "Leather Set", NormalColor);
      SDL_BlitSurface(LeatherSetFound,NULL,screen, &Buy1Cord);
      LeatherPrice = TTF_RenderText_Solid(MinionPro, "15", GoldColor);
      SDL_BlitSurface(LeatherPrice,NULL,screen, &Price1Cord);

 ostringstream Leatherconvert2;
 Leatherconvert2 << FoundLeather;
 LeatherTotalTxt = Leatherconvert2.str(); 
 const char * LeatherTotalConst = LeatherTotalTxt.c_str();
 delete[] LeatherTotalConst;
 LeatherTotalImg = TTF_RenderText_Solid(MinionPro, LeatherTotalConst ,NormalColor);
 SDL_BlitSurface(LeatherTotalImg,NULL,screen,&Quan1Cord); 
      }
      if (FoundRustyDagger > 0)
      {
      RustyDaggerFound =TTF_RenderText_Solid(MinionPro, "Rusty Dagger", NormalColor);
      SDL_BlitSurface(RustyDaggerFound, NULL, screen, &Buy2Cord);
      RustyDaggerPrice = TTF_RenderText_Solid(MinionPro, "7", GoldColor);
      SDL_BlitSurface(RustyDaggerPrice,NULL,screen, &Price2Cord);
 
     ostringstream  RustyDaggerTotal2Convert;
 RustyDaggerTotal2Convert <<   FoundRustyDagger;
 RustyDaggerTotalTxt = RustyDaggerTotal2Convert.str(); 
 const char * RustyDaggerTotalConst = RustyDaggerTotalTxt.c_str();
 delete[] RustyDaggerTotalConst;
 RustyDaggerTotalImg = TTF_RenderText_Solid(MinionPro, RustyDaggerTotalConst ,NormalColor);
 SDL_BlitSurface(RustyDaggerTotalImg,NULL,screen,&Quan2Cord);  
}
      if (FoundDagger > 0)
      {
      DaggerFound =TTF_RenderText_Solid(MinionPro, "Dagger", NormalColor);
      SDL_BlitSurface(DaggerFound, NULL, screen, &Buy3Cord);
      DaggerPrice =TTF_RenderText_Solid(MinionPro, "20", GoldColor);
      SDL_BlitSurface(DaggerPrice, NULL, screen, &Price3Cord);

      ostringstream  DaggerTotal2Convert;
 DaggerTotal2Convert <<   FoundDagger;
 DaggerTotalTxt = DaggerTotal2Convert.str(); 
 const char * DaggerTotalConst = DaggerTotalTxt.c_str();
 delete[] DaggerTotalConst;
 DaggerTotalImg = TTF_RenderText_Solid(MinionPro, DaggerTotalConst ,NormalColor);
 SDL_BlitSurface(DaggerTotalImg,NULL,screen,&Quan3Cord); 
      }
      if (FoundGoberion > 0)
      {
      GoberionFound = TTF_RenderText_Solid(MinionPro, "Goberion's Set", UniqueColor);   
      SDL_BlitSurface(GoberionFound, NULL, screen, &Buy4Cord);
      GoberionPrice =TTF_RenderText_Solid(MinionPro, "50", GoldColor);
      SDL_BlitSurface(GoberionPrice, NULL, screen, &Price4Cord);
      
   ostringstream Goberion3Convert;
 Goberion3Convert << FoundGoberion;
 GoberionTotalTxt = Goberion3Convert.str(); 
 const char * GoberionTotalConst = GoberionTotalTxt.c_str();
 delete[] GoberionTotalConst;
 GoberionTotalImg = TTF_RenderText_Solid(MinionPro, GoberionTotalConst ,NormalColor);
 SDL_BlitSurface(GoberionTotalImg,NULL,screen,&Quan4Cord); 
      }
      if (FoundGoldenFang > 0)
      {
      GoldenFangFound2 = TTF_RenderText_Solid(MinionPro, "Golden Fang", UniqueColor);   
      SDL_BlitSurface(GoldenFangFound2, NULL, screen, &Buy5Cord);
      GoldenFangPrice =TTF_RenderText_Solid(MinionPro, "60", GoldColor);
      SDL_BlitSurface(GoldenFangPrice, NULL, screen, &Price5Cord);

    ostringstream  GoldenFangTotal2Convert;
 GoldenFangTotal2Convert <<   FoundGoldenFang;
 GoldenFangTotalTxt = GoldenFangTotal2Convert.str(); 
 const char * GoldenFangTotalConst = GoldenFangTotalTxt.c_str();
 delete[] GoldenFangTotalConst;
 GoldenFangTotalImg = TTF_RenderText_Solid(MinionPro, GoldenFangTotalConst ,NormalColor);
 SDL_BlitSurface(GoldenFangTotalImg,NULL,screen,&Quan5Cord); 
      }
    } 
    if (CampCursorCord.y == 433)
    { 
     if (CurrentLevel >= 5)
    {
                         // apprentice
      if (FoundQuickBlade > 0)
      {
      QuickBladeFound2 = TTF_RenderText_Solid(MinionPro, "Quick Blade", UniqueColor);   
      SDL_BlitSurface(QuickBladeFound2, NULL, screen, &Buy5Cord);
      QuickBladePrice =TTF_RenderText_Solid(MinionPro, "170", GoldColor);
      SDL_BlitSurface(QuickBladePrice, NULL, screen, &Price5Cord);
 
  ostringstream  QuickBladeTotal2Convert;
QuickBladeTotal2Convert <<   FoundQuickBlade;
 QuickBladeTotalTxt = QuickBladeTotal2Convert.str(); 
 const char * QuickBladeTotalConst = QuickBladeTotalTxt.c_str();
 delete[] QuickBladeTotalConst;
 QuickBladeTotalImg = TTF_RenderText_Solid(MinionPro, QuickBladeTotalConst ,NormalColor);
 SDL_BlitSurface(QuickBladeTotalImg,NULL,screen,&Quan5Cord); 
      }
      if ( FoundRockiansPlate > 0)
      {
      RockiansPlateFound = TTF_RenderText_Solid(MinionPro, "Rockians Plate", UniqueColor);   
      SDL_BlitSurface(RockiansPlateFound, NULL, screen, &Buy4Cord);
      RockiansPlatePrice =TTF_RenderText_Solid(MinionPro, "150", GoldColor);
      SDL_BlitSurface(RockiansPlatePrice, NULL, screen, &Price4Cord);
      
      ostringstream RockianPlateTotal2Convert;
 RockianPlateTotal2Convert <<  FoundRockiansPlate;
 RockianPlateTotalTxt = RockianPlateTotal2Convert.str(); 
 const char * RockianPlateTotalConst = RockianPlateTotalTxt.c_str();
 delete[] RockianPlateTotalConst;
 RockianPlateTotalImg = TTF_RenderText_Solid(MinionPro, RockianPlateTotalConst ,NormalColor);
 SDL_BlitSurface(RockianPlateTotalImg,NULL,screen,&Quan4Cord);  
      }
     if (FoundPoisonSword > 0 )
     {
     PoisonSwordFound =TTF_RenderText_Solid(MinionPro, "Poison Sword", NormalColor);
     SDL_BlitSurface(PoisonSwordFound, NULL, screen, &Buy3Cord);
      PoisonSwordPrice =TTF_RenderText_Solid(MinionPro, "70", GoldColor);
      SDL_BlitSurface(PoisonSwordPrice, NULL, screen, &Price3Cord);
      
     ostringstream  PoisonSwordTotal2Convert;
 PoisonSwordTotal2Convert <<   FoundPoisonSword;
 PoisonSwordTotalTxt = PoisonSwordTotal2Convert.str(); 
 const char * PoisonSwordTotalConst = PoisonSwordTotalTxt.c_str();
 delete[] PoisonSwordTotalConst;
 PoisonSwordTotalImg = TTF_RenderText_Solid(MinionPro, PoisonSwordTotalConst ,NormalColor);
 SDL_BlitSurface(PoisonSwordTotalImg,NULL,screen,&Quan3Cord); 
      }
      if (FoundShadowRobe > 0)
      {
     ShadowRobeFound =TTF_RenderText_Solid(MinionPro, "Shadow Robe", NormalColor);
     SDL_BlitSurface(ShadowRobeFound, NULL, screen, &Buy2Cord);
     ShadowRobePrice =TTF_RenderText_Solid(MinionPro, "100", GoldColor);
      SDL_BlitSurface(ShadowRobePrice, NULL, screen, &Price2Cord);
      
      ostringstream  ShadowRobeTotal2Convert;
 ShadowRobeTotal2Convert <<   FoundShadowRobe;
 ShadowRobeTotalTxt = ShadowRobeTotal2Convert.str(); 
 const char * ShadowRobeTotalConst = ShadowRobeTotalTxt.c_str();
 delete[] ShadowRobeTotalConst;
 ShadowRobeTotalImg = TTF_RenderText_Solid(MinionPro, ShadowRobeTotalConst ,NormalColor);
 SDL_BlitSurface(ShadowRobeTotalImg,NULL,screen,&Quan2Cord);  
      }
      if (FoundRockPlate > 0)
      {
     RockPlateFound =TTF_RenderText_Solid(MinionPro, "Rock Plate", NormalColor);
     SDL_BlitSurface(RockPlateFound, NULL, screen, &Buy1Cord);
          RockPlatePrice =TTF_RenderText_Solid(MinionPro, "70", GoldColor);
      SDL_BlitSurface(RockPlatePrice, NULL, screen, &Price1Cord);  
 
    ostringstream RockPlateTotal2Convert;
 RockPlateTotal2Convert << FoundRockPlate;
 RockPlateTotalTxt = RockPlateTotal2Convert.str(); 
 const char * RockPlateTotalConst = RockPlateTotalTxt.c_str();
 delete[] RockPlateTotalConst;
 RockPlateTotalImg = TTF_RenderText_Solid(MinionPro, RockPlateTotalConst ,NormalColor);
 SDL_BlitSurface(RockPlateTotalImg,NULL,screen,&Quan1Cord);     
      }
     
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
     SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
     if (CurrentLevel < 5)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
    }
    }
    
    
      if (CampCursorCord.y == 399)
    {
    if (CurrentLevel >= 15)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 15)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
    if (CampCursorCord.y == 365)
    {
    if (CurrentLevel >=20)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
    }
         if (CurrentLevel < 20)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
   }

    if (CampCursorCord.y == 331)
    {
        if (CurrentLevel >=25)
    {
    BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 25)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
    if (CampCursorCord.y == 297)
    {
      if (CurrentLevel >=30)
      {
        BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
        SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 30)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    if (CampCursorCord.y == 263)
    {
    if (CurrentLevel >= 35)
    {
     BackTxt = TTF_RenderText_Solid(MinionProBold, "Back", NormalColor);   
      SDL_BlitSurface(BackTxt, NULL, screen, &BackTxtCord);
      }
      if (CurrentLevel < 35)
     {
     TooLowTxt = TTF_RenderText_Solid(MinionProBold, "Too low level.", BossColor);   
     SDL_BlitSurface(TooLowTxt, NULL, screen, &TooLowCord);
     }
    }
    
    
   if ((SellBeginner == false) && (SellApprentice == false))
   {
     if (campUpKey == 1)
     {
       if (key[SDLK_UP])
       {
          if (CampCursorCord.y > 263)
          {
           Mix_PlayChannel(2, MenuChoice, 0);
          CampCursorCord.y = CampCursorCord.y - 34;
          campUpKey = 2;
          }
       }
     }
     if (!key[SDLK_UP])
     {
       campUpKey = 1;
     }
     if (campDownKey == 1)
     {
        if (key[SDLK_DOWN])
        {
           if (CampCursorCord.y < 501)
           {
            Mix_PlayChannel(2, MenuChoice, 0);
           CampCursorCord.y = CampCursorCord.y + 34;
           campDownKey = 2;
           }
        }
     }
     if (!key[SDLK_DOWN])
     {
      campDownKey = 1;
     }
     
        if (campEnterKey == 1)
     {
       if (key[SDLK_RETURN])
       {
                            if (CampCursorCord.y == 433)
                   {
                    if (CurrentLevel >= 5)
                    {
                    SellApprentice = true;
                    Cursor5Cord.x = 290;
                    Cursor5Cord.y = 453;
                    campEnterKey = 2;
                    Mix_PlayChannel(2, MenuChoice, 0);
                    }
                   }
                   if (CampCursorCord.y == 467)
                   {
                      //sell beginner
                      SellBeginner = true;
                      campEnterKey = 2;
                      Cursor5Cord.x = 290;
                      Cursor5Cord.y = 453;
                      Mix_PlayChannel(2, MenuChoice, 0);
                   }   
                   
         if (CampCursorCord.y == 501)
         {
         CampCursorCord.x = 278;
         CampCursorCord.y = 429;
         EnterSellEquipment = false;
         campEnterKey = 2;
         }
       }
     }
     if (!key[SDLK_RETURN])
     {
       campEnterKey = 1;
     }       
     }        
}

if (SellBeginner == true)
{
 SDL_BlitSurface (Cursor3, NULL, screen, &Cursor5Cord); 
   if (campUpKey == 1)
   {
      if (key[SDLK_UP])
      {
         if (Cursor5Cord.y > 231)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
          Cursor5Cord.y = Cursor5Cord.y - 37;
          campUpKey = 2;
         }
      }
   }
   if (!key[SDLK_UP])
   {
   campUpKey = 1;
   }
   
   if (campDownKey == 1)
   {
      if (key[SDLK_DOWN])
      {
         if (Cursor5Cord.y < 453)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
         Cursor5Cord.y = Cursor5Cord.y +37;
         campDownKey = 2;
         }
      }
   }
   if (!key[SDLK_DOWN])
   {
      campDownKey = 1;
   }
   
   if (campEnterKey == 1)
   {
     if(key[SDLK_RETURN])
     {
         if (Cursor5Cord.y == 268)
         {
           if (FoundGoldenFang > 0)
           {
             if ((EquipGoldenFang == true) || (FoundGoldenFang > 1))
             {
               gold = gold + 60;
               FoundGoldenFang--;
               campEnterKey = 2;
               Mix_PlayChannel(3, MoneySound, 0);
             }
           }
         }
         if (Cursor5Cord.y == 305)
         {
           if (FoundGoberion > 0)
           {
             if ((EquipGoberion == true) || (FoundGoberion > 1))
             {
                gold = gold + 50;
                FoundGoberion--;
                campEnterKey = 2;
                Mix_PlayChannel(3, MoneySound, 0);
             }     
            }
         }
         if (Cursor5Cord.y == 342)
         {
         //dagger
         if (FoundDagger > 0)
        {
        if ((EquipDagger == true) || (FoundDagger > 1))
        {
          gold = gold + 20;
          FoundDagger--;
          campEnterKey = 2;
          Mix_PlayChannel(3, MoneySound, 0);
        }
        }
       }
       if (Cursor5Cord.y == 379)
       {
         // rusty dagger
         if (FoundRustyDagger > 0)
        {
          if ((EquipRustyDagger == true) || (FoundRustyDagger > 1))
          {
           gold = gold + 7;
           FoundRustyDagger--;
           campEnterKey = 2;
          Mix_PlayChannel(3, MoneySound, 0);
          }
        }
       }
       if (Cursor5Cord.y == 416)
       {
        // Leather Set
        if (FoundLeather > 0)
        {
          if ((EquipLeather == true) || (FoundLeather > 1))
          {
            gold = gold + 15;
            FoundLeather--;
            campEnterKey = 2;
            Mix_PlayChannel(3, MoneySound, 0);
          }
        }
       }
       if (Cursor5Cord.y == 453)
       {
       SellBeginner = false;
       campEnterKey = 2;
       }
     }
   }
   if (!key[SDLK_RETURN])
   {
     campEnterKey = 1;
   }
   
}

if (SellApprentice == true)
{
 SDL_BlitSurface (Cursor3, NULL, screen, &Cursor5Cord); 
   if (campUpKey == 1)
   {
      if (key[SDLK_UP])
      {
         if (Cursor5Cord.y > 231)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
          Cursor5Cord.y = Cursor5Cord.y - 37;
          campUpKey = 2;
         }
      }
   }
   if (!key[SDLK_UP])
   {
   campUpKey = 1;
   }
   
   if (campDownKey == 1)
   {
      if (key[SDLK_DOWN])
      {
         if (Cursor5Cord.y < 453)
         {
          Mix_PlayChannel(2, MenuChoice, 0);
         Cursor5Cord.y = Cursor5Cord.y +37;
         campDownKey = 2;
         }
      }
   }
   if (!key[SDLK_DOWN])
   {
      campDownKey = 1;
   }
   
   if (campEnterKey == 1)
   {
     if(key[SDLK_RETURN])
     {
          if (Cursor5Cord.y == 268)
         {
           if (FoundQuickBlade > 0)
           {
             if ((EquipQuickBlade == true) || (FoundQuickBlade > 1))
             {
               gold = gold + 170;
               FoundQuickBlade--;
               campEnterKey = 2;
               Mix_PlayChannel(3, MoneySound, 0);
             }
           }
         }
         if (Cursor5Cord.y == 305)
         {
           if (FoundRockiansPlate > 0)
           {
             if ((EquipRockianPlate == true) || (FoundRockiansPlate > 1))
             {
                gold = gold + 150;
                FoundRockiansPlate--;
                campEnterKey = 2;
                Mix_PlayChannel(3, MoneySound, 0);
             }     
            }
         }
       
        if (Cursor5Cord.y == 342)
       {
         //dagger
         if (FoundPoisonSword > 0)
        {
        if ((EquipPoisonSword == true) || (FoundPoisonSword > 1))
        {
        gold = gold + 70;
        FoundPoisonSword--;
        campEnterKey = 2;
        Mix_PlayChannel(3, MoneySound, 0);
        }
        }
       }
       if (Cursor5Cord.y == 379)
       {
         //shadow robe
         if (FoundShadowRobe > 0)
        {
        if ((EquipShadowRobe == true) || (FoundShadowRobe > 1))
        {
        gold = gold + 100;
        FoundShadowRobe--;
        campEnterKey = 2;
        Mix_PlayChannel(3, MoneySound, 0);
        }
        }
       }
       if (Cursor5Cord.y == 416)
       {
        // Leather Set
        if (FoundRockPlate > 0)
        {
          if ((EquipRockPlate == true) || (FoundRockPlate > 1))
          {
          gold = gold + 70;
          FoundRockPlate--;
          campEnterKey = 2;
          Mix_PlayChannel(3, MoneySound, 0);
          }
        }
       }
       
       if (Cursor5Cord.y == 453)
       {
       SellApprentice = false;
       campEnterKey = 2;
       }
     }
   }
   if (!key[SDLK_RETURN])
   {
     campEnterKey = 1;
   }
}

if (MapMenuOpen == true)
{
 SDL_BlitSurface (ChoiceMap, NULL, screen, &ChoiceMapCord);
   SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord); 
   
     GoblinForest = TTF_RenderText_Solid(MinionPro, "Goblin Forest", NormalColor);
           SDL_BlitSurface(GoblinForest, NULL, screen, &GoblinForestCord);
     RockCave = TTF_RenderText_Solid(MinionPro, "Rock Cave", NormalColor);
           SDL_BlitSurface(RockCave, NULL, screen, &RockCaveCord);
           
   if (campUpKey == 1)
   {
     if (key[SDLK_UP])
     {
        if (CampCursorCord.y != 269)
        {
        Mix_PlayChannel(2, MenuChoice, 0);
        CampCursorCord.y = CampCursorCord.y - 39;
        campUpKey = 2;
        }
     } 
   }
   if (!key[SDLK_UP])
   {
      campUpKey = 1;
   }
   
   if (campDownKey == 1)
   {
     if (key[SDLK_DOWN])
     {
        if (CampCursorCord.y != 542)
        {
        Mix_PlayChannel(2, MenuChoice, 0);
        CampCursorCord.y = CampCursorCord.y + 39;
        campDownKey = 2;
        }
     } 
   }
   if (!key[SDLK_DOWN])
   {
      campDownKey = 1;
   }
   
    if (campEnterKey == 1)
    {
      if (key[SDLK_RETURN])
      {
        if (CampCursorCord.y == 542)
        {
           Mix_PlayChannel(2, MenuChoice, 0);
           CampCursorCord.y = 388;
           MapMenuOpen = false;
           campEnterKey = 2; 
        }
        if (CampCursorCord.y == 503)
        {
        CampCursorCord.x = 33;
        CampCursorCord.y = 387;
        StopCampM = true;
        campEnterKey = 2;     
        MapMenuOpen = false;     
        ActiveBattle = true;
        GoblinForestMap = true;
        }
        if (CampCursorCord.y == 464)
        {
        CampCursorCord.x = 33;
        CampCursorCord.y = 387;
        StopCampM = true;
        campEnterKey = 2;     
        MapMenuOpen = false;     
        ActiveBattle = true;
        RockCaveMap = true;
        
        }
      }
    }
    if (!key[SDLK_RETURN])
    {
      campEnterKey = 1;
    }
}


if (CharacterStatsMenuOpen == false) 
{
if (EquipmentMenuOpen == false) 
{
   if (CharacterMenuOpen == true)
   {
       SDL_BlitSurface (CharacterMenu, NULL, screen, &CampExitCord);
       SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);  
           if (key[SDLK_DOWN])
       {
           if (campDownKey == 1)
        {
          if (CampCursorCord.y != 494)
          {
             CampCursorCord.y = CampCursorCord.y + 39;
             campDownKey = 2;
               Mix_PlayChannel(2, MenuChoice, 0);
          }  
          }
          }
       if (!key[SDLK_DOWN])
       {
           campDownKey = 1;
       }
       
           if (key[SDLK_UP])
       {
       if (campUpKey == 1)
        {
          if (CampCursorCord.y != 416)
          {
             CampCursorCord.y = CampCursorCord.y - 39;
             campUpKey = 2;
               Mix_PlayChannel(2, MenuChoice, 0);
          }  
          }
          }
       if (!key[SDLK_UP])
       {
           campUpKey = 1;
       }
       
       if (key[SDLK_RETURN])
       {
             if (campEnterKey == 1)
             {   
                  if (CampCursorCord.y == 416)
                  {
                  //Character Stats
                  CharacterStatsMenuOpen = true;
                  Mix_PlayChannel(2, MenuChoice, 0);
                  CampCursorCord.y = 524;
                  CampCursorCord.x = 255; // 278
                  campEnterKey = 2;
                  }
                  if (CampCursorCord.y == 455)
                  {
                  //Equipment
                  EquipmentMenuOpen = true;
                  Mix_PlayChannel(2, MenuChoice, 0);
                  Cursor2Cord.y = 530;
                  Cursor2Cord.x = 178;
                  campEnterKey = 2;
                  }
                  if ( CampCursorCord.y == 494)
                  {
                  //Back
                  CampCursorCord.y = 427;
                  CharacterMenuOpen = false;
                  Mix_PlayChannel(2, MenuChoice, 0);
                  campEnterKey = 2;
                  }
             }
       }
       if (!key[SDLK_RETURN])
       {
             campEnterKey = 1;
       }
   }
}
}

if (CharacterStatsMenuOpen == true)
{
       SDL_BlitSurface (CharacterStatsMenu, NULL, screen, &CharacterStatsCord);
       SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
       DrawStats();
       if (campEnterKey == 1)
       {
         if (key[SDLK_RETURN]) 
         {
             if ( (CampCursorCord.y = 535)  & (CampCursorCord.x = 255) )
             {
             Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = 416;
             CampCursorCord.x = 278;
             CharacterStatsMenuOpen = false;
             campEnterKey = 2;
             }
         }
       }
       if (!key[SDLK_RETURN])
       {
             campEnterKey = 1;
       }
}

if (EquipmentMenuOpen == true)
{  
       SDL_BlitSurface (EquipmentMenu, NULL, screen, &EquipmentMenuCord);
       SDL_BlitSurface (Cursor2, NULL, screen, &Cursor2Cord);
       DrawGear();
       DrawWeapons();
       CheckGear();
       CheckWeapons();
        
       if ((ArmorMenuOpen == false) & (WeaponMenuOpen == false))
       {
       //right
       if (campRightKey == 1) 
          {
            if (key[SDLK_RIGHT])
             {
                if ( Cursor2Cord.x != 340)
                {
                 Mix_PlayChannel(2, MenuChoice, 0);
                Cursor2Cord.x = Cursor2Cord.x + 162;
                campRightKey = 2;
                }
             }
          }
          
          if (!key[SDLK_RIGHT])
          {
              campRightKey = 1;
          }
          //left
          if (campLeftKey == 1)
          {
             if (key[SDLK_LEFT]) 
             {
                 if (Cursor2Cord.x != 16)
                 {
                  Mix_PlayChannel(2, MenuChoice, 0);
                 Cursor2Cord.x = Cursor2Cord.x - 162;
                 campLeftKey = 2;
                 }
             }
          }
          
          if (!key[SDLK_LEFT])
          {
             campLeftKey = 1;
          }
       
       if (campEnterKey == 1)
       {
         if (key[SDLK_RETURN]) 
         {
             if(Cursor2Cord.x == 178)
             {
             //back
             Mix_PlayChannel(2, MenuChoice, 0);
             CampCursorCord.y = 455;
             CampCursorCord.x = 278;
             EquipmentMenuOpen = false;
             campEnterKey = 2;
             }
             if(Cursor2Cord.x == 16)
             {
              //armor
              ArmorMenuOpen = true;
              Mix_PlayChannel(2, MenuChoice, 0);
              campEnterKey = 2;
              
             }
             if(Cursor2Cord.x == 340)
             {
              //weapon
              WeaponMenuOpen = true;
              Mix_PlayChannel(2, MenuChoice, 0);
              campEnterKey = 2;
             }
         }
       }
       if (!key[SDLK_RETURN])
       {
             campEnterKey = 1;
       }
   }
}

if (WeaponMenuOpen == true)
{
    SDL_BlitSurface (Cursor3, NULL, screen, &Cursor4Cord);
    //down
    if (campDownKey == 1)
    {
      if (key[SDLK_DOWN])
      {
         if (Cursor4Cord.y != 467)
         {
         Cursor4Cord.y = Cursor4Cord.y + 37;
         campDownKey = 2;
          CheckWeaponUnequip();
         }
      }
    }
    if (!key[SDLK_DOWN])
    {
       campDownKey = 1;
    }
    // up
     if (campUpKey == 1)
    {
      if (key[SDLK_UP])
      {
         if (Cursor4Cord.y != 171)
         {
         Cursor4Cord.y = Cursor4Cord.y - 37;
         campUpKey = 2;
          CheckWeaponUnequip();
         }
      }
    }
    if (!key[SDLK_UP])
    {
       campUpKey = 1;
    }
    
       // right
     if (campRightKey == 1)
    {
      if (key[SDLK_RIGHT])
      {
         if (Cursor4Cord.x != 277) //30
         {
         Cursor4Cord.x = Cursor4Cord.x + 247;
         campRightKey = 2;
          CheckWeaponUnequip();
         }
      }
    }
    if (!key[SDLK_RIGHT])
    {
       campRightKey = 1;
    }
    
       // left
     if (campLeftKey == 1)
    {
      if (key[SDLK_LEFT])
      {
         if (Cursor4Cord.x != 30) //30
         {
         Cursor4Cord.x = Cursor4Cord.x - 247;
         campLeftKey = 2;
          CheckWeaponUnequip();
         }
      }
    }
    if (!key[SDLK_LEFT])
    {
       campLeftKey = 1;
    }
    
    
    if (campEnterKey == 1)
    {
     if (key[SDLK_RETURN])
     {
        WeaponMenuOpen = false;
        campEnterKey = 2;
     }
    }
    if (!key[SDLK_RETURN])
    {
       campEnterKey = 1;
    }

}

if (ArmorMenuOpen == true)
{
    SDL_BlitSurface (Cursor3, NULL, screen, &Cursor3Cord);
    //down
    if (campDownKey == 1)
    {
      if (key[SDLK_DOWN])
      {
         if (Cursor3Cord.y != 467)
         {
         Cursor3Cord.y = Cursor3Cord.y + 37;
         campDownKey = 2;
          CheckGearUnequip();
         }
      }
    }
    if (!key[SDLK_DOWN])
    {
       campDownKey = 1;
    }
    // up
     if (campUpKey == 1)
    {
      if (key[SDLK_UP])
      {
         if (Cursor3Cord.y != 171)
         {
         Cursor3Cord.y = Cursor3Cord.y - 37;
         campUpKey = 2;
          CheckGearUnequip();
         }
      }
    }
    if (!key[SDLK_UP])
    {
       campUpKey = 1;
    }
    
       // right
     if (campRightKey == 1)
    {
      if (key[SDLK_RIGHT])
      {
         if (Cursor3Cord.x != 277) //30
         {
         Cursor3Cord.x = Cursor3Cord.x + 247;
         campRightKey = 2;
             CheckGearUnequip();
         }
      }
    }
    if (!key[SDLK_RIGHT])
    {
       campRightKey = 1;
    }
    
       // left
     if (campLeftKey == 1)
    {
      if (key[SDLK_LEFT])
      {
         if (Cursor3Cord.x != 30) //30
         {
         Cursor3Cord.x = Cursor3Cord.x - 247;
         campLeftKey = 2;
         CheckGearUnequip();
         }
      }
    }
    if (!key[SDLK_LEFT])
    {
       campLeftKey = 1;
    }
    
    
    if (campEnterKey == 1)
    {
     if (key[SDLK_RETURN])
     {
        ArmorMenuOpen = false;
        campEnterKey = 2;
     }
    }
    if (!key[SDLK_RETURN])
    {
       campEnterKey = 1;
    }
}

   if(menu == 2)
      {
       SDL_BlitSurface (CampExit, NULL, screen, &CampExitCord);
       SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
       if (campUpKey == 1)
       {
       if (key[SDLK_UP])
       {
           if (CampCursorCord.y == 495)  
           {
                 Mix_PlayChannel(2, MenuChoice, 0);
              CampCursorCord.y = CampCursorCord.y-48;  
           }      
           campUpKey = 2;   
       }
       }
       if (!key[SDLK_UP])
       {
           campUpKey = 1;
       }
       if (campDownKey == 1)
       {
       if (key[SDLK_DOWN])
       {
           if (CampCursorCord.y == 447)
           {
               Mix_PlayChannel(2, MenuChoice, 0);
           CampCursorCord.y = CampCursorCord.y+48; 
           }        
           campDownKey = 2;     
       }
       }
       if (!key[SDLK_DOWN])
       {
         campDownKey = 1;                   
       }
       if (campEnterKey == 1)
       {
       if (key[SDLK_RETURN])
       {
           
           if (CampCursorCord.y == 495)  
           {
                        Mix_PlayChannel(2, MenuChoice, 0);
               campEnterKey = 2;
               CampCursorCord.y = 544;
               menu = 1;
              
           }          
           if (CampCursorCord.y == 447)
           {
                    Mix_PlayChannel(2, MenuChoice, 0);
               campEnterKey = 2;
               CleanData();
               return 0;
           }
           
       }
   }
          if (!key[SDLK_RETURN])
         {
            campEnterKey = 1;
         }
          
}
   
      if (Battle == true)
       {
             if ( StopGame == false)
             {
                   
             Player.flee();
             Player.attack();
             DeathAnimation();
             Enemy1.EnemyAttack();
             if(LifeBarCrop.w <= 87)
             {
                LifeBarCrop.w = 87;
                PlayerDeath = false;
                 StopGame = true;
             }
             
             if (abilitiesButton == true)
{
    SDL_BlitSurface (AbilitiesMenu, NULL, screen, &BattleMenuCord);
    SDL_BlitSurface (CampCursor, NULL, screen, &CampCursorCord);
    if (UnlockQuickSlash == true)
    {
          QuickSlashAbi =TTF_RenderText_Solid(MinionProBold, "Quick Slash 10", BossColor);
          SDL_BlitSurface(QuickSlashAbi, NULL, screen, &FirstAbiCord);
    }
    if (UnlockHighJump == true)
    {
          HighJumpAbi =TTF_RenderText_Solid(MinionProBold, "High Jump 15", BossColor);
          SDL_BlitSurface(HighJumpAbi, NULL, screen, &SecondAbiCord);
   }
    if (campDownKey == 1)
    {
     if (key[SDLK_DOWN])
     {
       if (CampCursorCord.y != 522)
       {
           Mix_PlayChannel(2, MenuChoice, 0);
           CampCursorCord.y = CampCursorCord.y + 39;
       }
       campDownKey = 2;
     }
    }
    if (!key[SDLK_DOWN])
    {
    campDownKey = 1;
    }
    if (campUpKey == 1)
    {
    if (key[SDLK_UP])
    {
        if (CampCursorCord.y != 405) 
        {   
        Mix_PlayChannel(2, MenuChoice, 0);       
        CampCursorCord.y = CampCursorCord.y - 39;
        }
            campUpKey = 2;
    }
}
    if (!key[SDLK_UP])
    {
       campUpKey = 1;
    }
    
    if (campEnterKey == 1)
    {
       if (key[SDLK_RETURN])
       {
          if (CampCursorCord.y == 522) 
          {
             Mix_PlayChannel(2, MenuChoice, 0);
             abilitiesButton = false;
             CampCursorCord.y = 426;
             campEnterKey = 2;
          }
     if ((WaitBar2Crop.w == 210) && (SP >= 10))
     { 
       if ((CampCursorCord.y == 483)  && (UnlockQuickSlash == true))
          {
             Mix_PlayChannel(2, MenuChoice, 0);
             abilitiesAttack1 = true;
             Abilities = true; 
             abilitiesButton = false;
             campEnterKey = 2;
             SP = SP - 10;
             
          }
       }
       if ((WaitBar2Crop.w == 210) && (SP>= 15))
       {
         if ((CampCursorCord.y == 444) && (UnlockHighJump == true))
         {
            Mix_PlayChannel(2, MenuChoice, 0);
            abilitiesAttack2 = true;
            Abilities = true; 
            abilitiesButton = false;
            SP = SP - 15;
            campEnterKey = 2;
         }
       }
       }
       }
    
    if (!key[SDLK_RETURN])
    {
    campEnterKey = 1;
    }
}

             
              if (abilitiesButton == false)
           {
                 
           if (campDownKey == 1)
           {
           if (key[SDLK_DOWN])
           {
                if (CampCursorCord.y != 504)
                {
                       Mix_PlayChannel(2, MenuChoice, 0);
                CampCursorCord.y = CampCursorCord.y + 39;
                }  
                campDownKey = 2;
           }
           }
            if (!key[SDLK_DOWN])
            {
                campDownKey = 1;
            }
           if (campUpKey == 1)
           { 
           if (key[SDLK_UP])
           {
                if (CampCursorCord.y != 387) 
                {   
                  Mix_PlayChannel(2, MenuChoice, 0);       
                CampCursorCord.y = CampCursorCord.y - 39;
                }
                campUpKey = 2;
           }
           }
           if (!key[SDLK_UP])
           {
               campUpKey = 1;
           }
           if (campEnterKey == 1)
           {
           if (key[SDLK_RETURN])
           {
                if (CampCursorCord.y == 387) 
                {
                       if (WaitBar2Crop.w == 210)
                        {
                               Mix_PlayChannel(2, MenuChoice, 0);
                          attackButton = true;
                          }
                          campEnterKey = 2;
                }
                if (CampCursorCord.y == 426)
                {
                   if (EnemyLifeCrop.w > 78)
                   {
                          Mix_PlayChannel(2, MenuChoice, 0);
                       //abilities
                       abilitiesButton = true;
                       CampCursorCord.y = 522;
                       campEnterKey = 2; 
                   }
                }
                if (CampCursorCord.y == 465)
                {
                          Mix_PlayChannel(2, MenuChoice, 0);
                       //items
                       campEnterKey = 2;
                }
                if (CampCursorCord.y == 504)
                {
                       if (WaitBar2Crop.w == 210)
                       {
                          Mix_PlayChannel(2, MenuChoice, 0);
                       fleeButton = true;
                       }
                       campEnterKey = 2;
                }
           }
           }
           if (!key[SDLK_RETURN])
           {
              campEnterKey = 1;
           }
           }
       }
       }
}

void ActiveBattleFunc()
{
     if (ActiveBattle == true)
     {
         //  Mix_PauseMusic();
          Battle = true;
          ActiveBattle = false;
     }
}




#5074056 Where to go next?

Posted by Konrad Jablonski on 29 June 2013 - 09:30 PM

I would suggest looking into SDL, and start doing some 2D programming. If you want to learn more about it then I would suggest using http://lazyfoo.net/SDL_tutorials/

 

also LussikaMage has really good tutorials on SDL/Allegro it here is part 1

http://www.youtube.com/watch?v=E4RqHtEAAds

 

Try making picking sticks, it is always good for a first game :)

My hint would be, don't go for big projects, I've done that too many times. It's better to have something finished, then complicated and broken :P




#5073429 Unity examples/tutorials for a C++ programmer?

Posted by Konrad Jablonski on 27 June 2013 - 06:42 PM

I've been using Unity with C# for about half a year and now moving back to C++. I can give u source code for this project  if you want: http://www.youtube.com/watch?v=u3vNamukTQs

 

Mainly it's just trail and error. To make it 2D you just change in camera properties to Ortho.

 

Mainly unity is good because it supports wide range of platforms like Android, iOS, Windows, Mac, Linux... it is good engine to know since it is quite popular among small companies. But C++/SDL/OpenGL is much much more important to know :)




#4950356 Can someone recommend a decent game engine for beginners?

Posted by Konrad Jablonski on 18 June 2012 - 01:55 PM

well okey, maybe I said wrong thing about gamemaker. But I believe people can make good games without using it, it limits you on so many ways..


PARTNERS