Thread: Save system...

  1. #16
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    I have done all those tutorials, but that one isnt a binary file. Thank you but I dont think that is what I am looking for... and wraithan thanks for your help, but finding anything on binary is like finding a needle in a haystack. I am going to keep looking for stuff on it, but so far has lead me nowhere.

  2. #17
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Alright I know you guys get tired of so many questions, and I am sorry, but this is more of a yes/no question I think.
    Are these mathematics sufficient for statistics relationships?
    Code:
    //for Hit Points to even at 9999 at 99 constitution uses the following formula
    
    HitPoints  = { ( constitution * ( constitution + 2 )) }
    
    //same goes for mana as hit points
    
    ManaPoints = { ( magic * ( magic / 2 )) }
    
    //Damage is a little more complicated using this formula
    
    defense = ( defense * defense + armorbonus );
    damage =( ( strength * ( strength )) - defense + weaponbonus);
    
    // this if function checks for below 0 dmg to prevent atacker from healing the defender
    
    if ( damage < 1  ) { damage = 0; };
    These are just a couple of my stat systems. but I am wondering if doing something that simple will really work well? I did create a program allowing you to modify each variable to see the outcome, which worked just really wondering if there is a better, more fool proof way of doing this. Yet again thank you very much

  3. #18
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    If you look at all of the available I/O functionality in C/C++ you will find some commonalities.

    Both streams, array-based and character based I/O (used to be called byte based) support reading one character, one item, and also support block reads and writes.

    You can do binary files with streams or standard good old C I/O. For me it doesn't matter how you do it and one way doesn't make you more elite than another. Just choose a method that gets the job done.

    It amazes me that people have problems with I/O in C/C++ when so much support is given for this exact thing. There are about 10 ways I can think of right now to save and load data and that's probably just the tip of the iceberg.

    Read the help file and go through some of the examples and you will see the plethora of I/O available to you.

    No other language comes close to the C/C++ level of I/O functionality.
    Last edited by VirtualAce; 07-14-2006 at 11:15 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Save vs Save As.... OPENFILENAME flags
    By csonx_p in forum Windows Programming
    Replies: 16
    Last Post: 06-01-2008, 02:42 PM
  2. save and save as functions
    By willc0de4food in forum Windows Programming
    Replies: 2
    Last Post: 06-29-2005, 02:49 AM
  3. save webpage? some save some not
    By kryptkat in forum Tech Board
    Replies: 3
    Last Post: 06-07-2005, 09:21 AM
  4. Ask user to save file before exiting.
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 11-15-2004, 06:34 PM
  5. System Commands Output
    By nasir_qau in forum Linux Programming
    Replies: 2
    Last Post: 03-21-2002, 03:14 PM