• Advertisement

RussDawgUnlimited

Member
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

121 Neutral

About RussDawgUnlimited

  • Rank
    Member
  1. C++ Tutorials?

    So I'm just starting to learn C++ and I was just inquiring about some good C++ tutorials? Preferably ones that are most up to date. I've been watching a beginner video series hosted by Xoax, and its pretty good about covering essentials but I'm wanting a little more and I just can't seem to find any good ones so far from my google searches. Would be much appreciated! Thanks in advanced guys! (In case I dont stop by for a while) [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img]
  2. Am I doing something wrong?

    [quote name='Cornstalks' timestamp='1347586978' post='4979906'] You should look into using arrays. They'll simplify your code greatly. [edit] [/quote] Please elaborate briefly, arrays? (still learning so forgive me, I've only just started a few weeks ago, got a few books i read in my spare time) SwiftCoder, apologies, i'll keep that in mind next time.
  3. Am I doing something wrong?

    Thanks guys really appreciate it, Swiftcoder, sorry bout that lol, I'll keep that in mind next time,
  4. Am I doing something wrong?

    So I'm starting to learn me some programming, and I decided to start with C++ as its the most prominent, Ive been watching some tutorials and reading up on some books i found, did a program from a tutorial from Xoax.net ([url="http://www.youtube.com/playlist?list=PLA68C1F33757B4A38&feature=plcp"]http://www.youtube.c...38&feature=plcp[/url]) and I attempted to copy his game (Lesson 9 Tic Tac Toe) to see if I have an understanding of what Im doing (lol) I understand the program, but when i generate this code it comes up w/ an error msg: "The program cannot find the file specified." I've tried looking into it but it seems to be an error w/ Visual C++ Basic (2010) not being able to create a .exe file for the program, I've tried to reinstall multiple times but to no avail, any ideas? Or is it because of an error in my code? I've compared it to the Xoax code and I didnt see anything different... Heres my code for a tic tac toe game in the console: [source]#include <iostream> int main() { char cSquare1('1'); // Why not int? Char for letters/int for #'s? char cSquare2('2'); char cSquare3('3'); char cSquare4('4'); char cSquare5('5'); char cSquare6('6'); char cSquare7('7'); char cSquare8('8'); char cSquare9('9'); int iPlayerTurn(1); bool bGameOver(true); //Main Game Loop do { // Board std::cout << cSquare1 << "|" << cSquare2 << "|" << cSquare3 << std::endl; std::cout << "-+-+-" << std::endl; std::cout << cSquare4 << "|" << cSquare5 << "|" << cSquare6 << std::endl; std::cout << "-+-+-" << std::endl; std::cout << cSquare7 << "|" << cSquare8 << "|" << cSquare9 << std::endl; //Player Mark 1 or 2 char cPlayerMark; if (iPlayerTurn == 1) { cPlayerMark = 'X'; } else { cPlayerMark = 'O'; } //Player Move std::cout << "Player " << iPlayerTurn << "'s Turn" << std::endl; bool bValidMove; //needs valid move, if no valid move then loop until valid do { char cNextMove; std::cin >> cNextMove; bValidMove = true; if (cNextMove == '1' && cSquare1 == '1') { cSquare1 = cPlayerMark; } else if (cNextMove == '2' && cSquare2 == '2') { cSquare2 = cPlayerMark; } else if (cNextMove == '3' && cSquare3 == '3') { cSquare2 = cPlayerMark; } else if (cNextMove == '4' && cSquare4 == '4') { cSquare2 = cPlayerMark; } else if (cNextMove == '5' && cSquare5 == '5') { cSquare2 = cPlayerMark; } else if (cNextMove == '6' && cSquare6 == '6') { cSquare2 = cPlayerMark; } else if (cNextMove == '7' && cSquare7 == '7') { cSquare2 = cPlayerMark; } else if (cNextMove == '8' && cSquare8 == '8') { cSquare2 = cPlayerMark; } else if (cNextMove == '9' && cSquare9 == '9') { cSquare2 = cPlayerMark; } else { std::cout << "INVALID GO AGAIN" << std::endl; bValidMove = false; } } while (!bValidMove); bGameOver = false; bool bWinGame = true; // check if game over if(cSquare1 != '1') { if (cSquare2 == cSquare1 && cSquare3 == cSquare1) { bGameOver = true; } if (cSquare4 == cSquare1 && cSquare7 == cSquare1) { bGameOver == true; } } if(cSquare5 != '5') { if (cSquare1 == cSquare5 && cSquare9 == cSquare5) { bGameOver == true; } if (cSquare2 == cSquare5 && cSquare8 == cSquare5){ bGameOver == true; } if (cSquare3 == cSquare5 && cSquare7 == cSquare5){ bGameOver == true; } if (cSquare4 == cSquare5 && cSquare6 == cSquare5){ bGameOver == true; } } if(cSquare9 != '1'){ if(cSquare3 == cSquare9 && cSquare6 == cSquare9){ bGameOver == true; } if(cSquare7 == cSquare9 && cSquare8 == cSquare9){ bGameOver == true; } } //Check for No Win Condition if(cSquare1 != '1' && cSquare2 != '2' && cSquare != '3' && cSquare4 != '4' && cSquare5 != '5' && cSquare6 != '6' && cSquare7 != '7' && cSquare8 != '8' && cSquare9 != '9' && !bGameOver) { bGameOver = true; bWinGame = false; } //Declare Winner if(bGameOver) { if(bWinGame){ std::cout << "Player" << iPlayerMove << " is the victor!!" << std::endl; } //Print Endgame Board std::cout << cSquare1 << "|" << cSquare2 << "|" << cSquare3 << std::endl; std::cout << "-+-+-" << std::endl; std::cout << cSquare4 << "|" << cSquare5 << "|" << cSquare6 << std::endl; std::cout << "-+-+-" << std::endl; std::cout << cSquare7 << "|" << cSquare8 << "|" << cSquare9 << std::endl; std::cout << "Game Over" << std::endl; std::cout << "Play Again? (y/n)" << std::endl; char cPlayAgain; std::cin >> cPlayAgain; //Play Again? Yes if(cPlayAgain == 'y'){ //Clear Board bGameOver = false; cSquare1 = '1'; cSquare2 = '2'; cSquare3 = '3'; cSquare4 = '4'; cSquare5 = '5'; cSquare6 = '6'; cSquare7 = '7'; cSquare8 = '8'; cSquare9 = '9'; } iPlayer1 = 1; } else { //Alternate Player Turns if(iPlayerTurn == 1) { iPlayerTurn == 2; } else { iPlayerTurn == 1; } } } while (!bGameOver);[/source]
  5. New to programming (duh) had some questions...

    Thanks a bunch guys, this is helping a lot, but i had a couple of other questions also, like the math, i understand that you need to be pretty good in math to be able to program (such as the algorithms) and i havent done any hardcore math since high school and am going to be going to college soon but i need to brush up on my math, is it fairly easy to learn without me having to depend on college classes to teach me? also, i was thinking and i wondered do programmers in the industry program off a book for their games? Or do they do all programming from their head? Is it something they know or something that they're reading up and taking from? Anyways, thanks for they help, I'll keep posting here if i have more questions, really appreciate the help guys (and gals).
  6. New to programming (duh) had some questions...

    Thanks a bunch guys, this is helping a lot, but i had a couple of other questions also, like the math, i understand that you need to be pretty good in math to be able to program (such as the algorithms) and i havent done any hardcore math since high school and am going to be going to college soon but i need to brush up on my math, is it fairly easy to learn without me having to depend on college classes to teach me? also, i was thinking and i wondered do programmers in the industry program off a book for their games? Or do they do all programming from their head? Is it something they know or something that they're reading up and taking from? Anyways, thanks for they help, I'll keep posting here if i have more questions, really appreciate the help guys (and gals).
  7. New to programming (duh) had some questions...

    Also should I just jump straight into programming games? Like try to make a pong or tetris remake? Or should I just learn to program basic programs first then move onto the gaming side of it?
  8. So I wanna start learning how to program, mostly to become a game programmer (duh) but I know i cant just jump right into game programming, I gotta learn how to program in general first. I'm really new to programming, the most I've ever really programmed was one of those games where you click and hold to make an object go up and release to go down, but that one game was made about 3 years ago and in flash, and Ive never really had time to get back into it..... But now I do have time and I'm going to make time for it too, as I'm really passionate about my games and really wanna get into the industry, and Ive always found programming interesting so I figure I better start now rather than later, but enough rambling, back to my questions: I've been reading a few "so you wanna start programming" articles just to get my feet we to see what Im getting into and I think i have the idea, i just had a few questions regarding starting up, so bear with me as I haven't programmed in a long time and I need to get back into it XD, Ive been wanting to start up using C++ but the more i read up on it i see that its not a good language to start up with due to its high difficulty for newcomers, as well as it also being outdated and inconvenient (I've read that it takes a lot of code before you can actually get a working product), so what languages would be a good starting point for someone who hasn't done any hardcore programming for years? I've been thinking of starting off with Python until I've gotten the hang of programming, then moving on to Java and C#, based off what I've read, I just want your guys' opinion. So basically what I'm trying to ask is what would you guys recommend for a newcomer? Any opinions are welcome, you guys know more than me lol, so anything you guys can offer helps a ton!! Thanks a bunch.
  9. Looking to start programming, where to start?

    Oops my bad guys, thanks for the help, I'll move over there and check it out! Appreciate the help, while im here tho i had a few questions regarding a couple of the articles: Out of all the languages, which would you guys recommend? Ive heard lots of good and bad things about C++ which is where i was going to start, but I've heard its outdated and takes too long to do simple things, but I've also heard its the best one. Isnt C# a subsidiary of C/C++? I wanted to start out using Visual Basic, but read its outdated, would C# or Python be good starting languages? If I can learn to program one language, are most of them basically the same? (I know theyre all different, but theyre all programming languages so they have similarities right)? Just some random questions I had, I'll post more in the beginners section but you guys arent beginners lol, but I'll still go to the beginners section just wanted your guys' thoughts.
  10. Im looking to get into some programming (i wanna be a game designer but i also wanna do some game programming too) and i just wanna know where are some good websites to learn from? Where are some good programs to program with? (Preferably something free, im a tad poor What language should i start with? (Ive been researching C++ but ive heard to start w/ java or python) What would be a good way to start out? Should i jump straight into trying to make games or start w/ making simple programs and work my way up? Just some help and advice would be great or if someone could point me in a direction of where to start would be great, ive just been going around different websites finding tutorials and stuff. THANKS IN ADVANCE!
  • Advertisement