Dev - C++ - Como hacer juego de Frogger con winbgim

 
Vista:

Como hacer juego de Frogger con winbgim

Publicado por David (1 intervención) el 04/01/2016 07:18:54
Necesito el juego de frogger en dev c++ y con graficos utlizando winbgim seria de gran ayuda que alguien me ayudara con este juego.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Como hacer juego de Frogger con winbgim

Publicado por lrl (1 intervención) el 15/05/2018 01:29:42
prro esa wea es isi ya lo saqui mientras jugaba al maincra aqui te va el codigo
#include <minecra>
#include <putoelquelolea>

int alv;
cout << "lel :v" >endl
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Como hacer juego de Frogger con winbgim

Publicado por jorgito (1 intervención) el 21/05/2018 23:36:29
muchas gracias amigo me sirvio :)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Como hacer juego de Frogger con winbgim

Publicado por mamamamaincra (1 intervención) el 15/05/2018 01:31:41
Mano manito eso esta facil

lo hice mientras jugaba fortnoto

aqui te va el codigo

#incude<esto no es maincra me encanta >
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Como hacer juego de Frogger con winbgim

Publicado por uvuvu (1 intervención) el 15/05/2018 01:31:47
de nada prro espero que me des los creditos no seas marik


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#include <windows.h>
#include <iostream>
#include <stdlib.h>
#include <conio.h>
 
#define ARRIBA 72
#define IZQUIERDA 75
#define DERECHA 77
#define ABAJO 80
#define ESC 27
 
int cuerpo[200][2];
int n = 1, tam = 10, dir = 3;
int x = 10, y = 12;
int xc = 30, yc = 15;
int velocidad = 60;
char tecla;
 
void gotoxy(int x, int y)
{
    HANDLE hCon;
    COORD dwPos;
 
    dwPos.X = x;
    dwPos.Y = y;
    hCon = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(hCon,dwPos);
}
void OcultaCursor() {
    CONSOLE_CURSOR_INFO cci = {100, FALSE};
 
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cci);
}
void pintar(){
     for(int i=2; i < 78; i++){
        gotoxy (i, 3); printf ("%c", 205);
        gotoxy(i, 23); printf ("%c", 205);
        }
     for(int v=4; v < 23; v++){
        gotoxy (2,v);  printf ("%c", 186);
        gotoxy(77,v);  printf ("%c", 186);
        }
     gotoxy  (2,3);    printf ("%c", 201);
     gotoxy (2,23);    printf ("%c", 200);
     gotoxy (77,3);    printf ("%c", 187);
     gotoxy(77,23);    printf ("%c", 188);
     }
void guardar_posicion(){
     cuerpo[n][0] = x;
     cuerpo[n][1] = y;
     n++;
     if(n == tam) n = 1;
}
void dibujar_cuerpo(){
      for(int i = 1; i < tam; i++){
      gotoxy(cuerpo[i][0] , cuerpo[i][1]); printf("*");
     }
}
void borrar_cuerpo(){
     gotoxy(cuerpo[n][0] , cuerpo[n][1]); printf(" ");
    }
