Learning game C++ but different

This is a discussion on Learning game C++ but different within the C++ Programming forums, part of the General Programming Boards category; I have read through most of your begginer tutorials on C++ but i believe i would learn it alot better ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    3

    Learning game C++ but different

    I have read through most of your begginer tutorials on C++ but i believe i would learn it alot better if i actually applied it other than repeating the code in bloodshed. I want to specilise in a certain area of C++ i don't know if these forums condem it but i want to learn mostly how to create bots or autotrainers for games. I was hoping someone could point me in the right direction now that i have the basis of C++ under my belt so i could get started and actually do some programming instead of just theory.

    all help would be appreciated

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    Even if you have covered the tutorials in this site in good detail,
    there's still lots to learn - I suggest honing your skills on this
    forum - I spend a lot of time here working through other peoples
    code, attempting some of their projects that interest me and the
    like. You can learn some really important things that help you
    out in daya to day coding here, not to mention the many
    subtleties of the language. I agree that you shouldn't just run
    demo code, writing actual programs is where you get the best
    experience. Try getting a well recommended book that also
    has assignments - Thinking in C++ is often recommended for
    advancing your knowledge, as is Accelerated C++, although
    I can't say for certain if they have assignments. Do a board
    search for info.

    All the same, don't underestimate the value of code tinkering -
    if you do as I do and try to answer forum questions, valuable
    experience can be gained by attempting to improve upon someone
    elses approach to their task - There's nearly always more than
    one way to solve a problem is my motto - it stands to a
    programmer to be able to see a task from all angles. Also
    google for programming contests - there are loads of different
    difficulty levels, you don't even have to enter, so long as you
    get ideas for mini projects.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    903
    Knowing the language is easy. Knowing what to do with it is harder.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    34
    Not sure about programming a bot, but making a game trainer isn't all that hard. The part that's hard is the reverse engineering, and finding out what part of the code affects what. Like trying to figure out what part of the code decreases the variable that controls how many bullets your gun has. For that, you'll need tools that monitor a game's memory, and then you'll need some skills in assembly language to figure out how to modify the game code (in memory) in order to affect that variable. Coding a game trainer is fairly easy...it basically just involves writing some byes (representing machine code) into memory, and maybe setting up hotkeys so you can press like F9 to get 99 lives.

    I can only guess what you'd need to make a bot. I would think you'd need some serious reverse engineering skills, and also game programming skills. If you could code your own game and add a bot to it, you'd have a good start. But if you couldn't do that, I would say you'd have a really tough time coding a bot for a game you don't have the source code for.

    Here's a link that might help you get started. It has quite a few tutorials, but I couldn't really tell you were to start.

    http://pc.nanobot2k.org/?action=articles

    And here's a few forums that deals with game hacking...both have a section on programming, and they can probably help you more than this forum...

    http://www.unknowncheats.com/forum/
    http://www.mpcforum.com/

  5. #5
    Registered User
    Join Date
    Apr 2005
    Posts
    76
    My first so called "major project" was a Phonebook Entry Program where the user can create a .txt file and add,edit, or delete entries with a Name Cell Phone Number, Home Phone Number, and Address, then save the file.

    Actually, I am currently just making it work more eficient and adding more display characters that look nice in the DOS screen.

    This is a plus side to tiny projects... you complete them ... learn something the next day. Improve the code you have based on new ideas, new paradigm, and new techniques that would be suitable for that project.

  6. #6
    Registered User
    Join Date
    May 2006
    Posts
    3
    thanks veecee i had a look and man theirs lots.I thought making a game trainer would be simple to the extent of putting code into bloodshed debuging compiling and running.Their so much i just need an expirienced bot maker to point me in the right direction becuase there is so much stuff.I don't really wanna learn how to game hack(changing packets and stuff) but more just a programm that clicks the mouse here and reads a lil health there and maybe finds a moving icon and "attacks" by hitting the "r" key or something.So i guess what im really looking for is maybe functions that do these and how i code them.

    thanks for the help so far

  7. #7
    Registered User Kurisu's Avatar
    Join Date
    Feb 2006
    Posts
    62
    ouch! no offense, but you seem to be waaaaaaaay over your head from atleast my understanding of what your trying to do compared to how much you know right now. Your more likely to get hit by a stray banana peel while driving down the highway than to figure this out in the next year... but uh.. good luck!

    Oh if you need a good Real-time debugger to monitor a program while it is running I've found SoftIce to be useful.
    Last edited by Kurisu; 05-21-2006 at 12:00 AM.

  8. #8
    Registered User
    Join Date
    May 2006
    Posts
    3
    **sigh** at the moment it seems so

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    34
    Yeah, I would say it's a bit too much for someone who's just learned the basics of C++, but I wouldn't get discouraged if that's what really what you want to do.

    Perhaps you could start with messing around with windows apps (I'm assuming you're on windows since you say you use visual studio). For example, one program I made while learning this kind of stuff was a program that clicks buttons on the Windows Calculator app. First I had to find out the ID number of the buttons (using Spy++ that comes with visual studio), then I searched for the calculator windows, and sent some messages to the buttons that faked a mouse click.

    For games it's kind of similar...you can send messages to the game's window to do things (this may not always work though). If you were trying to have it click somewhere on the screen that has a menu, that's pretty easy since the mouse coordinants will always be the same. But if you were trying to click on a moving target, like in an FPS game, that would be much more difficult. In the case of a moving target, you're basically "blind", so you need some way of figuring out where and when to send a message to click the mouse or whatever. To pull that off, you'd probably need a few years of experience in reverse engineering skills. But for static locations on the screen or sending key presses...I think you could do that with only a little experience.

    So, start out simple. Learn some basic windows programming so you can figure out how to send a message to a window. Then perhaps do something like simulating mouse clicks on the calculator app, or maybe one of those card games like Solitare.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  2. craps game & dice game..
    By cgurl05 in forum C Programming
    Replies: 3
    Last Post: 03-25-2006, 07:58 PM
  3. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  4. Game Programmer's AIM Circle: Join Today
    By KingZoolerius66 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-20-2003, 12:12 PM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-25-2002, 12:00 AM

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