|
by Ice Cream Jonsey 07/24/2012, 10:56am PDT |
|
 |
|
 |
|
Is the following acceptable?
When you save a character to disk, all his or her items will go into something called "the armory."
To fully explain that: the game supports save anywhere, thanks to the Hugo programming language implementing save anywhere. But I'd like there to be a Bard's Tale-style "Adventurer's Guild" in the form of a Hackerspace that lets you create, add and remove characters.
The problem I am trying to solve involves possessions of those saved characters.
I can't create dynamic objects in Hugo. If there is a limit of 100 rifles in the game, I need to construct 100 identical rifles of the rifle class. (I have program that write the source code for these things, so that's not a problem.) Since there can not be dynamic objects, this creates the problem of creating Snake Vargas, having him buy what ends up being rifle #56, and then writing him to disk and removing him from the party. What happens to that rifle? What happens when all the rifles are in characters that have been removed from the party?
I *think* the Bard's Tale handled this by giving each character an array that had elements that corresponded to each possible weapon, armor and so forth in the game. So Snake Vargas would have an array called Possessions[] or whatever, and if Possesions[10] was equal to 2, then he had 2 long swords. That is my GUESS. It is not based on looking at any source.
Well, as a text adventure language, Hugo works sooooooo well with objects. I'd really, really like to be able to use classes and extend rifles and pistols and so forth. I'd like to support the player typing "give Snake's rifle to Creexul", which I would be able to do if I used Hugo as Hugo expects to be used.
So anyway. With the dynamic object creation limitation up above, AND the requirement that characters can be saved to disk AND the desire to use objects, is the way I am going about handling items in the game sensible? How much of a pain in the ass would it be if you saved a character to disk, yet all his possessions were left behind?
the dark and gritty...Ice Cream Jonsey! |
|
 |
|
 |
|
|
|
Saving characters and character items by Ice Cream Jonsey 07/24/2012, 10:56am PDT 
damn that seems backwards by jeep 07/24/2012, 9:46pm PDT 
Re: damn that seems backwards by N 07/25/2012, 9:50pm PDT 
Re: damn that seems backwards by Ice Cream Jonsey 07/25/2012, 9:54pm PDT 
Wherein I make a load of assumptions by Entropy Stew 07/25/2012, 4:36pm PDT 
Re: Wherein I make a load of assumptions by Ice Cream Jonsey 07/25/2012, 10:01pm PDT 
yw! by Entropy Stew 07/25/2012, 10:39pm PDT 
Also by Entropy Stew 07/25/2012, 10:52pm PDT 
Re: Also by Ice Cream Jonsey 07/27/2012, 6:17am PDT 
Multi-dimensional array? by Flack 07/25/2012, 5:30pm PDT 
Re: Multi-dimensional array? by Ice Cream Jonsey 07/25/2012, 9:48pm PDT 
|
|