Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: I am creating a simple text-based rpg as my first game.  (Read 2214 times)

Reinecker

  • Bay Watcher
    • View Profile
I am creating a simple text-based rpg as my first game.
« on: February 03, 2010, 04:11:35 pm »

So far I have at least the basics of these features:
-Inventory System
-Movement System
-Loading and Saving game
-Time (doesn't do anything yet, not even display a message)
-Equipment System
-Shop System
-Rudimentary Combat System

Of course the Equipment and Shop system have to be updated as I make more items/item types. The combat system is just a simple, attack and run kind of thing. The movement system has 6 directions (north, west, south, east, up, and down). And I have 1 character type to choose during character creation. The game area descriptions (I have 29 of them and am making more after I type this) are very bad and only a sentence or two long. I plan to eventually slowly start making more complex descriptions once I have everything set up.
Though however I store all the data I store it in either a database (areas, inventory, ect) or a textfile (name, stats). Since the game uses a Microsoft Access driver (which every windows computer seems to have) it only works on Windows.

Now this isn't nearly as complex as any other programming project on here and will never be nearly as good. And no, I do not plan to ever release it. =)
Logged

DennyTom

  • Bay Watcher
  • !!Urist!!
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #1 on: February 03, 2010, 06:39:34 pm »

That is great, have fun and let us try prototypes!

I am no big programmer, but I am still wondering - you said you'll have to update Equipment and Shp whem you make new items. How is your shop system designed? If it your item list was based on simple tree stuctured database, then your shop could read it and would not have to be updated every time you add a new item. Not so sure about the equipement system though.
Logged
It is so much easier to measure life in experience points...

Reinecker

  • Bay Watcher
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #2 on: February 03, 2010, 07:02:34 pm »

Well I use a database like I said. I really meant that I only need to update the shop system when I make a new shop or add new item types. I just store the items in a shop in its own separate table in the database. The same with the equipment system. I have to update it every time I add a new item type. The database otherwise just removes/adds stuff from the inventory table and changes stats accordingly.
I store all the item stats in the database too. Not every specific item but only as they are given to the player. I originally wanted, depending on say the blacksmith, give randomized stats to items, but I didn't want to display the stats normally to the player and it looks better to give an item an amount instead of having:
bronze sword
bronze sword
iron sword
bronze sword
bronze sword
Logged

xdarkcodex

  • Bay Watcher
  • Watch in awe!
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #3 on: February 04, 2010, 03:32:38 am »

You could make it like a drop down menu like this.

armor^
weapon V
-axe^
-spear^
-hammer^
-club^
-swords V
--iron swords^
--bronze swords V
---bronze sword   $x xdam
---bronze sword   $x xdam
---bronze sword   $x xdam
stuff^
other things^
Logged
the statement below is true
the statement above is false

DennyTom

  • Bay Watcher
  • !!Urist!!
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #4 on: February 04, 2010, 06:55:45 am »

You could make it like a drop down menu like this.

armor^
weapon V
-axe^
-spear^
-hammer^
-club^
-swords V
--iron swords^
--bronze swords V
---bronze sword   $x xdam
---bronze sword   $x xdam
---bronze sword   $x xdam
stuff^
other things^

Yeah - that is what I meant by "tree-like structure"
Logged
It is so much easier to measure life in experience points...

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #5 on: February 04, 2010, 08:30:21 am »

Sounds like my first programming project. What language are you using for this?

Oh, and a suggestion about items, areas and such: load them from files (txt files are easy enough). This will both reduce clutter (removes hundreds of lines of code where you would otherwise initiallize item/area values with) as well as make it easier to create new ones (only requires item or area data instead of data and code to initilize). It also makes the game more flexible, and merely by replacing which text files are opened it would allow for multiple games.
« Last Edit: February 04, 2010, 08:36:49 am by alway »
Logged

Reinecker

  • Bay Watcher
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #6 on: February 04, 2010, 03:27:29 pm »

Sounds like my first programming project. What language are you using for this?

Oh, and a suggestion about items, areas and such: load them from files (txt files are easy enough). This will both reduce clutter (removes hundreds of lines of code where you would otherwise initiallize item/area values with) as well as make it easier to create new ones (only requires item or area data instead of data and code to initilize). It also makes the game more flexible, and merely by replacing which text files are opened it would allow for multiple games.

I am using Python, not because I like the features, but because it is what I am best at and know best (not saying much but still).
About using files, I actually tried .txt files the first time I tried this project but every time I failed at it after getting into inventory and shops. Now I use a database and everything works fine except for the fact that it only works on Windows, you have to have the Microsoft Access Driver (which every windows computer I have tried had it by default) and to edit anything but your character stats you have to have something that can edit .mbd files.
I don't have much code for initializing areas and such as my code just consists of just making the variables, loading the data from the database, then printing the data. Then there is code that does stuff or allows you to do stuff based on that data such as allowing you to move in a direction or not. For item however, I don't have a database of the different items but they are either hard coded added to inventory (such as from loot from combat) or in the shop tables in the database.

The tree-like structure for inventory is a good idea but now that I have everything working and I am afraid to make any big changes as my cousin wants to play a working copy by Sunday and I am working on more of content (items, areas, monsters) than features.
Logged

xdarkcodex

  • Bay Watcher
  • Watch in awe!
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #7 on: February 05, 2010, 12:06:34 am »

You could make it like a drop down menu like this.

armor^
weapon V
-axe^
-spear^
-hammer^
-club^
-swords V
--iron swords^
--bronze swords V
---bronze sword   $x xdam
---bronze sword   $x xdam
---bronze sword   $x xdam
stuff^
other things^

Yeah - that is what I meant by "tree-like structure"
sorry. didn't read your whole post.
Logged
the statement below is true
the statement above is false

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: I am creating a simple text-based rpg as my first game.
« Reply #8 on: February 06, 2010, 03:28:56 pm »

so, you've got the various systems set up, but what sort of UI are you planning to build? menu-based or command-based?

I built a similar-sounding game for my first major programming project. I was using text files, and, not knowing much about the standard Java libraries, ended up building my own string-tokenizer and hash-table classes...

Parsing commands like "go north" and "wear leather armor" isn't really too hard. Accepting all the possible variations that a player might want, however, is quite a challenge.

I made a thread shortly after I joined about it, too lazy to look it up.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch