[Solved] SaveBytes() and LoadBytes() acting up
in
Programming Questions
•
7 months ago
Hello all.
I just had the array problem more or less dealt with ( Saving Game Level), but now it has given me a new problem.
I have the program rearranging the 2D array into a 1D array, and I'm using the Processing reference example for loadBytes() to test the efficiency and effectiveness of saveBytes() in my program ( loadBytes()).
What saveBytes() is actually doing, by the looks of it, is that it is mirroring the entire array on some sort of diagonal line.
Or the main program overall is made improperly.
Here are some images of what is happening:
This is the way the main
program shows the level:
Then the reference program
interprets the array like this:
Which is the same as this:
It's as though the program flipped the image vertically, then turned it quarter turn clockwise.
Why is the main program saving the array like this?
Code in the next post.
- MenteCode.
I just had the array problem more or less dealt with ( Saving Game Level), but now it has given me a new problem.
I have the program rearranging the 2D array into a 1D array, and I'm using the Processing reference example for loadBytes() to test the efficiency and effectiveness of saveBytes() in my program ( loadBytes()).
What saveBytes() is actually doing, by the looks of it, is that it is mirroring the entire array on some sort of diagonal line.
Or the main program overall is made improperly.
Here are some images of what is happening:
This is the way the main
program shows the level:
Then the reference program
interprets the array like this:
Which is the same as this:
It's as though the program flipped the image vertically, then turned it quarter turn clockwise.
Why is the main program saving the array like this?
Code in the next post.
- MenteCode.
1