Sign in to follow this  
TheNobleOne

My first game

Recommended Posts

Well I made my first game with C++. I am so happy it works and there are no bugs that I can find. My game is a text tic tac toe game. kinda simple but you have to start somewhere. What I am looking for from you guys is maybe some suggestions that can improve the readability of my code. Also maybe a few alternative ways to the way I did things to lower the amount of code written. Here is my main.cpp file
#include <iostream>
#include <stdlib.h>

using namespace std;

// Prototypes
void DrawCurrentBoardState(char n[]);
void StartGame(char n[]);

int main(void)
{
    // Declarations
    char boardData[9];
    for(int i = 0; i <= 9; i++) // initialize boardData elements
    {
        boardData[i] = ' ';
    }    
    StartGame(boardData);       // start the game     
    system("PAUSE");            // pause at end of game to keep window open
    return 0;
}

void DrawCurrentBoardState(char n[])
{
    for(int i = 0; i <= 9; i++)  // dispaly board data
    {
        if(i%3 != 0)
        {
            cout << n[i] << "|";
        }
        else
        {
            cout << n[i] << "\n";
        }
    }
    cout << "\n";
}

void StartGame(char n[])
{
    bool running = true;
    int possition;
    DrawCurrentBoardState(n);  // display the most current boards data
    while(running)
    {
        cout << "Player X which possition would you like to take 1 - 9" << "\n";
        cin >> possition;
        n[possition] = 'X';
        DrawCurrentBoardState(n);
        
        // check for win
        if(n[1] == 'X' && n[2] == 'X' && n[3] == 'X')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[4] == 'X' && n[5] == 'X' && n[6] == 'X')
        {
            cout << "Player " << n[4] << " has won the game." << "\n";
            running = false;
        }
        else if(n[7] == 'X' && n[8] == 'X' && n[9] == 'X')
        {
            cout << "Player " << n[7] << " has won the game." << "\n";
            running = false;
        }
        else if(n[1] == 'X' && n[4] == 'X' && n[7] == 'X')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[2] == 'X' && n[5] == 'X' && n[8] == 'X')
        {
            cout << "Player " << n[2] << " has won the game." << "\n";
            running = false;
        }
        else if(n[3] == 'X' && n[6] == 'X' && n[9] == 'X')
        {
            cout << "Player " << n[3] << " has won the game." << "\n";
            running = false;
        }
        else if(n[1] == 'X' && n[5] == 'X' && n[9] == 'X')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[3] == 'X' && n[5] == 'X' && n[7] == 'X')
        {
            cout << "Player " << n[3] << " has won the game." << "\n";
            running = false;
        }
        
        cout << "Player O which possition would you like to take 1 - 9" << "\n";
        cin >> possition;
        n[possition] = 'O';
        DrawCurrentBoardState(n);
        
        // check for win
        if(n[1] == 'O' && n[2] == 'O' && n[3] == 'O')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[4] == 'O' && n[5] == 'O' && n[6] == 'O')
        {
            cout << "Player " << n[4] << " has won the game." << "\n";
            running = false;
        }
        else if(n[7] == 'O' && n[8] == 'O' && n[9] == 'O')
        {
            cout << "Player " << n[7] << " has won the game." << "\n";
            running = false;
        }
        else if(n[1] == 'O' && n[4] == 'O' && n[7] == 'O')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[2] == 'O' && n[5] == 'O' && n[8] == 'O')
        {
            cout << "Player " << n[2] << " has won the game." << "\n";
            running = false;
        }
        else if(n[3] == 'O' && n[6] == 'O' && n[9] == 'O')
        {
            cout << "Player " << n[3] << " has won the game." << "\n";
            running = false;
        }
        else if(n[1] == 'O' && n[5] == 'O' && n[9] == 'O')
        {
            cout << "Player " << n[1] << " has won the game." << "\n";
            running = false;
        }
        else if(n[3] == 'O' && n[5] == 'O' && n[7] == 'O')
        {
            cout << "Player " << n[3] << " has won the game." << "\n";
            running = false;
        }                              
    }
}            

Share this post


Link to post
Share on other sites
looks pretty good. only thing I'd suggest is using a few more blank lines between sub-sections of code. something like:


