Search:

Type: Posts; User: SqueakyPebble

Search: Search took 0.00 seconds.

  1. Replies
    15
    Views
    12,308

    Well, you could have a ChooseChar function, in...

    Well, you could have a ChooseChar function, in which it gets the players choice, and depending on that choice sets the attributes.
    like, for example:



    int agility;
    int strength;
    ChooseChar...
  2. Replies
    15
    Views
    12,308

    Question: What do all those numbers in front...

    Question:

    What do all those numbers in front of the words do? I haven't seen code like that before...
  3. Replies
    15
    Views
    12,308

    Change it to: void player::goNorth () { ...

    Change it to:


    void player::goNorth ()
    {
    if (location->toTheNorth != NULL)
    {
    location = location -> toTheNorth;
    text("You are now heading North"); //or whatever you want...
  4. Replies
    15
    Views
    12,308

    You could also make an array of rooms, with the...

    You could also make an array of rooms, with the player's coordinates being one room in the array.



    int a =1,b=1;
    room [15] [15]; //a 15*15 array of rooms
    player.location = room [a] [b];
    void...
  5. Replies
    18
    Views
    1,839

    Well, this is embarrassing. I'm assuming...

    Well, this is embarrassing.
    I'm assuming tolower and toupper change the case of a letter?
    In that case, the first version (or the new version) would work just fine. Oops :/
  6. Replies
    18
    Views
    1,839

    you should add && t!= 'a' && t!= 'u', etc to line...

    you should add && t!= 'a' && t!= 'u', etc to line 13, otherwise it will count all of the lowercase vowels as consonant.
  7. Replies
    18
    Views
    1,839

    In normal english, its: While the variable c is...

    In normal english, its:
    While the variable c is not equal to small a
    c is the variable, defined on line 7 and initialized on line 11
    != is the not equal to operator
    and putting ' around the 'a'...
  8. Replies
    15
    Views
    12,308

    Though it's hard to be absolutely certain without...

    Though it's hard to be absolutely certain without knowing what else in your game needs to move, I think the best course of action is to put the movement in the player class.

    As for what needs to...
  9. Replies
    10
    Views
    1,844

    You know...

    There is another option. If you can't find a book on game programming in C, just look for one on the C language itself.

    Then you can look for game programming in general to help you with the...
Results 1 to 9 of 9