simstratic's Forum Posts

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Ashley if you look at the example for flipping the texture, if you are using relative mode, setting column/row to (1,0) to texture coordinate (-1,0), is effectively setting texture coordinate to (0,0), which should be valid.

  • I'm hoping this will also be very useful for HD art where you have a lot of empty space in large sprites, to reduce overdraw by 'collapsing' mesh points in transparent parts of the sprite.

  • Last of all, not so much feedback as a begging pleading wish, let mesh points have z-elevation, you would then have instant awesome psuedo-3D to easily have top down buildings like the original GTA, or dungeon crawls like Eye of the Beholder.

  • Sorry here is the screenshot for scrolling texture:

  • My last example is scrolling the texture within the sprite, which is a bit harder to explain, for example imagine you have a conveyor belt, instead of animating the conveyor belt moving, you can scroll a seamless texture to make it look like the conveyor belt is moving. The example below shows a texture that has been scrolled horizontally 30% to the right.

    FEEDBACK: This was a bit fiddly, especially with relative mode, so I would suggest using absolute mode in this case. You will note I had to increase the number of mesh points and collapse the middle points together to the same position. This would be much simpler if it implemented UV wrapping - I'm not sure of the OpenGL terminology - but that's what I would call it. Then I could more simply use a 2x2 mesh, and set column/row (0,0) to texture (0.3,0), (0,1) to (0.3,1), (1,0) to (1.3,0), and (1,1) to (1.3,1).

  • This example shows how to flip only the texture horizontally without flipping the sprite instance:

    FEEDBACK: This is a bit weird with relative mode - the last two lines in relative mode should technically be -1, but I had to use -1.1 because -1 means use original value. The engine seems to bounds check the -1.1 to -1 anyway so it works, but it's not intuitive. Ashley maybe you could use another value instead of -1 to represent the original value? Or use < -1 instead of == -1?

  • This example shows how to flip a sprite (including the texture) horizontally:

  • This example shows how to shear/skew the top edge of the sprite by 50%:

  • This example shows how to crop the texture in half horizontally but maintain the size of the sprite instance:

  • This example shows how to crop a sprite in half horizontally:

  • Hi all!

    Today I have been testing the new mesh deformation in beta r219. Although the included example projects are fancy and impressive, they might be a bit complicated for beginners, so I wanted to share some simpler examples, that also have practical applications in a game. The examples include:

    - Crop a sprite

    - Crop a texture (similar to above but keeping the original size of the instance)

    - Shear/skew a sprite

    - Flip a sprite

    - Flip a texture (similar to above but only flips the texture not the instance itself)

    - Scroll a texture within a sprite

    Each example shows how to do it with both relative and absolute modes.

    I'll put each example in a separate post because sometimes I have issues uploading multiple images.

  • I don't think it should happen... do you have any objects on that layout? Any effect on the layout?