bool running = true;
int possition;

DrawCurrentBoardState(n); // display the most current boards data

while(running)
{
...



instead of:


bool running = true;
int possition;
DrawCurrentBoardState(n); // display the most current boards data
while(running)
{
...



It just puts a bit of seperation between logically disconnected areas of the code (in this case, seperating variable declaration, drawing, and input). Only other minor thing is that's general policy to initialize your vars (int position = 0), else you get garbage values ;)

Looks good, though, almost identical to my coding conventions ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by TheNobleOne
Well I made my first game with C++. I am so happy it works and there are no bugs that I can find.
My game is a text tic tac toe game. kinda simple but you have to start somewhere.


Welcome to the Club.Congrats on making thus far and taking you place on the exclusive[smile] succesful game maker's club.[grin]

Your coding style is close to perfectly crystal clear, but remmeber to put in spaces in places like Instruo said.


void DrawCurrentBoardState(char n[]);
void StartGame(char n[]);


it's better to declare them like this (standard style)

void DrawCurrentBoardState(char *n);
void StartGame(char *n);


Also seperate your declarations in the funtions from the working code with about say 2 lines.You coding style is fine otherwise.


NEXT STEP
Move on to pixel based graphics, and Mode13h is the simplest and best to start on. Search on google, the best search engine on the planet.

Also read this,Thoughts on a Project for a begginner, there are some links to Mode13h tuts and other resources for begginers.

Share this post


Link to post
Share on other sites
I have to agree, your code is clean and very readable.
When you start to develop larger programs you may need to print out the source code, or if you need to submit it ( in school or to an empoyeer ). A little tip is to figure out what is the maximum characters you can have on a line and do not exceed that. You can break up lines of code into multiple lines. Ex.

cout << "Player X which possition would you like to take 1 - 9"
<< "\n";



or its common to have more than one parameter for a function so I tend to use this convention:

void int
thisIsMyFunction( int param1,
int param2,
char param3 )
{
...
}



Good code though...

Share this post


Link to post
Share on other sites
Your code is nice and readable :)

I've reworked a little bit of your code.. You may look at it but it will spoil the fun of doing it yourself.

First a little hint :) The 'chech for win' parts are really similair to eachother. Try extracting them and create a seperate function for it.

You also need to check if a place has already been filled(so if you prece 4 twice the second one should be ignored).

Below is some code that splits your code into a CheckForWin and PlayerHasWon function :)

Good luck with programming!

#include <iostream>
#include <stdlib.h>

using namespace std;

// Prototypes
void DrawCurrentBoardState(char n[]);
void StartGame(char n[]);

bool CheckForWin(char Symbol, char n[]);
void PlayerHasWon(char Symbol);

bool running = true;

int main(void)
{
// Declarations
char boardData[9];
for(int i = 0; i <= 9; i++) // initialize boardData elements
{
boardData[i] = ' ';
}
StartGame(boardData); // start the game
system("PAUSE"); // pause at end of game to keep window open
return 0;
}

void DrawCurrentBoardState(char n[])
{
for(int i = 0; i <= 9; i++) // dispaly board data
{
if(i%3 != 0)
{
cout << n[i] << "|";
}
else
{
cout << n[i] << "\n";
}
}
cout << "\n";
}

void StartGame(char n[])
{

int possition;
DrawCurrentBoardState(n); // display the most current boards data
while(running)
{
cout << "Player X which possition would you like to take 1 - 9" << "\n";
cin >> possition;
n[possition] = 'X';
DrawCurrentBoardState(n);

CheckForWin('X',n);

cout << "Player O which possition would you like to take 1 - 9" << "\n";
cin >> possition;
n[possition] = 'O';

DrawCurrentBoardState(n);

CheckForWin('O',n);

}
}


bool CheckForWin(char Symbol, char n[])
{

for( int x = 1; x <= 3; x++)
{
if(n[x] == Symbol && n[x + 1] == Symbol && n[x + 2] == Symbol)
PlayerHasWon(Symbol);
}

for( int x = 1; x <= 3; x++)
{
if(n[x] == Symbol && n[x + 3] == Symbol && n[x + 6] == Symbol)
PlayerHasWon(Symbol);
}

if(n[1] == Symbol && n[5] == Symbol && n[9] == Symbol)
{
PlayerHasWon(Symbol);
}

if(n[3] == Symbol && n[5] == Symbol && n[7] == Symbol)
{
PlayerHasWon(Symbol);
}
return true;
}

