Thread: How to make a Console Save and Load Game

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Question How to make a Console Save and Load Game

    Hey guys i want to make a Console game.

    Im thinking beggining with the thing for Save and Load.

    How can i do that?


    Another Question:

    - How to make a random number to change the game every time that the game is started (without a saved game)

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    To save and load, you should write a saved state to a file. Read up about I/O tutorial if you don't know how.
    To make a random number, you would use std::rand. Be sure to read a tutorial on random numbers to accomplish this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I think it is a bad idea to start with saving and loading since you have no idea what it is you need to save unless you have a thorough game design.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File Save and Load
    By lukesowersby in forum C Programming
    Replies: 3
    Last Post: 05-13-2009, 12:49 AM
  2. Replies: 11
    Last Post: 04-17-2008, 02:29 AM
  3. How to save a game
    By kennny2004 in forum C++ Programming
    Replies: 8
    Last Post: 10-20-2005, 12:23 AM
  4. Replies: 1
    Last Post: 04-14-2005, 04:49 PM
  5. Save Load....
    By KrAzY CrAb in forum C Programming
    Replies: 2
    Last Post: 06-02-2002, 11:18 PM