Hi guys

This is a discussion on Hi guys within the C++ Programming forums, part of the General Programming Boards category; I'm new to c++, and i need to know basically how to get really started. I looked through the faqs, ...

  1. #1
    C++ Beginner
    Join Date
    Jun 2005
    Posts
    39

    Hi guys

    I'm new to c++, and i need to know basically how to get really started. I looked through the faqs, but they act like u suppose to know what everything means. Like how to design a window, how to make textboxes in windows and stuff. Where can i learn the basics to this.

  2. #2
    Banned
    Join Date
    Jun 2005
    Posts
    594
    the stuff you just mention is not even close to basics,
    maybe the basic of soem advanced c++ stuff.

    what you need to do is get a c++ book, here is a link
    to a free online book, and read it, and complete
    the example then you will be on your way.

    http://www.planetpdf.com/developer/a...ContentID=6634

  3. #3
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    The first tutorials on this site are the very basics. You start programming in a console (black window) and do things like print text, multiplication, make lists, and stuff. That is real C++. Then you go onto making windows, buttons, sounds, graphics and such.. which you use your C++ knowledge to make/manipulate.

    You use C++ with libraries. I'd best describe it as Lego company making your building blocks (library) and you putting them together to make a castle (program), and you got to know how to put them together.. thats where the manual comes in (C++).

    An example is an interface library: win32 API (or WinThreads which does the same thing but in different ways, maybe easier ways) and its used to make windows/buttons/error messages, etc. to the Windows OS. Theres also graphics libraries like Allegro, or OpenGL, or Direct3D, which are used to make colors, graphics, boxes, and shapes, etc. Then theres sound/input libraries like DirectInput/DirectSound used to send sound files out, or etc.

    I'd follow the tutorial on this site, and some other sites, along with that online free eBook the LP provided. If you wanted you could also purchase a C++ book like C++ Primer Plus (5th Edition),
    by Stephen Prata... which is highly rated to teach you what you need to know about C++ Beginners->Intermediate->possibly Expert.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  4. #4
    C++ Beginner
    Join Date
    Jun 2005
    Posts
    39
    wow, thanks guys. do you actually have to know the basics before going to libraries, and programming games/networks? Or can you just start of doing that?

  5. #5
    *this
    Join Date
    Mar 2005
    Posts
    498
    Well you do need some basics, the win32API is acutally C and you pretty much need to know how some basic C functions work, you could learn some C++ and still be able to make programs with the win32api, its just you dont want to become confused over things that shouldnt be too confusing. Basically what im saying is that if you dont learn the basics, it will become much harder and look very confusing, you will find yourself looking up every little thing you find to figure out how it works and you probably wont produce the best code. I personally spent a LONG time with c++ and got familiar with algorithms and basically trained my mind to think like a programmer. I suggest looking through books or online lessons etc... Online stuff is easier and more helpfull if you already have a slight idea of the language.

    Hope this helps,
    if you need some good places to get tutorials or lessons let me know, I personally learned the basics plus more from online AP computer science lessons. If you want the site I can give it to you, they are awesome and fun.

  6. #6
    *this
    Join Date
    Mar 2005
    Posts
    498
    Also you can find a book online for free, I think its called Sams Learn C++ in 21 days. Search it, its a full awesome book with tons of examples that is free online, but you can also buy it...dont know why someone would buy it if it was free...

  7. #7
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    You got it. Learn C++ topics that are in the book link, and tutorial, then move onto programming games/networks/etc (like said in my last post).

    I personally (to give an example of good background before moving on) have followed 3-5 tutorials, 1 online book (and skimmed others), and will be finishing up with the books 'C++ Primer Plus', and 'Accelerated C++: Practical Programming by Example' and THEN I will be moving onto REAL games/networks/etc., and those sections start off basic themselves too. BTW, if you're serious, those two named books together.. are lethal.

    However! that doesnt mean you cant make basic text games. You'll find you could easily make a text game (in a black console window) after reading the first tutorial pages just to practice what you've learned.

    The one JoshR said: http://newdata.box.sk/bx/c/
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  8. #8
    C++ Beginner
    Join Date
    Jun 2005
    Posts
    39
    thats what i basically want to do right now is make a text game, that everyone who downloads the program will go to a server to play it. That is my ultimate goal at this point in time.

  9. #9
    C++ Beginner
    Join Date
    Jun 2005
    Posts
    39
    except that I don't want it in the black console window, I want it in a regular window, with admins/mods and everything controlling the server.

  10. #10
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Quote Originally Posted by Renegade
    thats what i basically want to do right now is make a text game
    Lightatdawn did some textgame lessons

    http://lightatdawn.cprogramming.com/

    ~/

  11. #11
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Renegade
    thats what i basically want to do right now is make a text game, that everyone who downloads the program will go to a server to play it. That is my ultimate goal at this point in time.
    To give you an idea how you progress your game as you learn:
    1) Simply print text to an intro of your game,
    2) Add a menu (start, inventory, explore etc) using a switch statement.
    3) Add health, mana, energy, stamina, whatever, etc. variables.
    4) On 'explore' add random cases where either rat, wolf, possom, owl, etc. pop up from no where (using rand() in <cmath>)
    5) On each case where you're in a fight, add menu to attack, retreit, etc., and on attack monster's health variable loses (-) the attack damage. The attack damage could be based on your weapon, which could be an object of a struct that defines the minimum dam, maximum dam, and penetration % maybe (use a random 1-100 float, if == penetration %, +50% dam.), then use your random function to randomly choose between your weapons min-max dmg. to take away from the targets hp.

    ie. The Adventure of You, from the game topic: Post your games here...

    Alright I could go on, but I wont because you shouldnt waste too much time on practice programs unless you're using code you need to practice.. and that stuff is pretty simple. I'd say none of it goes past tutorial 5 on this site. Thats like the most basic you can go for an RPG game.

    You dont need to worry about your goal, as weird as that sounds, to get to your goal quickly. Simply study C++ your ass off, and make those pointless suggested programs as practice and when you're done with the basics you can write up a text game easily (some people delve into it, copying and pasting code and just waste time).

    Of course to have the one you wanted, a server, with an interface, you'd need to learn basics, then winsock and win32 (or some other API).. but that isnt hard at all if you know C++, because those are just building blocks

    The link in the last post has nice concepts for a text-based game.. however its in C, so I wouldnt even look at it until your past half-way on the eBook.. and know the basic differences of C and C++ (byebye(strcmp, printf, getch), wth's allocating, dont use #define, can you say class?, lose that .h grr, etc.)
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  12. #12
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Quote Originally Posted by Dae
    The link in the last post has nice concepts for a text-based game.. however its in C, so I wouldnt even look at it until your past half-way on the eBook..
    Interestingly enough, it is supposed to be a C++ program:

    /*
    *** TEXTGAME1.CPP ***
    VERSION 1.0 OF TEXTGAME
    Written by lightatdawn
    This is the basic framework for starting a simple text based game.
    There are many different methods I can think of to do this, but
    this is the method I picked. I will work from this stage to a much
    more advanced stage in later versions.
    You cant win or do anything except walk around in this version. Get
    familiar with the framework cuz its gonna get loaded in version 2.0.
    *** GENERAL NOTES ***
    I am going to comment EVERYTHING to make it easy to understand.
    I'm making this program in a Win32 Console platform. If it doesnt function
    right on your compiler... Ugg... (It should though.)
    I'm also not going to use cout or cin. It will be replaced by printf and gets.
    Hope this doesnt pose a problem, its just that i like printf...

    Our WORLD is set up in a grid. The grid is 3 squares by 3 squares:
    But yeah, it looks a lot like a C program - which is maybe why I even looked at it in the first place..

  13. #13
    Registered User
    Join Date
    Jun 2005
    Posts
    22
    Quote Originally Posted by Dae
    To give you an idea how you progress your game as you learn:
    1) Simply print text to an intro of your game,
    2) Add a menu (start, inventory, explore etc) using a switch statement.
    3) Add health, mana, energy, stamina, whatever, etc. variables.
    4) On 'explore' add random cases where either rat, wolf, possom, owl, etc. pop up from no where (using rand() in <cmath>)
    5) On each case where you're in a fight, add menu to attack, retreit, etc., and on attack monster's health variable loses (-) the attack damage. The attack damage could be based on your weapon, which could be an object of a struct that defines the minimum dam, maximum dam, and penetration % maybe (use a random 1-100 float, if == penetration %, +50% dam.), then use your random function to randomly choose between your weapons min-max dmg. to take away from the targets hp.

    ie. The Adventure of You, from the game topic: Post your games here...

    Alright I could go on, but I wont because you shouldnt waste too much time on practice programs unless you're using code you need to practice.. and that stuff is pretty simple. I'd say none of it goes past tutorial 5 on this site. Thats like the most basic you can go for an RPG game.

    You dont need to worry about your goal, as weird as that sounds, to get to your goal quickly. Simply study C++ your ass off, and make those pointless suggested programs as practice and when you're done with the basics you can write up a text game easily (some people delve into it, copying and pasting code and just waste time).

    Of course to have the one you wanted, a server, with an interface, you'd need to learn basics, then winsock and win32 (or some other API).. but that isnt hard at all if you know C++, because those are just building blocks

    The link in the last post has nice concepts for a text-based game.. however its in C, so I wouldnt even look at it until your past half-way on the eBook.. and know the basic differences of C and C++ (byebye(strcmp, printf, getch), wth's allocating, dont use #define, can you say class?, lose that .h grr, etc.)
    About that type of game... If I want to make a realistic rpg game with everything but the graphics, should I use the old D&D hit'n miss system, or should I stick with always hitting and just doing different amounts and types of damage? Also, on the side, if I were to publish a game that contained the D&D/NWN fighting system, could they legally sue me? If you find that an odd question, don't answer it.
    lol
    Thanks,
    David
    If at first you don't succeed,
    Skydiving is not for you.

  14. #14
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    should I use the old D&D hit'n miss system, or should I stick with always hitting and just doing different amounts and types of damage
    That's really up to you. It's your game . Also, if you want to make some games (slightly cheap games) I would suggest a program called Game Maker.

    Game Maker

    Game Maker also includes a coding language called Game Maker language.

    Or you can try RPG Quest 2000, its another thing for making some dumb games, but is still awesome.BTW Game Maker has the ability to do some online capabilites so if you ever wanted to make your game for online usage, I am pretty sure Game Maker could do it. There is a tutorials on the site I posted. And it's free.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  15. #15
    Dae
    Dae is offline
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by Dkunsberg
    About that type of game... If I want to make a realistic rpg game with everything but the graphics, should I use the old D&D hit'n miss system, or should I stick with always hitting and just doing different amounts and types of damage?
    You can do whatever you want really.

    The battle system, the hit and miss system, all of that is just event handling and not copyrightable. The only thing that might be copyrighted is monsters/monster names, maybe spell names, etc. but not all of them, and not ones that are also words. Also wouldnt worry about it, unless you are selling the product, you can pretty much do anything. Not only would you not have to worry about this because those types of games are waaaay advanced from what you're doing now, but if it was a copyright problem you simply contact the company about your project. You'll find D&D is affiliated with most RPG's in some way, in some they pose their image up front (like on NWN) but on Diablo and Warcraft: owned by Blizzard, Blizzard is owned by some other company, that is affiliated with D&D.

    Lots of people making graphical games will use the models made for NWN, or Morrowind, etc. and the sound files from Warcraft, etc. to get started.

    Just a note.. if you make a game in a console window (the black window) for practice and such, make it just for practice, because theres no way you're going to convert it to a real graphical game without re-writing all the code: for various reasons.

    I remember Game Maker, it was hella fun indeed.. but learning Game Maker and using it is really just for fun (its a premade engine, and you are just putting spell/item data in). I played around with it for a few hours and got some ideas off it, but thats it.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hey guys, I'm new!
    By MrDoomMaster in forum C++ Programming
    Replies: 15
    Last Post: 10-31-2003, 04:47 PM
  2. How long have you guys been working with C/C++??
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 08-01-2003, 03:41 PM
  3. Tic Tac Toe -- Can you guys rate this please?
    By Estauns in forum Game Programming
    Replies: 2
    Last Post: 09-15-2001, 10:22 AM
  4. hello guys
    By lupi in forum C++ Programming
    Replies: 4
    Last Post: 09-13-2001, 06:42 AM
  5. hello guys
    By lupi in forum C++ Programming
    Replies: 1
    Last Post: 09-09-2001, 01:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21