Jump to content

tomiit123

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by tomiit123

  1. Hi. Same issue here. System: Ubuntu 14.04, 64bit 64bit version of Spriter: Spriter R3 64bit (Pro Version) from download page and it does not start. I have installed library libmagickcore5 and libmagickcore5-extra and all needed libraries from download page info. 32bit version: I have installed all needed libraries from download page info: Older versions of Spriter worked fine. Keep up the good work! :wink: Thomas.
  2. But how to exactly use JSON Parser with SpriterLoader? It doesnt work together...
  3. Hi Trixt0r. I have little question. Why those .scml files takes so much of Android RAM? Project I sent you few days ago about that coin spriter animation is taking circa 22 MB of RAM and its just simple .scml file. Default project of libGDX with simple picture takes only circa 5 MB. So that simple .scml file takes about 17 MB of android RAM. Its too much for simple coin animation. Pictures of coin has about 300 Kb together. Is it normal with those .scml files or I have to do some optimalization? Thanks.
  4. OMG :D Trixt0r and JustinC you are amazing :D ! I'd never realized that the library is outdate and it can be a problem because I downloaded it recently. Thank you again very much for your help and Trixt0r and Discobeard for amazing Spriter library :). Cheers guyz :) -tomiit123
  5. Hi. I cant send file via post because is bigger than is allowed. So I attach it here http://leteckaposta.cz/219430933 -tomiit123
  6. Hi Trixt0r. Ok here it is https://mega.co.nz/#!3V41RDLZ!hCSGmMDWNeMjjtXguSGN1UPhXR1TYv9YgaEKgGn4Rb8. Its libGDX gradle project. In core project is your exact libGDX source code from your spriter test project. When you load project than its show you some error in "Test Spriter-core" so you need to add to "Test Spriter-core" jar file in java build path from the same folder "Test Spriter-core/libs/spriterLoader/spriterLoader.jar" its your SpriterLoader package project. Really thank you for your help :| .
  7. I think that only libGDX knows where assets folder is that is in Android project and is just linked to Desktop project. And because Gdx.files.internal("assets/coin/coins.scml") copy of the path of file to SpriterLoader so the path when I println to console is "assets/coin/coins.scml" so SpriterLoader trying to find that folder and file in Desktop project where is source code of SpriterLoaderTest. But this folder doesnt exist right in Desktop project because is linked from Android project. So it seems SpriterLoader cant load those files from Desktop projects because they dont exist in that project and they are right in Android project and these are liked to Desktop project. So for that reason assets folder doesnt work and works only folder what I create in Desktop project. But android need assets folder for files and for android project doesnt work it neither. SpriterLoader doesnt understand pathway to assets folder because it doesnt exist in Desktop project. Maybe Im wrong but I dont know what anything else it can be :| .
  8. I don't think you need the assets folder in your path. Example: FileHandle handle = Gdx.files.internal("assets/coin/coins.scml"); Change to: FileHandle handle = Gdx.files.internal("coin/coins.scml"); I never point to "assets" because Gdx.files.internal already knows to look in the assets folder. With the code you have, it's like you are making it point to assets/assets/coin/coins.scml Give that a try. Works for me. Also, on android it's possible you may need to edit the manifest file. Hi JustinC. Thank you for your responce :). I try everything but it doesnt work neither. I try coin/coins.scml, assets/coin/coins.scml it only works if I make new folder in Desktop (not existing assets folder) project for example "abcdef/coin/coins.scml" and I point to it like that Gdx.files.internal("abcdef/coin/coins.scml"). If I do this it works fine. But only in desktop project. Android needs assets folder or some folder in android project with scml files. But doesnt work anything. My friend was trying catch errors from android and it seems than everything works fine with .scml file but it seems it doesnt load only first picture of animation set and for that it get a error. I really dont know how to make work for android. So and you are making libGDX project with libGDX application setup tool or just yourself? Im making project with libGDX tool and I dont changing anything in project. And here is error from try with coin/coins.scml. It seems it need to be assets/coin/coins.scml: Desktop project: Exception in thread "LWJGL Application" java.lang.NullPointerException at com.mygdx.game.spriter.LibGdxDrawer.draw(LibGdxDrawer.java:44) at com.brashmonkey.spriter.Drawer.draw(Drawer.java:201) at com.brashmonkey.spriter.Drawer.draw(Drawer.java:188) at com.brashmonkey.spriter.Drawer.draw(Drawer.java:179) at com.mygdx.game.MyGdxGame.render(MyGdxGame.java:60) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:206) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) Android project: 05-14 14:51:42.610: W/dalvikvm(26493): threadid=11: thread exiting with uncaught exception (group=0x4114f2a0) 05-14 14:51:42.620: E/AndroidRuntime(26493): FATAL EXCEPTION: GLThread 5750 05-14 14:51:42.620: E/AndroidRuntime(26493): java.lang.NullPointerException 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.mygdx.game.spriter.LibGdxDrawer.draw(LibGdxDrawer.java:44) 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.brashmonkey.spriter.Drawer.draw(Drawer.java:201) 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.brashmonkey.spriter.Drawer.draw(Drawer.java:188) 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.brashmonkey.spriter.Drawer.draw(Drawer.java:179) 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.mygdx.game.MyGdxGame.render(MyGdxGame.java:60) 05-14 14:51:42.620: E/AndroidRuntime(26493): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:414) 05-14 14:51:42.620: E/AndroidRuntime(26493): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522) 05-14 14:51:42.620: E/AndroidRuntime(26493): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) it seems it cant find path to that files and it needs to be assets/coin... So are you telling me than you also making projects with libGDX setup tool and SpriterLoader works fine for you? And last point Im trying this with new libGDX Gradle setup tool but I was trying this with old libGDX setup tool also but it doesnt work neither. This stop my work for two weeks and cant get cross. Any ideas? Thanks :roll:
  9. Hi Trixt0r :). I have a little problem that spriter animation is working for me only on PC and on Android not. Im making project with libGDX for Desktop and Android. Just these two. Now I put source code from your Spriter Test project to my core project and spriter (.scml) files put to assets folder. Assets folder is linked together so it have to work. But it doesnt work. When I run Desktop project it says me than it cant find those .scml files. It only works when I create some folder myself in Desktop project folder and there I put those .scml files. Now when I run desktop project it works perfectly. So problem is that it cant load .scml files from assets folder libGDX project. And I need this folder because Im making games for android not PC. So when I run Android project on my android device it says error about loading .scml files. Please have you try make libGDX project and run it with android device? Because I and my friend who also working with libGDX has the same problem. Source code of my test project is the same as yours from your testSpriterProject for libGDX. Im making project with libGDX Gradle based setup application. So it only works and only for PC when I create myself some folder in Desktop project. In assets it doesnt. Here is console log from eclipse when I put .scml files to assets and run Desktop project: Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: File not found: assets\coin\coins.scml (Internal) at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:134) at com.mygdx.game.MyGdxGame.create(MyGdxGame.java:34) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) Here is source code of core project file: package com.mygdx.game; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.brashmonkey.spriter.Drawer; import com.brashmonkey.spriter.Player; import com.brashmonkey.spriter.SCMLReader; import com.brashmonkey.spriter.Data; import com.mygdx.game.spriter.LibGdxDrawer; import com.mygdx.game.spriter.LibGdxLoader; public class MyGdxGame implements ApplicationListener { Player player; ShapeRenderer renderer; SpriteBatch batch; Drawer drawer; LibGdxLoader loader; OrthographicCamera cam; @Override public void create() { cam = new OrthographicCamera(); cam.zoom = 1f; renderer = new ShapeRenderer(); batch = new SpriteBatch(); FileHandle handle = Gdx.files.internal("assets/coin/coins.scml"); Data data = new SCMLReader(handle.read()).getData(); loader = new LibGdxLoader(data); loader.load(handle.file()); drawer = new LibGdxDrawer(loader, batch, renderer); player = new Player(data.getEntity(0)); } @Override public void resize(int width, int height) { cam.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); cam.position.set(0, 0, 0f); cam.update(); renderer.setProjectionMatrix(cam.combined); batch.setProjectionMatrix(cam.combined); } @Override public void render() { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); player.update(); batch.begin(); drawer.draw(player); batch.end(); } @Override public void pause() { } @Override public void resume() { } @Override public void dispose() { renderer.dispose(); loader.dispose(); } } Here is source code of Desktop project file: package com.mygdx.game.desktop; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.mygdx.game.MyGdxGame; public class DesktopLauncher { public static void main (String[] arg) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); config.title = "Spriter test"; config.width = 800; config.height = 640; new LwjglApplication(new MyGdxGame(), config); } } Here is log info from android project: 05-13 19:19:54.402: W/dalvikvm(17534): threadid=11: thread exiting with uncaught exception (group=0x4114f2a0) 05-13 19:19:54.422: E/AndroidRuntime(17534): FATAL EXCEPTION: GLThread 5456 05-13 19:19:54.422: E/AndroidRuntime(17534): com.badlogic.gdx.utils.GdxRuntimeException: Error reading file: assets/coin/coins.scml (Internal) 05-13 19:19:54.422: E/AndroidRuntime(17534): at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:75) 05-13 19:19:54.422: E/AndroidRuntime(17534): at com.mygdx.game.MyGdxGame.create(MyGdxGame.java:34) 05-13 19:19:54.422: E/AndroidRuntime(17534): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:236) 05-13 19:19:54.422: E/AndroidRuntime(17534): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511) 05-13 19:19:54.422: E/AndroidRuntime(17534): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) 05-13 19:19:54.422: E/AndroidRuntime(17534): Caused by: java.io.FileNotFoundException: assets/coin/coins.scml 05-13 19:19:54.422: E/AndroidRuntime(17534): at android.content.res.AssetManager.openAsset(Native Method) 05-13 19:19:54.422: E/AndroidRuntime(17534): at android.content.res.AssetManager.open(AssetManager.java:315) 05-13 19:19:54.422: E/AndroidRuntime(17534): at android.content.res.AssetManager.open(AssetManager.java:289) 05-13 19:19:54.422: E/AndroidRuntime(17534): at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:73) 05-13 19:19:54.422: E/AndroidRuntime(17534): ... 4 more Thank you very much for help :) . If you will need anything else tell me and I post it.
  10. Hi Trixt0r. First of all thanks for your amazing work with Spriter importer. :D I have little problem with spriter importer. I try run your test project with eclipse and it says me this . I dont know why and what Im doing wrong.
  11. Hi guyz. Trixt0r! you are make an excellent work! :D I have a little problem with your loader tool. When I try run your test project with Eclipse it says me . I dont know why. Im still learning LigGDX but I dont think than I did something wrong. I really like to run Spriters animations in libGDX.
×
×
  • Create New...