Mirroring & Rotating

  • lolzy
    29th Jul 2010 Former Staff 0 Permalink
    V?
  • kamikai
    29th Jul 2010 Member 0 Permalink
    its not the hot key lolzy, its the actual tool:
    seehp:
    m' for horizontal mirror and 'r' for rotate clockwise. That is enough for all transformations.

    seehp did not mention vertical flip
  • lolzy
    29th Jul 2010 Former Staff 0 Permalink
    I know. I just mean how about V for vertical flip.
  • vsams14
    29th Jul 2010 Member 0 Permalink
    if the game saved an area as a stamp, then loaded it from the bottom , up, then the last row would end up in the first row of memory, therefore flipping the area vertically. If the same thing is done where the stamp is loaded normally, but instead of from right to left, it is loaded left to right, then it would flip the area horizontally. This would not be too hard to code if you know what are of the code loads stamps. rotating would be hard because a separate algorithm would need to be used for each degree value below 91 (91 and above are all repeats of a previous algorithm) and would only work on 90 degree increments due to the fact that items, when the smallest size is one pixel, cannot be rotated without a loss of dimensions. for example, if you do not believe me, open paint or another very basic pixel editor, zoom in all the way, and create a square 10 pixels wide by 10 tall. you can color the corners so that you can see it is being rotated if you like. now attempt to manually rotate the picture 45 degrees, you will notice that you cannot and end up with a square, who's verticies are far bigger than 1 pixel. only 90 degree rotations will be possible. hopefully simon will add it soon, because with really big creations, where you realize you made it upside down, and it should be the other way around, it gets really tedious to flip the whole thing manually.
  • lolzy
    29th Jul 2010 Former Staff 0 Permalink
    Gist?
  • vsams14
    29th Jul 2010 Member 0 Permalink
    basically explaining what needs to be donee in code for this idea to work to anyone who cares
  • kamikai
    29th Jul 2010 Member 0 Permalink
    vsams14:
    it gets really tedious to flip the whole thing manually.

    here here!
  • triclops200
    29th Jul 2010 Former Staff 0 Permalink
    It would be awesome to make soemthing like that, and it isn't hard with pixels, seeing as I did the same kindof program with my ti-83 calculater in 8th grade , I'll see if I can understand his copy and stamp code.
  • seehp
    29th Jul 2010 Member 0 Permalink
    kamikai
    vertical flip is just a horizontal flip with a 180° rotation.
    All you need is horizontal flip and turn right in 90 degree steps.
  • kamikai
    29th Jul 2010 Member 0 Permalink
    seehp
    no... verticle flip is different to rotating: