Tag Info

New answers tagged

3

Check your Unity Preferences / External Tools / Android SDK Location, according to the Unity docs regarding Android SDK Setup. Check your Build Settings (it's important to check that you've added all the scenes and the starting scene at the beginning) Write down the name of the apk file and click save You should see a new window for showing the building ...


1

According to the Wiki the Content Pipeline for Android requires different steps and it seems does not yet work with MonoGame's own content project. However it seems parts are already working (a bit). So a possible work around is to import the FBX model without textures, but including texture coordinates (UV's) and load the texture separately. Then apply the ...


3

Unity Remote exists for this purpose. Quoting their description: Unity Remote is an application that allows you to use your target device as a remote control for your project in Unity editor. This is useful during development since it is much quicker to test your project in the editor with remote control than to build and deploy it to the device ...


1

Since Unity 4.2 there is a class called Androidjavaproxy which can do exactly what you are looking for. This class can implements any Java interface in Unity.


1

You are going to have background rendered either way. OpenGL redraws the whole frame each time. So what does it matter for performance where are you drawing it from? :) It does not matter, unless you are doing some heavy computations to generate the background on CPU. What you probably do is just updating the background location each frame (position, ...


0

Scaling of textures when rendering is generally not very performance intensive - it can sometimes even be faster to render small textures that are scaled up (usually when there are lots of textures and they need to be swapped from ram to vram). Of course, using small textures comes at the cost of quality. It is generally best to avoid doing scaling yourself ...


0

Currently there is no way to set the position of a TiledMap. All you can do is move the camera to make it seem as though the map is moving. To do this you would have to create your own rendering code that allows for drawing position input. A workaround that you could try would be making the map twice in Tiled (i.e. in one tmx file, have the map repeat once, ...


0

for a similar requirement in a prototype (all be it on unity for desktop) but i think the logic, planning & structure should stay the same. i was able to create a parent object for each class of weapon with different animations. then i added all the different appearance of the different models as children of that parent object and simply animated the ...


0

In your GameScreen class do not initialize a new MainMenuScreen object in the constructor. Instead, when the drop collides with the bucket, call a method called returnToMain() or something like that, and within that method, initialized a new MainMenuScreen object and assign it to the game's screen: this.game.setScreen(new MainMenuScreen(game)). This is how I ...


0

You have to convert screen pixels (or screen points) to meters and vice versa when you are using Box2D for your game physics. Please read section 1.7 of the Box2D documentation for more information on Box2D units and the scale to use for the best results. In our current game (iOS, universal app), we use a scale of 1.0 / 64.0 for points-to-meters conversion. ...


0

In your listeners, instead of returning false, do something like this: int numTouches = 0; LockerKeyHalfImage.addListener(new InputListener() { public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) { System.out.println("clickrd Locker>>>>>>>>"); numTouches += 1; } }); ...


0

Setting bucket.y only sets the buckets position, so that should not be -.5, it should be the bottom of the screen (0), or at least the ground, to start. To move the bucket you should add a method called jumpBucket() or something similar. Then call that method whenever a touch is performed (check this within your render() method). This method should add some ...


0

If by rotating in a circle you mean WALKING on top of the circumference of a circle, then I guess any of the answers correctly answered your question. So here is my add: You can continue loading you texture with texture = new Texture(Gdx.files.internal("1325603701_wordpress.png")); but it is extremely recommended that you use the AssetManager. About it ...


-1

Do it like this 1. Load your image into AssestLoader class and store it in sprite sprite=new Sprite(AssestLoader.1325603701_wordpress); 2.Then set its size , position and color like this sprite.setColor(1, 1, 1, 1); sprite.setSize(sprite.getWidth(),sprite.getHeight()); sprite.setPosition((w / 2) - (sprite.getWidth() / 2), (h / 2) - ...


1

Instead of mPointer.stopRotation() you need to gradually apply negative acceleration (torque) to get to your desired point. So, you have currentPoint, targetPoint and currentSpeed (I will measure all of them in grades as I guess that's also how you do it - for currentSpeed grades/second). The distance in grades that the wheel must travel from currentPoint ...


0

Okay, finally after 6-7 hours of searching through the internet i finally found the answer i was looking for. Since my layout is made up of nested LinearLayouts, I had to add a android:clipChildren="false" attribute to all my LinearLayouts(button parents). Seems like the issue was the linear layouts didn't want to let it's childs outside to play. Which is ...


0

According to this Google Saved Games documentation : Read/Write isolation All Saved Games are stored in your players' Google Drive Application Data Folder. This folder can only be read and written by your game - it cannot be viewed or modified by other developers’ games, so there is additional protection against data corruption. In addition, Saved ...


0

You need to register listener and get sensor, see official site. mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); mLight = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); @Override protected void onResume() { super.onResume(); mSensorManager.registerListener(this, mLight, SensorManager.SENSOR_DELAY_NORMAL); } ...


0

I'm studying this book, and here what I learned so far: You need to set a OrthographicCamera passing width and height of your screen, If you want pixel-perfect manipulation, pass the screen resolution, but for your problem you could just pass a size in 'meters' camera = new OrthographicCamera(5.0f, 5.0f); In your render method, you need to update the ...


1

You can register an IUpdateHandler that tracks the total amount of elapsed time by accumulating the value in pSecondsElapsed and then only executing your action if the accumulated time is less than 5 seconds. Also track the elapsed time in a delay counter to execute a timer action every 1 seconds. For example public interface TimerAction { void ...


-1

in my case my problem was solved after writing this for background color change to white glClearColor(1.0,1.0,1.0,1.0);


-2

Using GL_TRIANGLE_FAN for a quad uses 4 vertices, not 6.


0

Yes the solution is you get value from your matrix or array and set That value for temp array or matrix and Then set value from there this is show you your rotate value gird. I added code below i think its help you int MAX_GRID = 4; int[][] main_array = new int[MAX_GRID][MAX_GRID]; int[][] temp_array = new int[MAX_GRID][MAX_GRID]; /** ...


6

While this depends on the country in which you are publishing, as not all countries will have the same copyright laws/regulations, copyright is implicit. There is nothing to register specifically to mark it as copyright unlike a patent which has to be applied for. The difficulty comes in asserting your copyright. In the event that someone does infringe your ...


0

I suggest using two backgrounds to support your parallax movement, decalre 2 backgrounds/layers one for character and another for background level. Try this : public void update() { if (speedX < 0) { centerX += speedX; } if (speedX == 0 || speedX < 0) { bg1.setSpeedX(0); bg2.setSpeedX(0); } if (centerX <= 640 && speedX ...


2

On of the major reason your code is slow is because you load your bitmap every time you render your game. Try putting this line in an initialization function: ... Bitmap bitmap; protected void init() { bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.menu_bg); } ... protected void onDraw() { //Set Rectangle Size and Coordinates ...


1

The code you've posted is only checking for touches that began on this frame. If all you want is to verify that any touch is present, you can just check if Input.touchCount is greater than zero.


1

Android does not limit your options when it comes to collision detection. Here is a nice article about SAT collision detection: http://www.codeproject.com/Articles/15573/D-Polygon-Collision-Detection That implementation also has the nice feature of being tunneling free. That is, if two object with very high speed intersect each others paths in such a way ...


0

Follow these steps to "deauthorize" an app with G+ sign-in: Open the Google Settings app on your device. Next select the Connected apps option. Find your app in the list and select it. Finally click the Disconnect button. A confirmation/warning will be displayed. Note that it says it can take up to an hour for the process to be completed. After doing ...


1

What I would try to do is get rid of the draw depth calculation by drawing your tiles in the correct order to start with. What this means is, you'll be drawing your back layer first, then the middle layer, then the top layer. If your tile sprites overlap (e.g. isometric view) you may also need to draw the back row first, then the next and so on and ...


0

Would the proper solution be to load up a ByteBuffer with data from my png image, then when I'm back on the render thread call glTexImage2D? What I don't understand is whether or not OpenGL will actually copy the buffer into it's own location, or directly access mine. The latter approach would be ideal. This is basically what you want to do. ...


0

a Bitmap itself cannot be clickable on Android. You have to draw each Bitmap to an ImageView or an ImageButton, and listen to that view's touch events.


0

If i correctly understood you, then I believe, you can add a click listener to a bitmap just like to a jpg image or other format. In my example the image_star is a png file. ImageView img = (ImageView) findViewById(R.id.imageView1); img.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ...



Top 50 recent answers are included