Tag Info

New answers tagged

2

The simple answer is that in general, your levels should be defined as data, and your code should be the same for all levels, it just reads the data to know what to do.


0

You can try using this code, I would also suggest checking out these two resources: http://stackoverflow.com/questions/18459122/play-sound-on-button-click-android http://mobile.dzone.com/articles/add-sound-effects-your-android private SoundPool sounds; private int soundEffect; //soundpool can let multiple sounds play at a time, in this case up ...


1

A ready to use method which is better than SystemInfo.operatingSystem : public int GetSDKLevel() { var clazz = AndroidJNI.FindClass("android.os.Build$VERSION"); var fieldID = AndroidJNI.GetStaticFieldID(clazz, "SDK_INT", "I"); var sdkLevel = AndroidJNI.GetStaticIntField(clazz, fieldID); return sdkLevel; } Just copy and paste and that's ...


1

You don't need the pro license to release games for any platform. You just have to upgrade if you made more than 100k in funding or revenue. I believe paid advertisements can be done with the free version. https://unity3d.com/unity/faq


0

You miss some important things. You have to transform the clip-coordinates to camera coordinates and do the clipping with those. But you dont have to reinvent the wheel. Go to github - andengine - there is already a class called ClipEntity that does exactly what you want to achieve.


0

If your application crashes due to calls to missing libraries you can test for their presence using Reflection. If the application doesn't launch due to unmet dependencies try to remove the dependencies and only then selectively call google leaderboard only if it's available.


0

All of your code seems fine exept for this typo on getRandomPosition(): pos.right = pos.left + Tile.TILE_HEIGHT; which should be pos.right = pos.left + Tile.TILE_WIDTH; I'm not sure if that can be the root cause of the problem, but there's always the option of not using recursion and use a loop, should be easier to debug: private RectF ...


0

Another option depending on the scope of your game is to skip the publishers and instead try to reach out to review sites and try to have an article written about your game. This is usually very hard for small phone games, but even if it won't work for this one its an important strategy to have knowledge of.


1

Try this: package com.mycompany.mygame; import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.math.*; public class MyGdxGame implements ApplicationListener { public float x; public float y; public float w = 50; public float h = 50; Texture texture; ...


0

No. Pixels are squared. At least from an API point of view, you can safely assume that your pixels are square, and that if you draw a circle, you will get a circle. What you're most likely experiencing is a problem where your target canvas size is not the same as the screen resolution, so pixels will seem stretched. What you need to do is figure out the ...


1

As it turns out, you can't interrupt a touch gesture within the normal scope of how Android operates. It might be possible if you do serious hacking on the source code, way deep down in the Choreography class and some of the core classes, which is NOT advisable, but even then it may not work. What you (or I; weird answering my own question) most likely need ...


1

JSON Philipp makes a good point about JSON. It is human readable and makes debugging network code easy. If you have no experience in programming network code, this would be the way to go. Yes, there is a lot of overhead by using JSON, but for small to medium data transfers, it should be more than enough. And like Alexandre Vaillancourt said, you can always ...


0

Most probably that's because of the loss of OpenGL context and the way Android handles Activity finish (process/task of the app may not be destroyed when main activity is closed). Check out this Stackoverflow answer for more details: http://stackoverflow.com/questions/12508769/libgdx-app-exit-on-android-not-closing-application


0

You can make a script at the start of your game to get the Screen.Width, and Screen.Height, and then set your camera's scale to the same scale the user is having. You can never assume anything, maybe most mobile phones have moved to 1280x720, or 1280x800, but what about tablets? They're android devices as well, and they should be able to run your games ...


1

Your question actually has nothing to do with its title, but here's the answer anyway: ToString is a method of the Object class, which all classes inherit, but not all implement it. It seems List does not implement it, so the default behavior is to make a string with the just the name of the namespace and the class. That's why you're seeing a ...



Top 50 recent answers are included