• Advertisement
Sign in to follow this  

Questions about RPG creation

This topic is 4397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there... I might post a little bit to many questions but hey, thats life :P This time I have some general questions about the creation of an RPG. Even though I am not at that point yet, I walk around thinking about the construction of an RPG all the time. Also I find that this might be some good excercise to add into my text-based RPG that I´m creating for the moment. 1. A large project is divided into many files. While creating a RPG, what files should I use? I figured out that perphaps it should be splitted into: Main - Game loop including introduction and characters Items - A file keeping all the items Weapons and armours- Another file containing items of type weapon and armour. Just to keep it in some kind of order. World Map - Well, the world map Sublevels - One file for each sublevel, e.g castles, caves etc How would you split it up? and why? 2. Level/Map editor. I though this might be good to have. Since I figured out that if I want to create a huge world in a future game, this would save me alot of time. Is it worth the effort programming a Map Editor? 3. Item Editor. Since one of the funniest things is finding new items, I believe a RPG should contain alot of them. Say that my game would contain 1000 different items, would it be worth the effort to create an item editor which I create the items in? 4. Well, another thing I like in RPGs is the gathering of experience points. I figured using an INT would do it for the exp counter. Though, my book says that an INT has a maximum number (can´t remember how high though). Should I prevent any kind of bugging by setting some kind of loop that converts the value? Say, that a player reaches 1 000 000 exp-points. Should I reset the counter and add one (1) to another counter which counts every million exp-points? Or is there someway to get through this barrier? Well thats it, even though I had a lot more in mind earlier, I can´t remember now.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
1. A large project is divided into many files. While creating a RPG, what files should I use? I figured out that perphaps it should be splitted into:

Main - Game loop including introduction and characters
Items - A file keeping all the items
Weapons and armours- Another file containing items of type weapon and armour. Just to keep it in some kind of order.
World Map - Well, the world map
Sublevels - One file for each sublevel, e.g castles, caves etc

How would you split it up? and why?

For items, weapons, armour and the likes I would use some sort of database to store them. This way they're not hard-coded into the application, they can be edited on the fly (by something such as an item editor) and you can use various compression methods to keep your tens of thousands large item database to a minimum file size. For single-player text games I recommend you store the items and the likes in a text file that is read in and acts as a database. To avoid interferance to the database you would of course need some form of secure encryption.

I don't understand why you'd need a world map for a text game, but for games that use graphics to visually represent the game world you can store the world data in various "map" file formats. If your game world is very large I recommend you only load the areas of the game world that either are or are about to affect the player. This way performance is kept to a high and the amount of memory needed to store our game world is kept to a minimum. For a short article on this sort of loading, please check out this article on my website.

Quote:
2. Level/Map editor. I though this might be good to have. Since I figured out that if I want to create a huge world in a future game, this would save me alot of time. Is it worth the effort programming a Map Editor?

Map editors are almost a must have for graphical games. Imagine writing out scripts that define where a tree is, what model to use for the tree, how it affects the world and those who interact with it and so on for gemoetries such as buildings, mountains, water etc, even the thought of doing such a thing becomes daunting. So yes, I really would recommend you create a map editor if your game needs it. There are of course several other solutions such as using a readily available map editor such as that that the Half-Life 2 engine uses. You could use the editor used for that game and then simply create the loading algorithms in your own game.

Quote:
3. Item Editor. Since one of the funniest things is finding new items, I believe a RPG should contain alot of them. Say that my game would contain 1000 different items, would it be worth the effort to create an item editor which I create the items in?

Again, imagine trying to manually script every single element of just one item. Things such as its value, what it does, what category it fits into, how it affects the world around it, how the player interacts with it etc.

Quote:
4. Well, another thing I like in RPGs is the gathering of experience points. I figured using an INT would do it for the exp counter. Though, my book says that an INT has a maximum number (can´t remember how high though). Should I prevent any kind of bugging by setting some kind of loop that converts the value? Say, that a player reaches 1 000 000 exp-points. Should I reset the counter and add one (1) to another counter which counts every million exp-points? Or is there someway to get through this barrier?

Usually you'll find that the maxmimum variable for an integer is 32767. Unless you're going to have a very large number of experience points then this will not pose as a problem. If you are going to have a large number of experience points then you could use another variable type, or even a
long int
. These variable types usually have a maxmimum value of 2147483647 (signed) and 4294967295 (unsigned). This of course would allow you to use much higher values for your experience points.

Share this post


Link to post
Share on other sites
Thanks for the answers, you brightened my day :)

Well, I don´t need a world map for a text game.

Notice

Even though I am not at that point yet, I walk around thinking about the construction of an RPG all the time. Also I find that this might be some good excercise to add into my text-based RPG that I´m creating for the moment.

What I meant was that I wundered about it, and if possible I would try to apply it to the text-based game Im creating just for excercise. Obviously, I dont have any kind of map in it.

Though, none of my books handles data-bases (guess it is advanced).

Well, now when I got thoose questions answered, I´ll get back to my reading. Thanks again.

Share this post


Link to post
Share on other sites
1000 thousand items in different files would be a problem with out an advanced somputer try making multiple files fill them with categories of items and that would help to sort out the mess

Share this post


Link to post
Share on other sites
Quote:
Original post by MrSpiceGirl
1. A large project is divided into many files. While creating a RPG, what files should I use?

Generally speaking the type of game doesn't dictate how your files are organised. That's because the implementation is several layers removed from the game, usually.

Quote:
I figured out that perphaps it should be splitted into:

Main - Game loop including introduction and characters
Items - A file keeping all the items
Weapons and armours- Another file containing items of type weapon and armour. Just to keep it in some kind of order.
World Map - Well, the world map
Sublevels - One file for each sublevel, e.g castles, caves etc


It makes sense to have one main file, one for handling items, one for the world map, and one for sublevels. But remember that any entities that are different manifestations of essentially the same thing - in the way that your castles and caves are just manifestations of the 'sublevel' concept - should be handled with one set of routines, and the differences between them should be stored as data. The same applies to your items (and I think weapons and armour are just types of item, anyway).

Quote:
2. Level/Map editor. I though this might be good to have. Since I figured out that if I want to create a huge world in a future game, this would save me alot of time. Is it worth the effort programming a Map Editor?


No, wait until you need it. At this stage it doesn't seem like you're sure how to represent the data anyway, so it's not practical to develop a tool to manipulate that data yet. Once you do, it might be worth it. Or it might be easy enough to just cut and paste data in a text file. It'll depend on your eventual representation.

Quote:
3. Item Editor.


See above. It's useful, but only when you know you need it, not before. Sort out how you're representing stuff, and then ask yourself these two uestions again.

Quote:
4. Well, another thing I like in RPGs is the gathering of experience points. I figured using an INT would do it for the exp counter. Though, my book says that an INT has a maximum number (can´t remember how high though).


What language are you using? In C or C++ an int's maximum value is typically somewhere above 2 billion. Don't worry about it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement