New answers tagged


Yes, you can have both 64x64 tiles and 32x32 tiles. If you want both of them to take only one square, you will have to adjust the pixels per unit. If you don't know what that is, please comment and I'll help you.


For those also starting out trying to properly understand GLSL rather than just reuse online code, here's what I learned over the past few days. Note the below points refer to GLSL for GL ES 2.0. Two key points were: Get into the GPU mindset. GPU's have 100's or 1000's or cores all working in parallel, and a shader is basically designed to process lots of ...


There is the way, which is partially automated: Open sprite sheet with Photoshop Using the slice tool make one big slice that'll contain the entire image Right-click it and split this slice into a grid (it's 32x32 pix I presume) Join small slices into a bigger one (this have to be done by hand) where needed Export every slice as a separate file using File ->...


Since you found the picture online, without any json file attached or any other information, its not possible to cut this into multiple sprites automatically. You'd have to do it by hand.


SOLVED ! I have modified the code as follows: instead of just position.x and position.y as arguments in SpriteBatch.draw() i modified those values as follows after some trial and error position.x - currentFrame.getRegionWidth()/2f position.y - currentFrame.getRegionHeight()/2f So batch draw call looks now like this: batch.draw(determineTexture(), ...

Top 50 recent answers are included