Tag Info

New answers tagged

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 ...


1

Since Android devices don't have left/right buttons (well, a long time ago they used to, and if you use bluetooth keyboard/gamepads they will), what you want is onscreen buttons. If you search for that then you will find plenty of answers and tutorials. The easiest method is to use the built-in GUI.Button class. There are many other ways to do it, such as ...


2

This is due to either a context loss or simply you disposing your textures, without recreating them at the proper time (as you pointed out).


0

My first clue would be you could build your own. Using C or you could also use python. You would need a way to identify the user with an ID or so that is send to the server and the server handles it e.g. stores the current game in a database. Applications of both users connect to server Apps send information about the player moves and user IDs Server ...


0

This solution worked - I excluded the following lines: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> And that solved the problem.


0

LibGdx is taking care of the FPS itself, there's no need to for you to intervene. remove all the fixing methods, your delta time is now - gdx.graphics.getDeltaTime() use only it (send it to world.step())


2

After days of stress, I've finally fixed the problem. After performing a backtrace on the main thread I discovered the program came to a halt when trying to load the Google Analytics trackers. This is the thread backtrace: at com.google.android.gms.analytics.ae.getLogger(Unknown Source) at com.google.android.gms.analytics.ae.W(Unknown Source) at ...


0

Stop using pixels and use virtual units. Remember that if you don't have camera.unproject(); in your input processing code then you have bad input processing code.


0

You can do this using AssetBundles, although the games would essentially end up merged into one game, and you would host each inside. So imagine building all of your games into one game project, with a special selection stage being the first thing loaded. Then, you'd break up the games into asset bundles. You would then trigger the asset bundle to download ...


0

I will give you a different approach you might wanna try. How i would do this is I would use shapes for the objects. A rectangle for the terrain, a rectangle for the bottom half of the worm and a circle for the top half of the worm. So the worm is a combination of 2 shapes. Now, if the user presses left worm gets a (-5,0) velocity if the user pressed up the ...


1

in c# void Update(){ if (Input.GetKeyDown(KeyCode.Escape)) Application.Quit(); } or in .js function Update(){ if (Input.GetKeyDown(KeyCode.Escape)) Application.Quit(); } This is the function for exit app when back button pressed, if you want to exit the app when back button pressed twice, implement the logic in the java code ...


2

OnApplicationPause(bool state) is called when the user pauses and unpauses the game, normally by hitting the Pause button found in your game (which you need to implement the functionality for - by setting Time.timeScale = 0). Sometimes it's called when the application is put in (or comes back from) the background too (user hits Home button for example). But ...


1

Let's say your "worm" is 100 pixels high, and his bottom edge is at 0 height. As you walk to the side, you'll find collisions (you know how to check if there's a collision, so I'm not going over that). If the pixel you're colliding with is LOWER than y + (h/4), where y is the height of the bottom edge (in this case 0), and h is the height of your worm (in ...



Top 50 recent answers are included