Tag Info

New answers tagged

0

Lacking an OpenGL compiler I forgot a semicolon. So this "v_TexCoordinate = a_TexCoordinate" + should be this: "v_TexCoordinate = a_TexCoordinate;" +


0

try this: try { String packagename = context.getPackageName(); final PackageManager pm = context.getPackageManager(); PackageInfo pInfo = pm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS); String installerPackagenName = pm.getInstallerPackageName(packageName); if(installerPackagenName.equalsIgnoreCase("com.amazon.venezia")){ ...


1

Oh yeah, the unity remote app can be a pain in the ass. It seems like you set up everything correctly. To see if everything works fine just try to build and run the app for your phone... if it can be built and pushed to your phone everything should be alright. If you can push the app through unity on your phone I hopefully have a solution for you, which ...


1

//At the apex of the jump, Ruben's velocity.y is ~0 if (Math.abs(ruben.velocity.y) < 1) //If Ruben's velocity.y gets close to 0... { ruben.velocity.y = 0; //stop him Ruben.setState(Ruben.RUBEN_STATE_IDLE); } //velocity.y = +1 //jumping //velocity.y = 0 //no more jump left; begin falling (except the if activates) //velocity.y = -1 //falling Edit - ...


0

You could duplicate object that you want do render with different colours/brightness and place them in seperate layers. Then you set each of the cameras to ignore one of the layers (layer culling). But why would you want that? The brain will have problems making sense of such wierd images presented to the eyes - this will almost certainly end in ...


0

My personal opinion on this is that if it's a competitive game, the information should not be available on the client until it's ready to be shown to the player. The League of Legends launcher at one time knew the names of your opponents, but displayed "Summoner 1", "Summoner 2" etc. So a few times someone said in the pre-game chat "Hey Summoner 1 is an ...


2

You have to return true from touchDown. Documentation says: The GestureListener can signal whether it consumed the event or wants it to be passed on to the next InputProcessor by returning either true or false respectively from its methods. So, if you return false from touchDown, that is the first even raised in all cases, it stops event handling. If ...


1

In Bob's update method you do nothing with his velocity. He has no way of actually moving, with the code you have shown. You should do something along the lines of this before you reset the bounds: position.add(velocity.x * deltaTime, velocity.y * deltaTime);


0

There are overloads for Texture() that allow you to pass a Pixmap.Format. The list of formats is quite limited. Per OP: texture = new Texture (Gdx.files.internal ("gs.png"), Pixmap.Format.LuminanceAlpha, true);


-1

Try to add setSwallowTouches (true); after creating the listener.


0

Doing this manually is insane. You need a tool that will take a folder full of images, pack them into atlases AND write a file containing all the coordinates. So then in your game you could address any image by its index or name or whatever and get its atlas coordinates (in pixels or UV).


2

The GestureListener is something that should be passed to a detector, and the detector (which is an InputListener) will read touch events and amalgamate them into higher order events such as pan, fling or long press. So I would expect your code to have something like this somewhere; Gdx.input.setInputProcessor(new GestureDetector(new FlingHandler())); ...


3

The web player uses a browser plugin to do its work. That means there is X amount of functionality that is already downloaded by the user before they ever download your game (tens of megabytes). On android, the game is a standalone application so has to include all the functionality needed inside of itself.


1

Here we are just one script, assign it to the cube TargetSlideControl.cs using UnityEngine; using System.Collections; public class TargetSlideControl : MonoBehaviour { public int SPEED = 1; public Transform leftTrigger; public Transform rightTrigger; // Use this for initialization void Start () { } // Update is called once per frame void Update () { ...


-1

Pressure, as in how much force an object is pressing down with, is technically not supported by the hardware. Touch screens can detect if there is a touch, but it is digital; true or false. However, assuming you are using fingers, which 'squish' you can sort of emulate a pressure sensor. Simply detect the area of touch. If you lightly press down, the tip ...


0

Since you're overriding the Main UnityPlayerActivity your AndroidManifest should look like : <?xml version="1.0" encoding="utf-8"?> <manifest android:theme="@*android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0" android:installLocation="auto" package="a.b.c" ...


1

This may help a bit. As for knowing how to do what you exactly want to do, I would need hours of trial and error as I am also a bit of a beginner. public void create() { gestureDetector = new GestureDetector(HALF_TAP_SQUARE_SIZE, TAP_COUNT_INTERVAL, LONG_PRESS_DURATION, MAX_FLING_DELAY, new GestureHandler()); ...


0

I don't see any new Spring calls in the code you posted, if the springs are being instanciated in the getSpring method then you need to ask yourself if you always have to return a new instance. With Vector2 for example, it comes with a set method, so you can have a temporary (or many) instance in your class that you work with when doing vector math, so you ...


0

If you just want to create a "SettingsActivity" and a kind of main menu for your game : why not, you may save time indeed. You can start as much custom activities as you want from an Android LibGDX project. The libgdx launcher class usually generated in templates project is just an activity. So it's technically possible to start other activities and Android ...


1

Are all coins doing the same animation? You could make a method in the Animation class that takes a coin as an argument, then performs the animation on that coin. Then, on another class, you make a loop that traverses the coin list and calls the method in your Animation class, therefore animating each coin as you go through the list. You can also add delay ...



Top 50 recent answers are included