Jump to content

Roberto

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Roberto

  1. Thank you Smilne and Trixt0r. That was my mistake, I was loading the data to many times. I need to check the part of dispose the reference, for the monsters, I am going to have to many monsters types and I am not going to use them all at the same time. Just one or two by scene.
  2. Hi My Problem: I Draw a coin and in sprinter, make it go up and down. When I use the Trixt0r's runtime it uses 34 MB of Ram and when I unload the coin the memory use doesnt change, but if a load it again the memory use increase 34 MB more. When I to load the coin as Texture with the assetManager and make the animation on the code, the memory utilization doesnt change. What is the real problem. Well, I have two menus with two animated characters each menu. If I open the two menus and then go to the main scene, At this point I am using 186 MB of Ram, If I open 12 times the coins, that are drop items, my memory utilization goes to 300 to 594 MB of Ram vs if i use the Textures with assetManager the Ram Utilization continues on 186 to 190 MB of Ram. Whell I realy like Spriter and I am going to make more monsters and i dont what to animate all of then in the code. I am making something wrong? My code: private static Player player; private static Mydrawer drawer; FileHandle scmlHandle; SCMLReader reader; Data data; LibGdxLoader loader; public MyActor(String image, Gamestage stage, float X, float Y, int type){ if(type==2){ scmlHandle = Gdx.files.internal("data/spriter/"+image+"/"+image+".scml"); reader = new SCMLReader(scmlHandle.read()); data = reader.getData(); loader = new LibGdxLoader(data); loader.load(scmlHandle.file()); drawer = new Mydrawer(loader, stage.getBatch()); player = new Player(data.getEntity(0)); player.setPosition(X, Y); } } on render player.update(); drawer.draw(player);
×
×
  • Create New...