void teclear(){
     if(kbhit()){
            tecla = getch();
            switch(tecla){
                case ARRIBA : if(dir != 2) dir = 1; break;
                case ABAJO : if(dir != 1) dir = 2; break;
                case DERECHA : if(dir != 4) dir = 3; break;
                case IZQUIERDA : if(dir != 3) dir = 4; break;
           }
     }
}
void comida()
{
     if(x == xc && y == yc)
     {
          xc = (rand() % 73) + 4;
          yc = (rand() % 19) + 4;
 
          tam++;
          gotoxy(xc, yc); printf("%c", 4);
     }
}
bool game_over()
{
     if(y == 3 || y == 23 || x == 2 || x == 77) return false;
     for(int j = tam - 1; j > 0; j--){
             if(cuerpo[j][0] == x &&  cuerpo[j][1] == y)
             return false;
     }
    return true;
}
int main()
{
    OcultaCursor();
 
    pintar();
   gotoxy(xc, yc); printf("%c", 4);
 
    while(tecla != ESC && game_over())
    {
         borrar_cuerpo();
         guardar_posicion();
         dibujar_cuerpo();
         comida();
         teclear();
         teclear();
 
         if(dir == 1) y--;
         if(dir == 2) y++;
         if(dir == 3) x++;
         if(dir == 4) x--;
 
         Sleep(velocidad);
         }
    pintar();
    return 0;
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Como hacer juego de Frogger con winbgim

Publicado por boludo123 (1 intervención) el 15/05/2018 01:36:12
Manito ahi esta tu codigo perro

lo hice mientras miraba wilyrex



ahi esta manito


ahi te va el codigo ojala haigas aprobado


PD: Esto no es mainca me encanta

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#include <iostream>
#include <windows.h>
#include <ctime>
#include <string>
#include <cstdlib>
 
using namespace std;
 
string gameboard [40][20] // Game board where the game takes place
{
    "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    "!                @                  !"
    "!               @ @                 !"
    "!              @ @ @                !"
    "!             @ @ @ @               !"
    "!            @ @ @ @ @              !"
    "! @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ !"
    "!            @ @ @ @ @              !"
    "!             @ @ @ @               !"
    "!              @ @ @                !"
    "!               @ @                 !"
    "!                @                  !"
    "!                                   !"
    "!                                   !"
    "!                                   !"
    "!                                   !"
    "!                                   !"
    "!                                   !"
    "!                X                  !"
    "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
 
};
 
bool endgame = false;
int speedtimer = 100; // How fast the player can move
int enemyrandnum = rand() %50 + 1; // The aliens' bombs landing in random places
int grand (time(0)); // How fast the bombs are falling
int Gmaxhealth = 400; // The maximum health a player has
int Shealth = Gmaxhealth; // Calculates how much health is left for the player
 
int main()
{
    system ("color0a"); // Color of the board
    while (endgame==false)
    {
        system("cls");
        for (int y=0; y<40; y++) // to move the player
            {
             int gMap[y];
             cout << gMap[y];
            }
             cout << "HEALTH:" << Gmaxhealth << "/" << Shealth; // Updates current health of player
        for (int y=0; y<40; y++) // moves player in the array
        {
          for (int x=0; x<20; x++) // moves player in the array
          {
              int gMap[y][x];
              switch (gMap[y][x])
               {
               case 'X':
                if (GetAsyncKeyState (VK_LEFT)!=0) // moves the player to the left
                 {
                     int deuxiemex = x-1;         // new position of the player
                      switch (gMap [y][deuxiemex])
                       {
                       case ' ':
                        gMap[y][x] = ' '; // Replaces old position of the player
                        x--;
                        gMap[y][deuxiemex]='X'; // New position of the player
                        break;
                       }
                 }
                 if (GetAsyncKeyState (VK_RIGHT)!=0) // Moves the player to the right
                     {
                         int deuxiemex = x+1;
                          switch (gMap [y][deuxiemex])
                           {
                            case ' ':
                            gMap[y][x] = ' '; // Replaces the old position of the player
                            x++;
                            gMap[y][deuxiemex] = 'X'; // New position of the player
                            break;
                           }
                     }
                 if (GetAsyncKeyState (VK_SPACE)!=0)
                    {
                        y--;
                        gMap[y][x] = '#'; // Alien bombs falling downward
                    }
                 break;
 
                        case '#':
                        gMap [y][x] = ' ';
                        y--;
                         if (gMap [y][x] != '!' && gMap [y][x] != '@')// The shooter's bullet
                          {
                             gMap[y][x] = '!';
                          }
                         else if (gMap [y][x] == '@') // delete's the alien if the bullet hits the alien
                          {
                             gMap [y][x] = ' ';
                          }
                         break;
 
                         enemyrandnum = rand()%50+1; // randomizes where the alien bomb's fall
                         if (enemyrandnum == 1)
                          {
                             y++;
                             gMap[y][x] = '*'; // What alien bombs will look like
 
                          }
                         break;
 
                        case '*':
                        gMap[y][x] = ' ';
                        if (gMap != 41 && gMap != 'X') // if the bomb hits the boarder, then nothing is deleted
                        {
                            y++;
                            gMap[y][x] = '*';
                        }
 
                        if else (gMap == 'X') // Takes away 20 points of health if the bomb hits the player
                         {
                           Shealth-=20;
                            if (Gmaxhealth <=0) // When the health is all used up, then the game ends and you lose.
                            {
                                endgame = true;
                            }
                            break;
                         }
               }
          }
          Sleep (speedtimer);
        }
    system ("cls");
    cout << "GAME OVER" << endl;
    system ("PAUSE");
    return EXIT_SUCCESS;
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar