Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 11

Author Topic: Wall Maker - PDcurses C/C++ Game  (Read 13567 times)

G-Flex

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #90 on: January 04, 2010, 10:04:17 pm »

What isn't, exactly?

My advice, as much as I can remember, was similar to Blacken's: To learn the fundamentals of programming and its practices before jumping into things like graphics or games, and to be patient about it.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Hippoman

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #91 on: January 05, 2010, 08:29:08 am »

What isn't, exactly?

My advice, as much as I can remember, was similar to Blacken's: To learn the fundamentals of programming and its practices before jumping into things like graphics or games, and to be patient about it.

With you guys, I could never tell what the fundamentals we're. I thought I knew them but I guess having a 2 year degree from an online college in C++ is the fundamentals or something. As far as I know, I knew more than most people.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #92 on: January 05, 2010, 11:23:29 am »

I've said it a hundred times before, but I'll say it again.
Learning C++ isn't a mammoth task.
I found it pretty easy once I accepted my dependency on libraries.
(I hadn't realized that in my old language, libraries were already in use automatically)
Note:
There are some very steep parts of the learning process once you get into it,
 but the initial climb is sugar coated and happy.

I think a rogue-like may have been too much for you as a learning exercise.
It became increasingly harder to tell you that you shouldn't keep piling on features,
 just because I knew how to do them.
You really need to go back to the beginning, look through the code,
 and figure out exactly how all of it works.

Once you can fully grasp how those houses in your code work,
 (including the double FOR loop)
 I think you'd be ready for adding in something new.
Classes though...
I struggled with glasses for a week before getting it,
 because I didn't really know what the purpose of them was.
I was looking to them as a way to capsulize my game,
 (which they are good for)
 but completely forgetting about there actual purpose.

Classes are like empty shell schematics for objects in your game.
You basically need some sort of class or struct to pull of any sort of rogue-like.

Anyways, I recommend you overlook the code with someone,
 and ask them about bits you aren't sure about, and things that are harder to understand.
Actually, your code would be perfect for Atomic Winter to take a gander at,
 as he seems to know all of the key concepts at work,
 just hasn't really seen them in action doing anything more complex.

I think the house code would even confuse him though. : )
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #93 on: January 05, 2010, 11:42:57 am »

Code: [Select]
#include <iostream>
#include <string>
int main (int argv, char* argc[])
{
std::string XD = "lol";
if("capsulize" != "encapsulate") std::cout<< XD << std::endl;
}
For some reason I found that word incredibly hilarious...   ;D
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

G-Flex

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #94 on: January 05, 2010, 04:44:16 pm »

I think a rogue-like may have been too much for you as a learning exercise.
It became increasingly harder to tell you that you shouldn't keep piling on features,
 just because I knew how to do them.
You really need to go back to the beginning, look through the code,
 and figure out exactly how all of it works.

This is what we were trying to tell him: That he needs to learn how to program before trying to program something graphical, or a game, or anything arbitrarily complicated like that.



With you guys, I could never tell what the fundamentals we're. I thought I knew them but I guess having a 2 year degree from an online college in C++ is the fundamentals or something. As far as I know, I knew more than most people.

I have no idea what you think the fundamentals are, or how much you knew. That's why I consistently recommended learning them first.

If you (as Outcast Orange implied) have trouble with things like putting a loop inside another loop, then you don't know the fundamentals.

Really, "What are the fundamentals?" is an irrelevant question anyhow. The point is that you should be working from the ground up and not the other way around. Work at what you're already comfortable with and expand from there. If you're not comfortable with logic that's complex enough to need nested loops/branches, or basic usage of STL classes (both of these are invaluable or necessary for pretty much anything), then you certainly shouldn't be trying to make games.


So maybe fundamentals means the basics of programming logic (loops, branches, conditionals and comparisons, logical operations, any combination of the above), or maybe it means the basics of how to use the language you chose (classes, the standard template library, syntax and scope and all that jazz), or maybe it means something else entirely. It doesn't matter. What matters is that you don't overextend your skillset so much that you get involved in a project that completely overwhelms and confuses you. I would recommend small projects first, especially ones that involve the things you're trying to learn.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #95 on: January 05, 2010, 05:15:11 pm »

"capsulize" != "encapsulate"?

I would say that it will *always* evaluate to true.
Why? Because both strings are pointers to diffrent parts of the memory conaining a sequence of characters. If they are identical even, it is up to the compiler to decide if it wants to keep each alone or have them point to the same memory location.

At the very least(This is from my C experience, mostly, so I hope it would work) cast one of them to actually be a std::string so that any operator overloading for inequality actually takes place, and std::string can preform any advanced comparisons such as testing each letter. It likely doesn't matter, since the issue would just be comparing two prewritten strings, as having one or both sides already a std::string would likely trigger the advanced features...

Spoiler: getting far off track (click to show/hide)
Logged
Eh?
Eh!

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #96 on: January 05, 2010, 05:25:34 pm »

"capsulize" != "encapsulate"?

