Tag Info

Hot answers tagged

1

You could try turning on multi-sampling when applying the application configuration. The Multi Sampling Anti Aliasing is controlled with the numSamples property for AndroidApplicationConfigration and with the samples property on the LwjglApplicationConfigurtion. So if you want to turn on anti aliasing for the desktop version you'd do something like; public ...


1

Do you want the objects to move along the X axis (right to left) at the same speed or should this vary? If it should be the same speed, simply apply some sort of random modification to their Y velocity every X frames while keeping the X velocity at a constant. If they should slightly vary in speed from left to right, do the same as above making sure to ...


1

Given that top left is at 0, and each tile is square with length 10: int squareClickedX = clickPosX / 10 int squareClickedY = clickPosY / 10 So, if clicked on x23, y12 int squareClickedX = 23 / 10 int squareClickedY = 12 / 10 results int squareClickedX = 2 int squareClickedY = 1 Means that you clicked Was this any good? This is quite common way ...


1

A Stage has the 2 methods act() and draw(). The act() method calls act() for all it's Actors. The Actors act() method updates all it's Actions, so your screenshot is taken while the Stage is acting. The draw() method calls draw() for all (visible) Actors and is usually called after the act() method. The screenshot should be taken after the draw() method. ...


1

What you need to do is assign a listener to the Actor (I assume you are using these). This is as simple as (if you are trying to detect clicks): myActor.addListener(new ClickListener() { public void clicked(args) {.... }); Then put whatever you want to happen in that clicked method. Make sure your game's input processor is that Stage! ...


1

You need to distinguish between the gl-viewport and the cameras viewport. The GL-viewport somehow defines the area on the Display, while the cameras viewport defines the area in the game world. So a camera with a viewport of (1/1) can see 1 unit of your world in width and height and projects it to the gl-viewport. For example: You have a Camera with a ...


1

Here is an official Spine 2D example where they load Spineboy into a game. https://github.com/EsotericSoftware/spine-superspineboy The following 3 lines are used to read a texture atlas and skeleton data as well as making some animation state data. TextureAtlas playerAtlas = new TextureAtlas(Gdx.files.internal("spineboy/spineboy.atlas")); SkeletonJson ...



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