Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Text adventure questions

Author
Message
N Ellingworth
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 8th Apr 2009 20:06
Firstly I feel I should point out that I'm not a complete newcomer to programming however my background has been hardware programming as part of my Electronics degree, for example I am currently building a digital spirit level from a micro controller, accelerometer and lcd screen. I have some experience in BASIC, C++ and Assembler so I know all the basic commands needed to do things. What I don't have is the knowledge of how to form said commands in to a game.

As the title suggests I am currently looking at producing a simple text adventure as it seems to be the logical step forward from variations of the old 'hello world" programs and despite reading the tutorials provided I've not been able to get anything working without simply copy/pasting other peoples code. Which I of course can't decipher because it's not been annotated. bmaczero's tutorial has helped me understand how a text adventure would be laid out and will be of great assistance when I finally design something but didn't help me produce code. As for pluto's tutorial I found it hard to follow as the various updates were tacked on at the end and it seems (to me at least) to get more and more disjointed as time goes by.

Is anyone aware of any other tutorials that could help me? I've not been able to find any apart from the occasional link to a site that hasn't existed for years.

Any help would be very appreciated as I am completely stuck at the moment.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 8th Apr 2009 20:28 Edited at: 8th Apr 2009 20:28
Not sure if you've seen it, but here is the newcomers tutorial thread: http://forum.thegamecreators.com/?m=forum_view&t=115633&b=7

You also seem mature enough (as in, not saying "plz hlep, i n33d 2 mak a txt aventrue but i don no wut 2 do", and the fact that you have a degree) that I'd be willing to help you learn over MSN or AIM so feel free to add me as gamedev06 at aol dot com or gamedev06 at hotmail dot com.


N Ellingworth
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 8th Apr 2009 20:51
Thanks for the speedy response, yes I have been looking through the tutorial thread, unfortunately most of the tutorials are a little too advanced for me, at the moment I don't want to even think about anything beyond text based games learn about how to organise data and use it effectively.
Quirkyjim
16
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 8th Apr 2009 22:57
Quote: "Assembler"


Oh, God! Not the common misconception! AAAHHHH!!!

The language is ASSEMBLY, the program that compiles is the ASSEMBLER, as you so devoutly know, I suppose?

That's what they WANT you to think...
N Ellingworth
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 8th Apr 2009 23:08
Well I'll have to yell at my lecturers then they always refer to the language as assembler and the program that compiles the compiler. I wasn't aware that I was incorrect thanks for putting me right.

I guess I'm proof that electrical engineers shouldn't teach people how to program.
DaddyJ
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 9th Apr 2009 01:28
Assembly uses an assembler to create the machine code. A high level languages uses a compiler.

Compiler and assembler are often interchanged in classrooms, as they provide a very common tasks, divided between level languages.
Bursar
16
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 9th Apr 2009 01:29
A text adventure is going to be quite an ambitious first game. You will first need to design a language parser. It will need to understand the vocabulary of the game ("go north", "pick up lamp", and so-on), and then work out which commands are valid in which particular circumstances.

It's likely to be much easier to write something simpler like Pong or Space Invaders first. You can still use data types to store locations and information such as score, lives left and so-on.

These types of games are often the first ones used for learning a language because there's not a lot to them. There's no fancy AI, no physics, no need for shaders or fancy graphical effects. That's not to say you can't add those things as you get more familiar with the language and its capabilities (and more important - your own abilities).

Once you have an understanding of how DBP works, you can then expand on that knowledge as you work towards creating your language parser.
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 9th Apr 2009 07:39 Edited at: 9th Apr 2009 07:40
@Bursar
You have some very good points, but I would like to point out that making a text adventure isn't as hard as you make it sound.

At one point, I created a text adventure engine in under 200 lines of code, and most of the code was for graphics. What I did that really makes it so much easier then the way you described is I had it so there was only certain selections that you choose with the numbers on the keyboard.

I know it wasn't the best way, but for someone who wants to start with making text adventures it would be fine.

@Ellingworth
With some programming experience already you should be able to make a text adventure fairly easily. My advice, learn how to use files. You don't want to recompile everytime you add somthing to your story. A hint about using files, you don't create the file using "make file" command, you actualy use "open file to write." I know this stop me from using files for a long time, I could never figure out how to use them.

Also, get IanM's MartixUtils plug-ins, they have some very nice functions for string parsing. Last thing, when you want to have some better looking text then the default, get the d3dFunc library, it has alot more options and has antialised text.

Good luck!


DBPro, limited by the programmer.
N Ellingworth
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 9th Apr 2009 09:51
"DB PROgrammer wrote: "At one point, I created a text adventure engine in under 200 lines of code, and most of the code was for graphics. What I did that really makes it so much easier then the way you described is I had it so there was only certain selections that you choose with the numbers on the keyboard."


That's exactly what I'm aiming for, the option system look to be much easier than the parser system.

I'll have a look in to the files system it's not something I've investigated yet.

Thanks for the advice everyone.

Login to post a reply

Server time is: 2024-11-25 08:18:21
Your offset time is: 2024-11-25 08:18:21