Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

can i make game in c++?

+7 votes
asked 4 days ago by zyadggez (190 points)

1 Answer

0 votes
answered 6 hours ago by crazy _4633 (200 points)
edited 6 hours ago by crazy _4633
I Think Using This Answer Can We Manage To Create Games By C ++ Language.

#include<iostream>

using namespace std;

void setup();

void draw();

void input();

void logic();

bool gameOver = false;

int score = 0;

int main()

{

   setup();

    while (!gameOver)

    {

        draw();

        input();

        logic();

    }

    cout<<"Game Over!"<<endl;

    cout<<"Final Score:"<<score<<endl;

    return 0;

}

void draw()

{

     cout<<"Draw the game board here."<<

endl;

}

void input()

{

     cout<<"Read keyboard input here."<<

endl;

}

void logic()

{

     cout<<"Move snake, check food, collision."<<

endl;

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...