I wasnt' sure whether or not it's appropriate to put this here, so if it's not just delete it and i won't complain...
I just finished the second version of a backburner project I've been working on for a while now... It's a battle system, and I want a little feedback on what I can do to make it better, etc. etc... please no suggestions for a GUI... I don't know how to do that yet, and that may happen one day later anyway...
here's the link:
thanks in advance ;-)
It wasn't bad. You may want to add a "Log In" option or something though, rather than re-start the program. I know it's not a big deal or anything, but it'd be a little nicer. Also, I played it like 5 times and my guy ALWAYS lost, player 2 always won...maybe a glitch??? I dunno, just telling you. Not bad though :)
take advantage of these two functions to make your program a lot prettier...
// SetConsoleCursorPosition( handle, COORD )
coordinate.X = xPosition; // a standard console window is 80 cells across. ( 0 - 79 )
coordinate.Y = yPosition; // a standard console window is 25 cells long. ( 0 - 24 )
// move cursor to specified coordinates
SetConsoleCursorPosition( GetStdHandle(STD_OUTPUT_HANDLE), coordinate );
its as simple as that :)
// SetConsoleTextAttribute( handle, attribute )
// these are the basic colors to use:
#define RED FOREGROUND_RED | FOREGROUND_INTENSITY
#define BLUE FOREGROUND_BLUE | FOREGROUND_INTENSITY
#define GREEN FOREGROUND_GREEN | FOREGROUND_INTENSITY
#define BGRED BACKGROUND_RED | BACKGROUND_INTENSITY
// mix red/blue for magenta, red/green for yellow, blue/green for cyan, all colors for white, leave off intensity for darker colors, etc..
// change text to blue
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), BLUE );
// change background to red
SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), BGRED );
Colours, graphics, mouse, tutorial.
If you are going to add colours and mouse support and all that, you could also use the Console Graphics Library (I've dubbed it "CGL") that I'm going to post, probably tomorrow. It'll allow you to do all that pretty easily. Good luck with it!
thanks for the feedback... I fixed a few bugs and reuploaded the program...
harryP - that's part of my plans for a future version
thanks for all the help with the colors and fancy stuff... like I said, i was thinking about a future GUI or something, but that looks like a really good interim option ;-)