void PlayerHasWon(char Symbol)
{
cout << "Player" << Symbol << " has won the game." << "\n";
running = false;
return;
}


Share this post


Link to post
Share on other sites
I disagree, your code has some bad errors.

Firstly and most obviously, your array accesses are incorrect.

char board[9];

The above statement declares a 9 element array, the first element is board[0], the last element is board[8], not board[9].

This means your loops are incorrect, and your function which checks for three in a row is also incorrect. You are overwriting the array bounds, and corrupting the stack.

Change your loops from i <= 9 to i < 9.

Other things to note are the i % 3, a comment there might be helpful, not totally obvious what is happening there to a lot of people.

the stdlib.h header file is also deprecated in C++, it has been replaced with the cstdlib header. using namespace std; is generally not good practice in larger projects, something to be aware of.

system("PAUSE"); is not a portable command.

Other than that.. well done :)

Share this post


Link to post
Share on other sites
Hi! Fun game! Just the kind of game I like -- one where I can win.

In addition to the others' comments, re. spacing etc.:

1. Pedantic note: possition -> position (one 's') :)
2. Consider a 'CheckForWinner function that returns a. no winner, or the winner, 'X' or 'O'. Based on the result of this function you can then cout Winner is 'X'/'O' once rather than write it repeatedly as you've done it.

Have fun!

jbc.

Share this post


Link to post
Share on other sites
Hi!
Even when your code is clear, make an habit of adding comments. Comment each function describing what it does, the parameters and the expected output. Try to make simple comments in your loops. That way, when you go back and read to your code 3 years from now, you will remember it kindly.

Luck!
Guimo

Share this post


Link to post
Share on other sites
Quote:
Original post by elementary
I disagree, your code has some bad errors.

Firstly and most obviously, your array accesses are incorrect.

char board[9];

Change your loops from i <= 9 to i < 9.


That's true.We missed that really big one.(rates up;))

Quote:

system("PAUSE"); is not a portable command.


Oh come now, it's his first game[smile].,knowledge never harmed anyone though....[grin]

Share this post


Link to post
Share on other sites
Thanks for the comments. It will help me out greatly.

