Tag Info

Hot answers tagged

4

The problem you are facing is conversion between two different coordinates systems: the graphical one and the input one. Graphics coordinates Like you said, libGDX uses a 1 to 1 ratio between space coordinates and pixels, and starts in the bottom left corner. But it can be anything, really. That is just the default behavior of libGDX. You could change the ...


2

You need a finer-grained method of moving your viewport. What you're doing now is essentially moving it by the size of a single tile every time you scroll, when what you want is a smaller increment. You do this by using a camera object represented by an x, y coordinate. Update its position with your scrollIncrement, then use that as the starting point for ...


1

I don't think this is possible in your case. A repeating texture at the hardware level needs to span the entire texture, at least on the axis it is repeating. You can still repeat the sprite if you write your own routine. You would just call draw() multiple times. If you decide to load your repeating sprite as a separate texture so you can render it in one ...


1

In a client/server architecture it is not required that client and server are implemented in the same programming language. They usually communicate by sending raw data via network sockets. So you can choose the technology for each component separately, depending on your requirements, skillset and personal preferences. An exception would be when you want to ...


1

You need to specify the width and height when you draw the texture. batch.draw(texture, x, y, width, height); In your case you want to set the width and height to one since one wall tile is one world unit big. Because you don't specify a width and height the batch uses the width and height of the texture. That is why it covers 16 world units instead of ...



Only top voted, non community-wiki answers of a minimum length are eligible