noobish attempt at text-based adventure...

Started by
16 comments, last by StaticEngine 19 years, 3 months ago
Quote:Original post by Zahlman
Good heavens, they still teach FORTRAN? o_O


Hell, some companies still use COBOL.
Advertisement
Quote:Original post by tychon
Quote:Original post by Zahlman
Good heavens, they still teach FORTRAN? o_O


Hell, some companies still use COBOL.


My uncle works with cobol.. And makes very good money.
Quote:Original post by Nice Coder
Stl

Seriously, lisp makes this so easy.
From,
Nice coder


Thanks for the STL link. Lisp may make this easy, but Googling for it hasn't been easy. Where can I get a free version of Lisp to begin learning with?

About teaching FORTRAN, what I was told was along the lines of it being important to know the concepts of a variety of languages new and old in order to be able to work with just about anything once the basics are known. Strangely enough, I've been having light urges to jump into BASIC or Python every so often...



Another thing ive noticed is that in your code, the player will be able to move from room 1 straight to room 3. Did you intend for this to be possible?
I'd imagine they would have to go to room 2 first but maybe im just "over-noticing" things.
LOL at the || or instead of && and,..i was thinking the same thing.
oh well, we all make mistakes.

Everyone's right theres a couple c++ features that would make things cleaner than it is now. I personally think you should continue this way for the time being and then fix it later when you've learnt classes. I think it would be illogical to jump a lot of stuff on the way and go do classes ,if you werent already planning to learn it soon, just for the sake of making the code clean now.[just my 2 cents]
Its not that complex anyway. its up to you.
______________________________Yes I think the rev pad sucks/so does 50 and the DS. I like action and am not ashamed. I prefer brunettes but hate chocolate. Yes,I have opinions!!! Rate as you will.
Another reason to look at Inform: http://www.ifcomp.org

My entry this year took 8th place. There's a thriving community of people who write these things.

As a professional C++ developer for a decade now, I can't recommend this path strongly enough for someone just getting started.

Also, there are literally hundreds of other games to look at and learn from here: http://www.ifarchive.org/
Access: I've tested my code several ways and I don't immediately see a way to jump straight from #1 to #3, although there is some inefficient syntax here and there. I'll keep testing though, especially whenever changes are made.

About Inform, I have checked it out already and am not really interested in it. My plan is to use this text-based exercise as a practical self-learning of C/C++, with my ultimate goal being: experiment in C/C++ --> add a little GDI for user interface, etc. --> create a small game demo with DirectX
Quote:Original post by obi-wan shinobi
Thanks for the STL link. Lisp may make this easy, but Googling for it hasn't been easy. Where can I get a free version of Lisp to begin learning with?
Corman Lisp

Others to google for:
Clisp, LispWorks Personal
Well, then you should at least check out how the Z-Machine works.

You're going to wind up with a generic Object class, from which you can derive Room classes (since a room is just an Object you can get inside). There will be an ownership tree, so that objects are children or siblings of other objects (so that the player can be in a room, and you can drop things in a room and have them stay there).

Then you'll need a game loop, that does things every turn for the player, the room the player is in, and any threads running in the background, as well as handling player input.

Learning C++ specifically is really not as important as learning how to code. Once you get down good software design, data structures, and clean interfaces, learning any particular language is just a matter of applying what you know to that particular language syntax.

Best of luck.

This topic is closed to new replies.

Advertisement