0

Hey, can anyone help me make a Dots and Boxes game in C++ ?

It needs to have 2 AIs that play against each other

4th Sep 2018, 5:34 PM
Raeesa
5 Respuestas
0
Where exactly do you need help?
4th Sep 2018, 5:42 PM
Theresa
Theresa - avatar
0
I need help with everything. I am decent in coding small projects but when it comes to games I get overwhelmed and confused. i don't know where to start
4th Sep 2018, 7:17 PM
Raeesa
0
First of all, you have to download a library that will allow graphic output and user input like the SDL or SFML, which you then have to set up in your IDE (just google to find out how). I suggest you first learn how to use it before you jump right into your first project because it can be a bit overwhelming if you're a beginner. There are some good tutorials out there. Your code will a need a game loop, which is a while loop that will test a bool. As long as this variable is true, the loop is suppossed to call functions that update objects (e.g. a function for letting an object fall), receive user input and render everything to the screen. If the user presses a certain key or bottom or closes the window, the variable has to be set to false, which will cause the loop as well as the program to end. Objects should be created by using classes. It's a good idea to also use a Timer class, an AI class and a class for the game itself, which will also contain the game loop. If you use multiple instances of the same class, put them into a list and iterate it to update and render the objects. There's still more to explain, but I hope this is giving you a basic idea.
4th Sep 2018, 8:24 PM
Theresa
Theresa - avatar
0
Thank you I'm following. So now how would I make the AI without using mini max. It has to be a simple algorithm that plays against another algorithm
4th Sep 2018, 8:39 PM
Raeesa
0
Can you please code for me the algorithm I should use in C++ ?
4th Sep 2018, 11:10 PM
Raeesa