Hot answers tagged

3

You did not specify whether you will have many circles or just a few. However, by the measures you mentioned I assumed it's just a few (by the way, if the measures you are thinking of are correct, only 4 circles will fit perfectly into the rectangle...). So, if you have just a few circles, you can opt for a very naive solution: save each new valid circle in ...


3

The texture regions inside don't need to be powers of two. But texture compression cells are often 4x4 so you have to be careful when using compressed textures that the edges of two texture regions don't share the same cell or they'll be compressed together which will degrade the quality if they have different colors. You should leave a N pixel border ...


3

You seem to lack some insight on your issue. A couple of things to consider: Is your true maximum frame rate on your PC really 60 or is it more? NVida drivers limit the frame rate to the maximum draw rate of the monitor, typically 60 Hz; this is due to the fact that there is no need to ask to draw faster than what the monitor is able to process. By ...


2

Physics student here. Firstly, separate your velocity into two components. Character { float velocity_x; float velocity_y; } Now, when they jump, you add an initial velocity to their velocity_y and every frame, you do something like loc.x += velocity_x * delta_time (and the same for y). Every frame, you also do velocity_y -= gravity * delta_time ...


2

Scene2d would probably be good to use for a visual novel, it's not limited to UI, you could design a whole game with it if you wanted to. You could make a scene2d stage and then add back and forward buttons to it. You could have several buttons that you change label on and use for selecting what your characters says/does. If you find something scene2d can't ...


2

Cursory answer: "it might be". If you are doing "carpet testing" for collision detection, no offence, but you are doing it wrong (unless you have very few elements to test): pair checking of any kind is a O(n^2) operation, and will start to eat at your cpu time very fast as the number of objects you have in the game increases, so you might want to improve ...


2

You shouldn't call dispose directly on a Texture loaded by an AssetManager, they are disposed the the AssetManager is cleared or disposed or if you call unload on the AssetManager and pass the Texture. The reason you shouldn't dispose assets from an AssetManager is that they can be shared between many other assets (two fonts may use the same texture for ...


2

You generally need three things, basically, to accomplish this. First, you need a system in your game that can hot-reload assets or other data in response to some notification that the asset has changed. When a texture changes, you'll want to upload the new pixels to the GPU. When a monster description changes, you'll want to swap out the monster's old ...


1

Signing each game with a different key allows you to sell the rights to the game to another party. When all your games are signed with the same key, you need to give them your one private key, allowing them technically to impersonate you and release updates for your other games. Contractual obligations can be used to prevent that, but it's still not very ...


1

The best thing is to sign with the same key in most instances. You could in theory transfer data from one app to another. It also makes it easier to remember which key you are using. If someone wanted to buy the rights to one game, then yes, you might have an issue. But that same issue would be faced with your account. Bottom line, I'd recommend using the ...


1

Yes. You were able to see the sprites when Angry Birds Chrome was available to play and they looked like this:


1

Create the menu in one Activity, and let that Activity be a "normal" Android activity, then have that Activity launch the libGDX game Activity. That sort of approach would allow you to use Android layouts for the menu but libGDX for the actual game.


1

you can publish different versions of your APK targeting different CPU architectures, with the same package name: Build an ARMv7 only package and an x86 only package with different version codes. The versionCode of the x86 package has to be higher than the one of the ARM package. When publishing, send both of your APKs to the developer console. Note that ...


1

If you're not in need of a very fancy way to deal with this problem you could just brute-force it by doing these steps: Randomize the circle coordinates. Check if the distance vs all other circles that you have drawn. If it is greater than the sum of the radius of the two circles (40, in your case) you can go ahead and draw the circle. If it is equal to or ...


1

I would say there is no such standard, because there are no WiFi game controllers. All the wireless game controllers I checked use either Bluetooth or some proprietary wireless data transmission. This makes sense as WiFi typically uses more power than Bluetooth and is harder to set up. A wireless network might not even be available on location. That ...


1

Unity Remote 4 allows the Unity editor to send a video stream of the editor's Game tab to your Android device, and responds to touch input like it was the real thing, which is a convenient way to test your touch input. More details here. But if you want to test the APK properly (like if you're testing Google Play API integration or something), you'll have ...


1

Don't get caught up in the exact numbers used in the example. Those are not the main point. It's how they are relative to each other. You see that xhdpi 200x200 is twice as big as mdpi 100x100. Notice the if in the example. List of densities: xxhdpi: 3.0 xhdpi: 2.0 hdpi: 1.5 mdpi: 1.0 (baseline) ldpi: 0.75 Sample example but with different numbers: ...



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