What do I need to learn for a zork clone in C#
#1 Members - Reputation: 103
Posted 08 June 2012 - 10:14 AM
#2 Members - Reputation: 787
Posted 08 June 2012 - 01:00 PM
That said, you can throw together a very simplified type of IF parser by limiting commands to Verb + Noun (or just Verb). If doing this, I doubt you would need a "real" parser, just a series of switch cases. Adding a large number of verbs, or allowing more flexible input, will quickly render this approach infeasible, however.
If you are just beginning (which it sounds like), try putting together a simple three room adventure, where each room has a description, and allow movement between them by checking for cardinal direction commands. Later you can add items and inventory.
If you are past that point (which is doesn't sound like), then I can provide some links I found helpful when I was dabbling with IF parsers a while back - be warned, however, if you do not have any background in parsing theory it will be a large bite to take at once.
#3 Members - Reputation: 103
Posted 08 June 2012 - 06:47 PM
#4 Members - Reputation: 787
Posted 08 June 2012 - 08:28 PM
Then there is the more technical definition, which is a whole different beast - I wouldn't worry about that now. If you are curious, Wikipedia can give you a rundown.
At this point it sounds like you need to concentrate on honing your programming skills. Incrementally add more complexity to something you have already written, or start the small maze project you mentioned. Make sure you understand string handling (which is amazingly great in C#), and reading and writing to the Console. Learn collections, especially List and maybe Dictionary. Become comfortable with using the standard library and classes - you don't need them memorized, but you should find them predictable enough that a quick glance at MSDN is all you might need to use something you haven't before.
Understanding Classes and object oriented programming will come in handy when your projects get to be larger and more complex.
I don't have any useful links to learning resources or books, but I bet if you search this site for "C# tutorials" or "C# learning" you will likely find some useful posts.
#5 Members - Reputation: 305
Posted 09 June 2012 - 01:19 AM
Edited by Narf the Mouse, 09 June 2012 - 01:20 AM.
#6 Members - Reputation: 103
Posted 09 June 2012 - 01:29 PM
Okay, thanks for the information >.< I'll come back in a couple months once I get the hang of it.There is just simple "parsing" which, in the above case, would just be getting input into a string, splitting it at the space character into 2 strings (verb and noun), then comparing them to known values (commands and nouns, the latter usually being items or objects the player can interact with).
Then there is the more technical definition, which is a whole different beast - I wouldn't worry about that now. If you are curious, Wikipedia can give you a rundown.
At this point it sounds like you need to concentrate on honing your programming skills. Incrementally add more complexity to something you have already written, or start the small maze project you mentioned. Make sure you understand string handling (which is amazingly great in C#), and reading and writing to the Console. Learn collections, especially List and maybe Dictionary. Become comfortable with using the standard library and classes - you don't need them memorized, but you should find them predictable enough that a quick glance at MSDN is all you might need to use something you haven't before.
Understanding Classes and object oriented programming will come in handy when your projects get to be larger and more complex.
I don't have any useful links to learning resources or books, but I bet if you search this site for "C# tutorials" or "C# learning" you will likely find some useful posts.






