Game Starter?

This is a discussion on Game Starter? within the C++ Programming forums, part of the General Programming Boards category; I started about 4 text based RPGs when I was first starting (I'm still learning!) but I found that while ...

  1. #16
    Grammar Police HybridM's Avatar
    Join Date
    Jan 2003
    Posts
    355
    I started about 4 text based RPGs when I was first starting (I'm still learning!) but I found that while I was writing lots of code, it was all quite basic and I wasn't learning and practicing any new concepts.

  2. #17
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    yes...

    you know I had just finished this:


    #include <iostream>
    #include <stdlib.h>

    using namespace std;
    int main(int argc, char *argv[])
    {
    cout<<" -=([ The Land Of Lista ])=- "<<endl;
    cout<<" * |>>> +"
    cout<<"+ * | * +"
    cout<<" |>>> _ _|_ _ * |>>>"
    cout<<" * | |;| |;| |;| | *"
    cout<<" + _ _|_ _ \\. . / _ _|_ _ +"
    cout<<" * |;|_|;|_|;| \\: + / |;|_|;|_|;|"
    cout<<" \\.. / ||:+++. | \\. . / *"
    cout<<" + \\. , / ||:+++ | \\: . /"
    cout<<" ||:+ |_ _ ||_ . _ | _ _||:+ | *"
    cout<<" * ||+++.|||_|;|_|;|_|;|_|;|_|;||+++ | +"
    cout<<" ||+++ ||. . . . ||+++.| *"
    cout<<"+ * ||: . ||:. . . . , ||: | *"
    cout<<" * ||: ||: , + . ||: , | +"
    cout<<" * ||: ||:. +++++ . ||: | *"
    cout<<" + ||: ||. +++++++ . ||: . | +"
    cout<<" + ||: . ||: , +++++++ . . ||: | +"
    cout<<" ||: . ||: , +++++++ . . ||: | *"
    cout<<" ||: . ||: , +++++++ . . ||: |"
    return 0;
    }


    When i realised that, COUT is soooo easy! so i will try to make a star bounce around the screen or something! lol
    EDIT: uh.... in DEV-C++ it looks like a castle.

  3. #18
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Positioning the cursor is covered, along with a load of other stuff, in my consoles tutorials.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #19
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    Smile dude!

    wow, those are GREAT tutorials. you broke it down so nicely! I drew colored ASCII with it! lol, my dragon breathes fire now! I might upload it soon... i like the CMD animation. but thx a lot, i will often read more of ur tuts.

  5. #20
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Instead of coloring your code red or putting it in a quote, please use [code] /*insert code here */ [/code] tags.

    There's technically not anything wrong with this:
    Code:
    if (CA_NO == 0) { if (L1_R1 == 0) { L1_R1 = 4; CA_NO = 1; } }
    But it's a bit more readable and (I think) faster if you do this instead:
    Code:
    if ( (CA_NO == 0) && (L1_R1 == 0) )
    {
         L1_R1 = 4;
         CA_NO = 1;
    }
    I just used a logical AND (&&) in the if statement and then changed the formatting. Further, ALLCAP names are generally used for constants and #defines, while lowercase or MixedCapitalization is used for variables. It's a minor issue, and definitely easy to change, but there's a reason for the convention (I won't bore you with the details now). It's safer to stick with lowercase or MixedCaps for your variable names.

    edit: You don't have endl after your couts for the castle.
    Away.

  6. #21
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> those are GREAT tutorials.

    Thank you. There are a couple more sections to come in the console tut. I am converting them from my old C tut's, but have so little time
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 02:12 AM
  3. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  4. Try my game
    By LuckY in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 09-15-2004, 12:58 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