However, one note if you played the game you see the format of display is as follows (ignore " ' " that is so the spacing works in this window lol

' | |
' | |
' | |

now originally I had my array boardData[8]; however when I went to put in input to add a X or O to boardData[0]; it came out like this

'X
' | |
' | |
' | |

that is why I made it 9 and totally ignored the 0 it was there but never used. it is a small waste in memory anyone know how to fix that. I have a feeling it was in my board drawing calculations. that is the if(i % 3 != 0) part of the code.

Share this post


Link to post
Share on other sites
An array declared as foo[9] has 9 elements, numbered 0 to 8.

Trust me from years and years of programming experience, you want to work with the 0-8 range internally in all your math, and only convert to 1-9 when interacting with the user:

cin >> where; // user enters 1-9 for location
where -= 1; // convert that to 0-8
row = where / 3; column = where % 3;
// That cleanly results in this layout:
// 0 1 2
// 3 4 5
// 6 7 8
// See how simple the math looks. Later:
for (int loc = 0; loc < 9; loc++) {
// looping from 0 to 8 inclusive
cout << board[loc]; // and whatever other formatting
if (loc % 3 == 2) cout << endl; // wrap at the end of each row
}

Share this post


Link to post
Share on other sites
ok that makes sense. I knew 9 gave 0 - 8 but I guess when I was working my code I glazed over that. However, I am reworking my code to me more efficient and it is actually starting to help me understand when pointers should be used and when not to use them.

However, I have some bugs to work out while refactoring the code.
I seems bugs are popping up here and there while refactoring but it is a good learning experience. Because as they pop up it lets me stop and think and fix/alter the logic of the code. Over all I am glad I started with a simple game like this without even thinking of graphics API.

I also can put in a little hint for the other noob game programmers out there... Learn C++ first and then write a game using C++ but no graphics api or anything. Just do a simple console app based game. It will enlighten you very much and will teach you more about the way C++ works then any book can ever say. Much knowledge about using C++ comes from actually using the language in your own examples rather then just the books examples which don't always show practical applications of the language. Also another tip before you ask here on the forums what is wrong with your code sit back and look at it. Read your code in pain english and think about it. Then tweak where you think something should be tweaked and then test. Do this over and over and over and you will learn something that not even the forums can tell you. The things they tell you here will sink in much better if you discover it for yourself.

You can't start with a huge game and expect to learn well. Start simple then move up and up and up. The simple stuff will teach you C++ once you know that you can think about graphics api's.

Share this post


Link to post
Share on other sites
Well I am not technically a beginner. I am actually a comp sci major. However, I am new to C++ as in school we use java and normally i use C#. But in my own interest I want to learn C++ and game development and hope I can get a job in this field. So I will make sure I save printouts of all my games I write so I have something to show when that time comes.

However, I am liking to work in C++ the more and more I use it.

Share this post


Link to post
Share on other sites
Sorry for the double post but I want to seperate this from everything else so to say.

Well I fully refactored the code. Working great. I took some of your advice. All my calculations using the array now are done including [0]. Then when the user presses 1 for positon one I calcuate that as possition 1 - 1 or possition 0 on the board. I also added a condition that ends the game when there is a tie.

Also I am using pointers where I feel they are necessary. For instance wherever I want to reference the actual value of a variable and not the counter I use a pointer as a function param and send it the address of a variable. What I like about that is it allows very easy passing of a variable from one function into another and back again without haveing to have the function return a value. Here is the code. Please feel free to look at the code and see if you see something that I missed or did wrong.

Oh and btw I am using #include <stdlib.h> because the mingw compiler libs seem not to use the c prefix in front of it.


#include <iostream>
#include <stdlib.h>

using namespace std;

// Prototypes
void DrawCurrentBoardState(char *n);
void StartGame(char *n);
void CheckForWin(char symbol, char *n, bool *q);
void PlayerXTurn(int *pos, char *n);
void PlayerOTurn(int *pos, char *n);

int main(void)
{
// Declarations
char boardData[9];

for(int i = 0; i < 9; i++) // initialize boardData elements
{
boardData[i] = ' ';
}

StartGame(boardData); // start the game
system("PAUSE"); // pause at end of game to keep window open
return 0;
}

void DrawCurrentBoardState(char *n)
{
for(int i = 0; i < 9; i++) // dispaly board data
{
// checks to see if the value is a multiple of three by
// using modulus to make sure there are no remainders
// this allows the drawing of the game board to be exact
// tic tac toe dimensions
if((i + 1)%3 != 0 || i == 0)
{
cout << n[i] << "|";
}
else
{
cout << n[i] << "\n";
}
}
cout << "\n";
}

void StartGame(char *n)
{
bool running = true;
int possition;

cout << "Welcome to TextTicTacToe!" << "\n" << "\n";

DrawCurrentBoardState(n); // display the most current boards data

while(running)
{

PlayerXTurn(&possition, n);

CheckForWin('X', n, &running);

if(running == false) // if win conditions were met
{
continue;
}

PlayerOTurn(&possition, n);

CheckForWin('O', n, &running);

if(running == false) // if win conditions were met
{
continue;
}
}
}

void CheckForWin(char symbol, char *n, bool *q)
{
// check for win
if(n[0] == symbol && n[1] == symbol && n[2] == symbol)
{
cout << "Player " << n[0] << " has won the game." << "\n";
*q = false;
}
else if(n[3] == symbol && n[4] == symbol && n[5] == symbol)
{
cout << "Player " << n[3] << " has won the game." << "\n";
*q = false;
}
else if(n[6] == symbol && n[7] == symbol && n[8] == symbol)
{
cout << "Player " << n[6] << " has won the game." << "\n";
*q = false;
}
else if(n[0] == symbol && n[3] == symbol && n[6] == symbol)
{
cout << "Player " << n[0] << " has won the game." << "\n";
*q = false;
}
else if(n[1] == symbol && n[4] == symbol && n[7] == symbol)
{
cout << "Player " << n[1] << " has won the game." << "\n";
*q = false;
}
else if(n[2] == symbol && n[5] == symbol && n[8] == symbol)
{
cout << "Player " << n[2] << " has won the game." << "\n";
*q = false;
}
else if(n[0] == symbol && n[4] == symbol && n[8] == symbol)
{
cout << "Player " << n[0] << " has won the game." << "\n";
*q = false;
}
else if(n[2] == symbol && n[4] == symbol && n[6] == symbol)
{
cout << "Player " << n[2] << " has won the game." << "\n";
*q = false;
}
else if(n[0] != ' ' && n[1] != ' ' && n[2] != ' ' && n[3] != ' ' &&
n[4] != ' ' && n[5] != ' ' && n[6] != ' ' && n[7] != ' ' &&
n[8] != ' ')
{
cout << "A Tie." << "\n";
*q = false;
}
}

void PlayerXTurn(int *pos, char *n)
{
cout << "Player X which possition would you like to take 1 - 9" << "\n";
cin >> *pos;

if(n[*pos - 1] == ' ')
{
n[*pos - 1] = 'X';
DrawCurrentBoardState(n);
}
else
{
cout << "Space already taken." << "\n";
DrawCurrentBoardState(n);
PlayerXTurn(pos, n);
}
}

void PlayerOTurn(int *pos, char *n)
{
cout << "Player O which possition would you like to take 1 - 9" << "\n";
cin >> *pos;

if(n[*pos - 1] == ' ')
{
n[*pos - 1] = 'O';
DrawCurrentBoardState(n);
}
else
{
cout << "Space already taken." << "\n";
DrawCurrentBoardState(n);
PlayerOTurn(pos, n);
}
}






[Edited by - TheNobleOne on October 1, 2004 2:58:16 PM]

Share this post


Link to post
Share on other sites
The functions PlayerXTurn and PlayerOTurn are very similiar.. why don't you create a seperate function and pass the symbol as parameter?

Instead of checking all the fields you could increment a variable and check if it equalls the possible number of turns.. (This is just they way I would do it.. But your methode is also valid :) )

