Discussion Index

coupons and why coders hate them

______
1998 Topic Index

Posted by Rufus on 02/22

Okay, lemme enlighten a few people on exactly how the memory works on legend...

When the database is loaded, it loads all mob, object, extra, exit, room descriptions (basically anytime you see text) into what is known as a 'static' string table. When an object is created, or a mob, what happens is instead of that object having the description on it, all it has is a pointer to this massive table of strings that is in memory.

What does that mean, exactly? Take for example a sidhe tunic. If one were loaded into the game without the static string table, it would take approximately 250 to 600 bytes for its description alone. Not only that, each instance of a sidhe tunic would take that many.

With the static string table, all you need is a small (4-byte) pointer to an entry in the string table, hence using 28 bytes instead of about 400.

Strung items... strung items, all their lavish and unique descriptions are nice... but they are also not on the static string table. Instead of the 28 bytes it takes to make normal objects have descriptions, most strung items take 250-600 bytes of storage... or more in some cases.

Now, that may not sound like a whole lot of memory... not much at all, bytes are small right?

Think again when you have 10,000+ objects on the mud at any given time...

Sure you want everyone to be able to string each item they have?

-Ruf

From: Dudley Saturday, February 21, 04:03PM

Have them pay for a better mud machine. ;)

From: Dryden Saturday, February 21, 06:05PM

Although I agree that coupons should be relatively rare, I feel compelled to point out that you wouldn't have 10,000+ objects all strung differently. Yes, there would be a lot of objects overall, but the increase from the players having strings would not be that great. If 70 players were online all at once with a full set of 21 strings, that'd just be 1,470 strings. If those were all taking up 600 bytes, that'd be around 882k. While that's still a considerably amount, it's not unworkable.

From: Eol Saturday, February 21, 09:29PM

people just want to be able to use the coupons they have , not have autodesc powers on their items without getting a coupon you arent increasing strung items.

Its kind of ridiculous when someone has playted a char for years, with alm ost a full strung wardrobe, who wants to alter his rp a bit and doenst feel like looking like an angel when hes fallen from grace, and junking 20 coupons, or losing them, thats more coupons than Ive probably had.

we arent increasing the number of strung items (unless peopple dupe items, which is already illegal) just channging the ones existing.

From: Dudley Saturday, February 21, 10:47PM

I haven't seen anyone change their RP a little who couldnt work around the fact that they had no or 21 coupons, and if there were, he/she could just as easily give the strung pieces to others, or restring smidges of zips and start eq'ing again.

The way i see it is that if you can get 21 coupons once, you can get them again. Some of us are just not as talented in getting coupons, the only ones i have among my chars were from the st. patrick's day (tho i dt'd that char :() and from x-mas when imms were feeling awfully generous.

Most ppl i see that whine about coupons aren't those that want to rp, but (no offense intended, but) those that just like to strut around stroking their ego.

Dudley

From: Joachim Sunday, February 22, 02:13PM

250-600 bytes of storage????? lets see, a 79 character long desc takes 80 bytes (plus the 4 for the pointer, but you pay that for a pointer into the string table) the short desc

115 bytes a string. the storage for keywords could concievably double it. 230 bytes a string. now, of course the absurd every-character-a-different color strings are -hideously- abusive of ram, but that's another problem. 250-600 sounds -distinctly- high to me, though. And as was pointed out, this is just for player's strings on line, so storage for the full 10,000 objects is hardly necessary.

______

1998 Topic Index