Tag Info

New answers tagged

0

There is no magical piece of software to do your art for you. However there are tools to make it easier and I can recommend Spine. It was used at a studio I interned at. The artist there really liked it and it integrated well into Unity. http://esotericsoftware.com/ Here's a tutorial that said artist wrote: ...


0

As bitter said, Your file should be named "libmylibandroid.so" Drag and drop this file into your Unity Project Then, when you call the lib, just write : [DllImport("mylibandroid")] private static extern void FreeGlobals(); and not : [DllImport("mylibandroid.so")] private static extern void FreeGlobals(); Hope that will be useful for someone :)


2

A lot of great Libgdx extensions have been added to the maven repository such as freetype, tools and many other great libraries. This means you can add extensions in a blink of an eye, at least if you used the gradle LibGDX setup. In your case you want to add freetype, look it up in the link above and select the version you need. Now select the tab Gradle ...


0

Updated with a minor fix: Yes, the problem was: textCoo -= deltaTextCoord; Due to the fp precision the error accumulated grows to something like 2.7%. Calculating it each loop instead of subtracting a delta fixes a big part of the problem. As for optimization, I am using some techniques, got a reasonable 40fps. See this post, I asked the same ...


0

You need to add the correct JARs to your project. For example, you can see from this Gradle/Maven repository search that there are both gdx-freetype and gdx-freetype-platform JARs. To add them to Gradle, you just need to add the dependency name and version under the dependencies section.


2

You can use pendulum physic to approximate your rope swing. Calculate the fluctuation period (this is true for small fluctuations) T = 2*PI*SQRT(L/g) where: PI = 3.14 g = 9.8 (if I remember) the earth gravity acceleration L : the rope length, or better the length from rotation fulcrum to the character hands. Then you get the fluctuation angle as ...


2

Short answer: This doesn't do what you think it does. float pressure - A normalized value that describes the pressure applied to the device by a finger or other tool. The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device. ...


2

You should register the pointer you are walking with. Pointers are the number of touches on the screen and they are provided by the listeners you are using. I think if you change this it to something like below you can get it to work: @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { if (int pointer != 0) ...


2

Why would you make the game free on android and let PC users pay $10 + $1/month? The big trend for most indies is building a fanbase as soon you have something to show from your game. Blogging about everything that involves your game and perhaps let your fans influence your design. You can find a lot of sources at open indie developers like Grid Sage ...


0

UE4 now supports Android AND has a new licensing program. Now its free, source code and everything, to develop games for any platform they support. They now charge a 5% fee on all gross revenue after the first $3000 per game per quarter. They currently support Android, iOS, web, Windows, Linux, and Mac OS.


2

Basically, what a hashmap does is store the objects in a random location in your memory. Complexity is O(1) which means that it will always take the same amount of time to retrive an object from the hashmap. The amount of time depends on various factors. This might be quite fast for few objects, but as soon as you start drawing scene with hundreds of ...


0

It's not just the EGL Context that gets lost; Android can (and will) simply kill any application running in the background when it's running low on resources and needs to reclaim them. There's simply no guarantee that your app won't have been unloaded since you last left it. When your activity receives a call to the onStop() method, it's no longer ...


1

You're already halfway there since you send matrix data every frame. A little bit of history. attributes used to be called varying because their value varies depending on the vertex in the buffer. uniforms are called such because their data is uniform across every vertex of the buffer. Since your matrix is uniform the GPU can handle it being changed at ...


1

First of all yes, off course you are able to create mobile games with the Unity free engine. Otherwise it would be silly to have added a feature like that in the free version. In the past free versions there was limited access to the engine but still plenty of tools to work with and complete a game. Unity changed it's license since unity 5.0, they had too ...


0

I'll assume you are talking about a 2D game or at least a 2D UI. Well, if you think you need to create graphics for 1920x1080 then you should go for it. If you setup a viewport properly libgdx does all the scaling for you. Personally I have my viewport represent a 1280 x 720 area. You won't see any difference on phones, I barely even notice the difference on ...


0

This is definitely possible. You should look at the Android developer documentation for bluetooth (Ocelot has posted the link). At the minimum you will have to do this - Discover the devices Pairing and connecting devices One of the device needs to become server. It will open a socket and listen for connection. Other device(s) need to become client. ...


2

I could say that using ETC1 or any other compression will surely improve your memory usage but will NOT improve your CPU/GPU usage. See uncompressed file formats can be used without any additional processing whereas compressed ones must be decompressed (processing impact) first. If you would reuse (and not load up every time) those textures would act just as ...


8

TextureAtlas#findRegion(String) returns a region with a name that matches the name specified. It does not copy the region, therefore any changes you make to the region will be reflected in the TextureAtlas. To overcome this issue, simply instantiate a new TextureRegion object and pass it the region found inside your TextureAtlas: background1 = new ...


0

It's common to need to wait a while when you want to actually test your game on the device, since it doesn't only include sending the data over USB cable. They probably count the time it takes to instal the game in the "pushing" process. That's why you can use the Editor and Unity Remote (it's on the play store) for instant testing. Btw an empty Unity game ...


0

If you're using SDL 2 you should just be able to port to mobile quite easily. SDL 2 has support out of the box for mobile. It won't be a 2-click port but it will be very possible to do. Check out the download page: http://www.libsdl.org/download-2.0.php#source There are versions of SDL 2 for iOS and Android that you can build from source. SDL is very well ...


0

About textures loading, yes i suggest you to make them static in the AssetManager class and then declaring them in the "level" class with Texture letterA = AssetManager.letterA and so on. Same goes for the dictionary (i never had to process a .txt file so i don't know if you're going to declare it as a String or else..). I usually make static every asset ...


0

The following code will draw an arc in the center of your view: int y = c.getHeight(); RectF rectf = new RectF(getLeft(), y - 100, getRight(), y); c.drawArc(rectf, 0, -180, true, paint); Note: c is an instance of Canvas as used in the question.


0

Have you tried: public class MainActivity extends AndroidApplication { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); RelativeLayout layout = new RelativeLayout(this); layout.addView(initializeForView(new MainClass(), false)); setContentView(layout); } }


0

LibGDX might override this but try adding this to your style <item name="android:windowNoTitle">false</item> <item name="android:windowFullscreen">false</item>


0

In response to Kelly, I too have very similar code and have tried to apply the checking loop as described above: for (int i = enemies.size() - 1; i >= 0; i--) { Enemy enemy = enemies[i]; for (int j = bullets.size() - 1; j >= 0; j--) { Bullet bullet = bullets[j]; if(enemy.getBounds().overlaps(bullet.getBounds())) { ...


0

You should put the sounds as part of the collision event. When it collides with obj_star You could then say: sound_play(sound_collect); room_goto_next();


0

I guess you are looking for the constructor: GestureDetector(float halfTapSquareSize, float tapCountInterval, float longPressDuration, float maxFlingDelay, GestureDetector.GestureListener listener) The default constructor has this values: halfTapSquareSize=20, tapCountInterval=0.4f, longPressDuration=1.1f, maxFlingDelay=0.15f. I don't ...


1

If you are creating a 2D game with tiles you can easily implement your own culling which is a lot cheaper since you only itterate over exactly what you need within your tile array. Things you should know: Camera location Viewport width/height Tile width/height Now we can calculate how many tiles should be drawn. Total horizontal tiles on screen = ...



Top 50 recent answers are included