Why are you passing Position as a pointer to PlayerXTurn/PlayerOTurn? Pos is initialised in the function and it's not being used outside the function.

Have a look at passing parameters by reference. You could change the CheckForWin function to take q as a reference instead of a pointer(cleans up your code)

Good luck :)

Share this post


Link to post
Share on other sites
Well the reason I passes possition as a pointer was to modify the value in that memory address of possition. possition is defined in the StartGame function but I need to use it in other functions. However it just happens that all functions are called by start game so it is just quicker then making all the other functions return a value especially since some functions alter multiple values.

I have two different functions for PlayerXTurn and PlayerYTurn to help in my mind explain that they are two seperate entities playing the game. Just that 2 functions make it a little more obvious.

As far as passing by reference instead of using pointers. I personally like pointer notation. They are flexible and it is just one way to pass something around by reference. Some people may not prefer to read pointer notation I do. Plus if I am correct pointers can give some more control over memory then just passing a value by ref.

The code is not very well commented and I will do that as i am going to make a code portfolio for when I finish my degree. It may help me get a job. Also, I am going to make a consistency change. My prototype for StartGame is

void StartGame(char *n);

however my function def says

void StartGame(char n[])

I will make that read

void StartGame(char *n)

Share this post


Link to post
Share on other sites
Quote:
Original post by TheNobleOne
Well the reason I passes possition as a pointer was to modify the value in that memory address of possition. possition is defined in the StartGame function but I need to use it in other functions. However it just happens that all functions are called by start game so it is just quicker then making all the other functions return a value especially since some functions alter multiple values.


You're right about the use of pointers but I refactored your code and if you would just remove the ' int position' from your startgame code and declare it in PlayerXTurn/PlayerOTurn there is no need for passing it around. You are using initialising it with some user input, then you use Pos as an index to your array.. you don't need the value after you've used it as array index. It would make sence to declare positon in Startgame and pass it as a pointer if you would use the value after the function returns(and changed the pointer) But you're not using position in startgame so why pass it as a pointer? :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Mode13h


