CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Jan 2008
    Posts
    20

    Text-Based RPG: Survival

    I am familiar with VB to the point that I have made many simple calculators and arrangers for personal amusement. However, I have yet to develop a complex or large-scale program, and I've been struck with an idea.

    It has long since been a dream of mine to create a text-based game. Since I am familiar with VB6 and "thinking like a programmer," I decided it would be easiest to just improve upon my understanding of the language in order to create the game.

    I have pondered the possibilities of other languages, C++ coming to mind firstoff. If my idea for the game strikes you as easier for another language to hande, do not hesistate to suggest I make the change. Any input is welcome here. I would appreciate suggestions for coding in the following form:

    "You mentioned [idea], and I believe it would be easiest to do with [script name]."

    I do not know what you would call the "name" of a type of script, but I mean it in the way that "If-Then Statement" is the title/name given to the script itself. That might not make any sense, but it's most likely because I'm green, your average beginner-level programmer.

    What I am trying to say is that I do not want you to supply me with code, I would rather you supply me with a relevant topic (or topics) to research. It is hard to learn when you have to do no thinking, and being given all the answers is my equivalent of cheating. I would much rather learn to code it myself than have the code written for me.



    >My question is basically how realistic the idea of using VB is for this. I'm
    >also asking if you guys know of any advanced topics to study that might
    >make one or two of these ideas easier to work into the game. If VB doesn't
    >seem like it will do the job I want it to, are there any other languages that
    >you guys think would work better? And just the same, having a place to
    >start learning that language (i.e. a certain type of scripting that would
    >help accomplish one or more of the features I listed) and begin my research
    >would be greatly appreciated. I'm just asking some of the more
    >experienced users to throw some ideas out there for me to look into.
    >I'm probably going to buy more books, but I don't want to buy a book
    >and then find out VB just isn't cut out for what I am demanding of it.
    >Right now I own a copy of "VB6 From the Ground Up" by Greg Cornell.




    So now, onto the game. The window itself would contain little more than a short menu, a large (locked) textbox for displaying information, a one-line textbox for inputting commands, and a player status screen. The game itself...

    The first thing required is a short breakdown of your character. It would ask for gender, height, weight, and age. It would also ask the player to distribute points among attributes (reasoning, strength, endurance, agility, and focus.) These would all affect gameplay by modifying the four statistics: health, consciousness (always a 0-100 scale), stamina, and core temperature (0 being normal, -7 being hypotherma and +7 being hyperthermia.) I would want these statistics to be interrelated, such as prolonged negative core temperature lowering stamina and health.

    The game would be based around the (hopefully gigantic) map. I would like to somehow implement a player's map map that hides all areas that the player has not yet explored. Each tile of the full map would have a description as well as many hidden attributes (such as a short description for a "look [direction]" command and a separate one for a "look far [direction]" command,) and many would harbor static resources that would respawn annually, or become available for only one season out of the year.

    On the map I would like to include wildlife that relocated depending on the time of year, and predators that would always remain within X tiles from their dens, prey, or other food source (such as a bear near the rivers.) The Again, the wildlife and the flora would provide a food source and a hide source that varied in quality and availability depending on season.

    The land would also need to change per season. This might mean having four separate maps, but that is no problem. I'm not looking for easy, I'm looking for detailed. I don't care how long this will take me.

    Weather would be very difficult to implement unless the weather was static seasonal, appearing at the same places and times every year. I would like the seasons to affect river levels and the player's ability to cross. For example, throughout hard winter snow there would be no possible way to escape a boxed-in high mountain valley, and you either have enough supplies and blankets to last, or you lose. Simple enough.

    It is not my goal to make the game too difficult, however, and there would be an option to build a lodge, stay in one of several caves (and perhaps fight a bear for one!) or surrender food to a trade post for a winter's stay.

    The player would have the option to manage the character strategically. They could seek out only those resources that were quick and easy to obtain, but provided a meager living. On the other hand, those resources obtained through more exhausting means would provide greater reward. You may need your energy for gathering firewood, building a shelter, or hauling an extra 50lbs of meat. You may decide to make camp next to your kill to save a walk, and risk being near a scavenging predator. Flexible gaming is the idea.

    Any suggestions/necessary changes are very welcome. I am eager to take my notepad outline and begin building the actual program, but my problem is that I do not know where to start. Drawing the form and its necessary fields is no problem, but I am not knowledgeable enough about programming to make good decisions as to what scripting I should use for these ideas.

    And as I said, if I need to move this into dev C++ and just use a DOS console-style game, sobeit. We can't always get what we want.

    Also, any questions are very welcome if I have been unclear as to what I want the game to do. But if you're wondering what the primary goal is, it is survival. You're winning the game as long as it doesn't say you're dying or dead.
    Last edited by wall_fall_down; January 7th, 2008 at 12:34 AM.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    Is there a question there?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    Sorry, fixed. What I'm really wanting to know is if I can simply continue my work with Visual Basic 6 and expect to accomplish something along the lines I drew out in the OP.

    Also, suggestions like "[x] would probably work well for the map." or "[z] would make your variable wildlife easier to program." are helpful.

    So far, the table of contents in my VB6 guide has given me little to work with, and I've investigated most of the pages looking for something that seems like it would fit into the picture,

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    I'll wait to answer.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Text-Based RPG: Survival

    Sounds a little like the re-invention of the Text-Adventure to me. Perhaps with a more sophisticated player character.
    You should be aware, that there exist programming languages specially for writing text based adventure-like games like ACode or MUDL (i think it was).
    ACode makes writing maps and moves easy and will compile a C Source code for ANSI C which will then compile the final game. ACode is available under Unix/Linux. But it offers no user interface except console input. Maybe some more research reveals some newer or more contemporary game-developing languages...

    In general I'd say VB6 is as good a choice as VB.NET or C#.NET.
    Any language provides the means for a programmer to express himself, writing any program. VB always seemed to me an easy to learn language. There is no reason why you should not use it for your game project, like structuring data, creating objects with properties from classes, even accessing databases. It has every means and possibility you would possibly need. A user interface can easily be clicked together. So why not using VB?

  6. #6
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    WoF -

    Thanks for the input. The only reason I didn't know if I could use VB is that, to a beginner, VB seems like a limited sort of language. Apparently your idea is that it is not, at least not limited enough to hinder the inclusion of some of my ideas.

    I'll be looking up creating objects with properties from classes, and accessing databases with VB6 now. The kind of reply WoF made is exactly the kind I was hoping for, because it gave me a take-off point. Now, if I have trouble putting a part of my game into one of the suggested "possibilities" I have this thread for the questions/problems with that.

    And any more suggestions are very welcome.

  7. #7
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    Also, I looked into MUDL and tried to find similar languages, but I'm coming up short. If anyone has any information pertaining to M$ languages that are used mainly for console gaming, feel free to share. I can't connect with Red Hat, fax modems suck.

  8. #8
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    516

    Re: Text-Based RPG: Survival

    Quote Originally Posted by wall_fall_down
    Sorry, fixed. What I'm really wanting to know is if I can simply continue my work with Visual Basic 6 and expect to accomplish something along the lines I drew out in the OP.

    Also, suggestions like "[x] would probably work well for the map." or "[z] would make your variable wildlife easier to program." are helpful.

    So far, the table of contents in my VB6 guide has given me little to work with, and I've investigated most of the pages looking for something that seems like it would fit into the picture,
    The main thing you should determine is if function pointers are going to make things easier for you. For example, if you have lots of different types of actions that the player (or critters) can take, then function pointers would make actions a lot easier to code. Also, if everything in the game shares certain attributes (such as heath, movement types, attacks, etc.), then a true class framework with inheritance would help a lot. That said, if what you have planned isn't that robust, VB6 will work fine.
    Last edited by Comintern; January 7th, 2008 at 06:54 PM. Reason: typo

  9. #9
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    You might want to consider one of the dot.net languages. The Express Edition of the compilers is free!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  10. #10
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    Quote Originally Posted by dglienna
    You might want to consider one of the dot.net languages. The Express Edition of the compilers is free!

    Any of them? Or a specific one? I'm willing to try just about a nything, and I've been looking up some "cheater" applications' (text adventure builders') source codes to see how some of them handle the elements of the games.


    I looked up function pointers and found that VB6 is not made for them but -can- handle them, yet it still sounds silly that I'd be using something that my language was not built to do well.

    I really am open to any suggestions, and would not mind trying out another language for this undertaking.

  11. #11
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    C# and VB.Net are good, although most prefer one or the other.

    http://www.microsoft.com/express/

    The have a Game Creator GDK but it's for C++.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  12. #12
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    Quote Originally Posted by dglienna
    C# and VB.Net are good, although most prefer one or the other.
    The C# version is a total of 827MB, and just the .NET framework seems to be 57 MB. Doing about 2 KB per second on local dialup means it'd take nearly 8 hours just for the framework. The entire setup for C# would take a little over 4 & 3/4 days.

    My understanding says that I'd have to download the 8-hour .NET framework for both VB and C#. And then there's no telling what else comes with the respective languages.

    I do have Dev C++, so I guess I'll be trying to make this in either VB6 or C++. If anyone has any suggestions for languages that require little downloading (<20 MB total is ideal) feel free to share, but otherwise I'm going to be trying things in VB6 for now.

  13. #13
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    Usually when you buy a computer language related book, you get an express version of that language. That's gone on for a long time. I had C# Express with one book, and VB6 in another.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  14. #14
    Join Date
    Jan 2008
    Posts
    20

    Re: Text-Based RPG: Survival

    Quote Originally Posted by dglienna
    Usually when you buy a computer language related book, you get an express version of that language. That's gone on for a long time. I had C# Express with one book, and VB6 in another.

    Guess this one comes down to making a trip to Barnes & Noble sometime soon. Or Half.com, who knows.

    dglienna - Was the C# book helpful as you learned? If so, what was it called? Did the book remain valuable to you for only a short time in your learning?

    I don't think that has anything to do with VB6... Nope, sure doesn't. Better balance that out by talking about VB some.

    I've begun programming a time-of-day situation in which TimeOfDay is a string. Based on the value of the string, I have a lot of If TimeOfDay = "X" Then... / Else If etc. statements going on. The time of day/night is to be updated in-game every 10 minutes (1 game hour) and dawn/dusk both happen in three closely-timed stages (i.e. dawnEarly, dawn, and dawnLate.)

    I've also considered trying to shift what hour of the day dawn and dusk occur, based on seasons. And yeah, I'm laughing at myself as well, because I' mreally making this more complex than it should be. But maybe I'm bored or something.

    To sum that up, that's a TON of If-Thens inside more If-Thens. Are there any obvious alternatives that I'm missing here? Anything to make the time schedule seem like less of a mess?

    This is all set up in notepad for now anyhow, and I'm just going to make the individually labeled "pieces" of programming (sorta like an outline of each major function) before I try fitting any of it together.

  15. #15
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Text-Based RPG: Survival

    The book was Teach Yourself C# in 24 hours, so, yes, it was helpful. I also had been using VB.Net before, and wanted to check out the C# syntax.
    I already had the compiler, but had never used it.

    You need to look up the SELECT CASE statement:

    Code:
    SELECT CASE pennies
    case 1
      s="One Cent"
    case 2
     s="Two Cents"
    case 3
      s="Three Cents"
    case 4
     s="Four Cents"
    case => 5 
     s="5+"
    end select
    msgbox s
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured