Go BIG or go home!
I'm curious if, in the process of planning this update, you looked at any current implementations of pixel movement in DM or sought input from BYOND developers currently using pixel movement, such as Forum Account.
I agree that the need to parse this string to update isn't ideal, but then it's hard to imagine this changing much at runtime.
Suppose you want to determine, taking pixel offsets and bounds into account, how many pixels you are away from an object - are you going to parse the string every time? This might seem like a strange or rare case to you, but it's not.
Well, honestly if you are writing games where you need to do this kind of thing, I don't think that the reading/writing of a text string is going to add any real overhead (and with a function call it won't complicate the code either). Probably I'd just make my own atom vars for width & height for reads and have a routine to update them and then rewrite bounds for writes.
atom.bounds = "16,16"world << atom.bounds.width // outputs 16world << atom.bounds.width + 1// outputs 17
It's not about the overhead, but there's no reason to do it.
atom/movable var/width var/height New() if(width || height) updateBounds(width,height) return ..() proc/updateBounds(newWidth,newHeight) if(newWidth) width = newWidth if(newHeight) height = newHeight bounds = "[width]x[height]"
If you want to stick to strings, there are some things you can (potentially) do, like:
> atom.bounds = "16,16"> world << atom.bounds.width // outputs 16> world << atom.bounds.width + 1// outputs 17>
Like I said, the idea behind the text bounds is for greater flexibility (initially for the border example I gave but also for possibly better resolution).
And how often do you really expect to be changing the size of an object at runtime? Is this happening a lot in existing games (honest question)?
I typed "Flash" in my browser's search feature, but nothing came up.
wow man this is a super cool update now we can make games where your only 1 pixel wide or something or even 128x128
No. This update makes more tiles. As in multiples of 32. A 1-pixel wide atom would still function as 32x32.