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.
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.
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.
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.
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.
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:
But it's a bit more readable and (I think) faster if you do this instead:Code:if (CA_NO == 0) { if (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.Code:if ( (CA_NO == 0) && (L1_R1 == 0) ) { L1_R1 = 4; CA_NO = 1; }
edit: You don't have endl after your couts for the castle.
Away.
>>> 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.