I would say that it will *always* evaluate to true.
Why? Because both strings are pointers to diffrent parts of the memory conaining a sequence of characters. If they are identical even, it is up to the compiler to decide if it wants to keep each alone or have them point to the same memory location.
lol... I managed to screw up a joke... you're partially right... Instead of comparing strings with the class function I treated them as literals and ended up comparing character by character.  But it doesn't evaluate to false unless the literal strings are exactly the same, char by char.

But remember... I'm not comparing strings there... I think what the overloaded operator is doing here is taking each characters value and comparing it with the next.

Of course... You would never do that.  you'd be comparing a String or an array of chars with the respective compare function (strcmp or whatever)


Spoiler: getting far off track (click to show/hide)
Then you'd hate C# from what I've been reading...  :P

and this is phrase is so true:
Stroustrup's classic formulation: "C makes it easy for you to shoot yourself in the foot.  C++ makes that harder, but when you do, it blows away your whole leg."
« Last Edit: January 05, 2010, 05:28:22 pm by Alexhans »
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #97 on: January 05, 2010, 06:49:38 pm »

Oops, vocab slips kill turtles.

I don't necessarily thing that a graphical game is too hard for a beginner,
 as long as they understand math well enough.

Atomic Winter appears to be doing a great job with the small amount of information I've given him.
He understands everything thoroughly, and asks tons of questions when he doesn't.

I was most impressed when he saw a double FOR loop designed to loop through coordinates,
 and decided to take a break for a while and look it over and wrap his mind around it better.
Most would just like to ignore such a headache and pretend the understand it.

I learned making games.
My first program ever was a graphical game,
 and my first C++ program was a game.

Most people don't have the dedication to work hard on something boring
 that barely relates to what they want to do.
Interactive fiction is probably the best place to start,
 but for those who grasp concepts more quickly,
ASCII isn't a bad place to start.

I'm fairly new to this business though, so take it all with a grain of chocolate.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Hippoman

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #98 on: January 05, 2010, 07:14:35 pm »

Oops, vocab slips kill turtles.

I don't necessarily thing that a graphical game is too hard for a beginner,
 as long as they understand math well enough.

Atomic Winter appears to be doing a great job with the small amount of information I've given him.
He understands everything thoroughly, and asks tons of questions when he doesn't.

I was most impressed when he saw a double FOR loop designed to loop through coordinates,
 and decided to take a break for a while and look it over and wrap his mind around it better.
Most would just like to ignore such a headache and pretend the understand it.

I learned making games.
My first program ever was a graphical game,
 and my first C++ program was a game.

Most people don't have the dedication to work hard on something boring
 that barely relates to what they want to do.
Interactive fiction is probably the best place to start,
 but for those who grasp concepts more quickly,
ASCII isn't a bad place to start.

I'm fairly new to this business though, so take it all with a grain of chocolate.
For once I am not bored. Only when i'm coding am I not bored.
And trust me. Once Eric switches to classes, he's going to have problems same as I did.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #99 on: January 05, 2010, 07:18:10 pm »

Yes, but he will be typing the code,
 not having someone tell him letter for letter what to do.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Hippoman

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #100 on: January 05, 2010, 07:25:57 pm »

Then he knows more about classes then I do.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #101 on: January 05, 2010, 07:49:34 pm »

Not yet he doesn't,
 and only if he sticks with his initial expectations.

On another note,
do you think you'll continue trying to learn C++?

Surely you know a lot more than before.
I would be proud of you if you stuck with it,
 but I'm sort of reluctant to "teach" you anymore right now.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Hippoman

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #102 on: January 05, 2010, 07:57:21 pm »

Of course I'll learn more.
Just it'll probably be another 4 years or so until I can get a class that'll teach me this since you've left after we crappily set up classes.
Logged
THPÆCROSSISM
ΘπÆ┼ - Rise up against our superiors! Let all dwarves be equal!
KHDownloads

G-Flex

  • Bay Watcher
    • View Profile
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #103 on: January 05, 2010, 07:59:29 pm »

Oops, vocab slips kill turtles.

I don't necessarily thing that a graphical game is too hard for a beginner,
 as long as they understand math well enough.

That's the issue here: You have to understand the math and logic involved, and know when you've reached your limit and need to explore new concepts.

Quote
Most people don't have the dedication to work hard on something boring
 that barely relates to what they want to do.

If you want to become a good programmer, you almost inevitably have to, but I guess I see your point.


I think Hippoman is, in general, more concerned with the results he wants to get ("I want to make a game") than with the actual processes necessary to make them a reality (learning how to be a good programmer). Your "telling him letter for letter" comment reaffirms this suspicion.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Adventures in Magdorm! An ASCII adventuring game.
« Reply #104 on: January 05, 2010, 08:02:28 pm »

I haven't abandoned you, we can still sort out bugs if you'd like.
I just think you might want to reconsider this thing,
 and maybe have a fresh go designing a game made 100% by yourself.
We are always here to offer tips.

It would really help if you were more willing to read though.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream
Pages: 1 ... 5 6 [7] 8 9 ... 11