With the discovery of drawSheetEx, I have a suggestion.
-
So I'm assuming that drawSheetEx is meant to extend drawSheet's functionality much like how drawImageEx extends what drawImage does. But after hearing about this undocumented function, perhaps we can extend that a bit more?
My suggestion. Allowing the "tile" parameter to not be limited to a regular variable, but to also include using a 1D array or a 2D array. Using a regular variable will simply draw the one tile at the location specified. Using a 1D array would draw a string of connected tiles from left to right, starting at the given location. A 2D array would be like a group of 1D horizontally-arranged tiles connected from top to bottom.
One might ask "why not just use maps?" My answer would be "because I'd like a bit more control." Maps are a good way to get things done quickly, but they do have their limits. One could do something like maps using drawSheet, but the problem comes from the fact that if you're looping through arrays to provide the same result, you spend a lot of CPU cycles doing it.
-
That's right.
And I don't think memory is a problem.
Could even go 3d for animated tiles.
Nice suggestion. -
@Discostew I have already raised an issue for this and now I have added your suggestion
-
After discovering drawImageEx last night - then actually needing to use drawSheet - I looked for drawSheetEx and wasn't in the references? So is it not officially supported?
-
@SwitchedOn Yes this should not be in the language as it is not complete and is undocumented. I have raised an issue for it to be implemented or removed.
-
Or removed.
So much want to make function drawsheetxev() now.
I wonder how fast it would run. -
@xevdev Well I have passed on the suggestion but the decision on what does and doesn't go in the language is not up to me I am afraid
-
@pianofire said in With the discovery of drawSheetEx, I have a suggestion.:
@Discostew I have already raised an issue for this and now I have added your suggestion
If drawSheetEx were removed, perhaps my suggestion could be implemented into the original drawSheet function instead?
-
@Discostew Maybe but like I said it's not up to me!
-
@xevdev yeah old topic but I do this all the time now just take the sheet image and cut it up draw image can take a sectional piece draw to a createimage store in an array then use drawimageex to display just alter the array number.
-
@xevdev Say that again but take a breath between sentences 😛