Thursday, 18 July 2013

Dynamic Characters

Most of you would probably have played DollMistress's Overseer. It caters towards those with Latex, Living Doll and Bondage fetish in particular, that's 2 out of 3 for me. It's also an ambitious game to push the envelope in terms of what complex mechanism can be achieved.

I won't go in depth about all the game mechanics bar one today - the drones.

Overseer lets you entrall victims in your base or go out to hunt for some yourself, you put them through the slave chamber and they get turned into objects - literally.

I guess the programming reason to convert RAGs Characters into RAGs Objects is to separate the code between individual characters and individual drones. Rather than having the code for every possible drone type action coded into each character, DollMistress can create the drones separately from the characters you capture on the first place. A second good reason is probably because Objects are easier to copy and paste than Characters (seriously Steve, Characters and Rooms should be organisable like Objects and Images).

Anyway, I thought this was a genius idea and I'm definitely stealing it. But when thinking about how I'd tackle this concept of drone types and pre-slave characters, I hit upon another idea:

Why create so many drone characters when I can dynamically change every character's properties anyway?

I plan on having lots of characters in my game, and the prospect of creating so many characters, and typing out all the properties for each character etc frankly does not inspire me at all. Now I very much plan on extrapolating all actions into Timers as possible, so as far as I know, I only need to maintain a list of character names, portraits, and attributes in an MDA, and a few template characters and we're good to go!

Now the problem with this is, you can only have as many characters in the same room as you have dynamic characters, so a decision had to be made. I chose 3 but this can be easily extended by duplicating these dynamic characters anyway. All actions will basically be "parse the character name to the timer" affair so there will be little to no code tweaking within the characters themselves.

Second problem - how do you now track what characters are in which room now? It's a serious question as well, since you can't just leave your character in a room and forget about them - and the solution why simple conceptually, does take some coding with an "On Each Turn Timer" - keep track of where your characters are with an array and move them into the room (and don't forget to move other characters out).

For efficiency reasons I chose to keep them on the map template so you don't have to loop through all your characters each turn, so I just have to pick the room name from my array (using direct array ID reference) and figure out who needs to be here, and convert my template characters into appropriate characters.

So far so good. But why stop at characters? Next time, I'll talk about dynamic rooms.

No comments:

Post a Comment