Author Topic: Memory if no "on" existed in input events / why colorsets?  (Read 792 times)

Two random questions that do not correlate with eachother.

How much memory could be saved if input events stopped putting "on" in front of the event, such as "Onactivate".  Instead, couldn't a good amount of wasted memory be gained by never using "on" anymore?



Why do we have colorsets, and not a customizable paint color chooser.  I assume it be for memory's purpose; each brick is saved with a data value corresponding to the paint color in the colorset that it is painted with.  If this is so, then why can't we have ingame colorset customization, like in the avatar menu?

What kind of question is that?

On is a pretty good ordering phrase.

What, are we just going to do:
OnActive >> Client >> ifCenterprint

OnVehicle >> Driver >> setColor


They are needed and I don't think two letters make a huge difference...?

With gigabytes of RAM and hundreds of gigabytes of HDD space, you're actually concerned about two bytes?

500,000 bricks:

~1MB of memory saved

500,000 bricks:

~1MB of memory saved
1 MB isn't that much either, and, it's also not per brick. Bricks store events as integers, not strings.
The strings are actually only used once per input name on the server, and varying amounts per on the client, depending on how many events are in the list at the time when you have the GUI open.

Usually if I have too many colors to choose from when making art I end up quitting because I can't decide which color looks better and grabbing the same color again later becomes a pain.

Two bytes?
Well luckly torque saves everything as text data, otherwise it would have no effect at all.
I guess it doesn't.
But seriously, probably only a few bytes on a large save.

If this is so, then why can't we have ingame colorset customization, like in the avatar menu?
Um, maybe because we can?

Why do we have colorsets, and not a customizable paint color chooser.  I assume it be for memory's purpose; each brick is saved with a data value corresponding to the paint color in the colorset that it is painted with.  If this is so, then why can't we have ingame colorset customization, like in the avatar menu?

This is more to do with the game networking overhead than saving. Telling a client that brick A is colored "5" instead of "0.3013 0.9328 1.0000 0.8900" uses a lot less data.

With out the "if", "on" and "set" words didn't exist it would be hard as hell to use the events.

This is more to do with the game networking overhead than saving. Telling a client that brick A is colored "5" instead of "0.3013 0.9328 1.0000 0.8900" uses a lot less data.
Ohhh, that's why...


But what if you could create new color ids dynamically? So if someone decides they want a new shade of blue to work with, they add it to their client sided colorset and then blockland tells all the other clients over the network that "Reinforcements used the empty color id 65 for this color: 0.1 0.2 1.0 1" But the color would only be added to my colorset. It would be sent over to all the other clients so that when I make a brick with color id 65 they'd know what color to use. Then, if someone else wanted to make a color of their own, it would use the next available ID, which is 66. It would then tell all the clients what color that id stands for ect.

Good idea^

Ohhh, that's why...


But what if you could create new color ids dynamically? So if someone decides they want a new shade of blue to work with, they add it to their client sided colorset and then blockland tells all the other clients over the network that "Reinforcements used the empty color id 65 for this color: 0.1 0.2 1.0 1" But the color would only be added to my colorset. It would be sent over to all the other clients so that when I make a brick with color id 65 they'd know what color to use. Then, if someone else wanted to make a color of their own, it would use the next available ID, which is 66. It would then tell all the clients what color that id stands for ect.

Good idea^
*creates 1000000 colors
*server crashes

*creates 1000000 colors
*server crashes
Maybe you could have a client limit. Like, say you join my server

*Joins server*

You could have your custom colors from IDs 175-250. That way there'd be a max.

Maybe, but how much do you really need a slightly lighter white.

Maybe, but how much do you really need a slightly lighter white.


lol, but seriously, custom colors would be very nice to have. Not just for a slighter whites, but different blues, browns, anything you need that your current/the server's current colorset doesn't have!