Oh good god! Welcome to 1992. Use DirectX or OpenGL. It's easy.

Share this post


Link to post
Share on other sites
Quote:
Original post by TheNobleOne
Well I am not technically a beginner. I am actually a comp sci major. However, I am new to C++ as in school we use java and normally i use C#.


O_O

Java and C# use zero-based arrays too, as a comp sci major you really ought to be familiar with them, and the standard mathematical tricks that go along with them.

Share this post


Link to post
Share on other sites
Yes I know they use 0 based arrays lol. It is just that when I was coding I kinda had a mind lapse lol. I would have realized it after I looked over my code for changes to make. Also, I would have slaped myself for exceeding the boundries :S

Oh btw I am a first year comp sci major. And we are only into the first semester of the first year lol. I actually hate all the general classes I have to take. I would much rather be taking another course related to my major instead of Philosophy.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Mode13h


Oh good god! Welcome to 1992. Use DirectX or OpenGL. It's easy.


Yea right, Mode13h is dead, along time ago.At least for commercial games.For a learner/begginer it's still good as an entry level graphics mode.Lot of classic tutorials where the basics of graphics programming are taught are in Mode13h.There's no need to use asm and a decade old code for applying this.You can use the latest 32-bit stuff, under DMPI. Get DJGPP and you can use all the algoritms and other stuff without worrying about old restrictions and much of the memory crap.Once you get into the mode it's almost all the same.After your are comfortable with the basics move on to OpenGL and DirectX.If these are started on early, you might miss a whole load of classic stuff and very simple basics with the APIs doing it for you.

I would not recommend you stick with Mode13h more than for experimentation and for learning,also maybe for a game.320x200 is too small a resolution for fun stff.There's SVGA(horror if you try to program it directly) which offers much higher resolutions,
though I would recommend staying away for it since it's support is nothing like that of mode13h on hardware.

The importance of Mode13h is that it allows you direct access to the screen (video card mem) which allows you to learn/implement various basics in graphics like double buffering,line drawing (drawing algoritms), bmp loading etc. without any help, which will force you to learn a lot of things,unlike being pampered by the APIs.

I do admit Mode13h is a bit difficult if you compare the ease of use of the APIs when it comes to doing tasks like rendering,pic loading etc,but what you really learn about graphics programming is very limited,but you can concentrate on the game programming side.

I been using VGA,VESA modes ,GDI and OpenGL.As far as I am concerned ModeX(VGA) modes are crap when it comes to real world application and of no use except that they give a slight increase in screen resolution and I recommend m13h only for getting direct screen access without any help,so that one can try out various fun basics without going into outdated hardware intrupt code in detail.Just use some code you find off the net to get into the mode.

SVGA is fun too, there's a small bit of good code out there, which is DJGPP specific,so you can use that to gain higher resolutions and a virtual screen, without even once looking at the code underneath.

There are a couple of GUI APIs/Libraries which offers you a linear buffer like the VGA/VESA modes, ask if you want more info will you..

Unless you are willing to brave some waters you will never be able to really learn graphics programming.Game programming you can learn using APIs and I would recommend it too, but most people who really understand graphics programming might recommed you learn rendering techniques too while learning to program games.

[Edited by - FireNet on October 2, 2004 11:36:46 AM]

Share this post


Link to post
Share on other sites
Just a couple of suggestions:

You could use a constant char array to declare and initalize a blank board, and then pass the board by value to make a copy of the board for game play. These provides an easy way to create a new blank board for another game. It also would eliminate a for-loop.

In your StartGame function you can use
while(running == true)
instead of using an if statement and then continuing the loop.

Functions should typically do only one task, CheckForWin would be better if it checked for a winner and returns who the winner is (X O or nobody), and another function PrintWinner should be used to print the winner to the screen. It's seems trivial now, but it's very important in larger programs.

Ideally, the player's turn function should be one function since both players perform the same task and this will make code changes easier, but if it helps you to visualize what's going on, who am I to judge?

Hope these suggestions help.

Share this post


Link to post
Share on other sites
Hmm, I'd really don't go for mode 13h. Even the Win32 API (GDI) is better and more programmer friendly. So I recommend you to go for either SDL or GDI.

Good work, though! You're right on the track.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this