Is it possible saving assets after the game is done (.jar)?

My question is simple and direct, there’s a way to save a asset in asset folder when playing the .jar game :)? I didn’t try it yet, then I’m asking before do that!

i don’t think your supposed to modify any .jar files at runtime

1 Like

Set up a dedicated folder in the users home dir made for your game and save your assets there.

Thats the usual way to do such things, i guess.

1 Like

You cannot save to the assets folder as its being converted to a jar file but you can save any spatial using the SaveGame class.

1 Like

Hmm. Ok. It’s because I did a sound editor like in any rhythm game, where the user will edit the music actions. Ex.: Guitar Hero or Frets on Fire - the user can put the notes in anywhere he want, and then the notes are saved. But my music settings are stored in xml file, and I’m doing a sound editor so I can create the actions in runtime, and so the user can edit them too. Then since the assets are already created in assets folder, they might be modified later. Then, should I export the xml files to a external folder when the game is run for the first time, and so they can be modified as well?

AAAAAAAAAAAAAAhhhhhhhhhhhhhhhh!!! :slight_smile: :slight_smile: :slight_smile: :)! Normen, you are the man :D. I thought the class was just for saving 3d models, but I looked at the source code right now, and it uses the node object to save setting :). Thanks, that class is very useful.

I’ve noticed that is impossible to save arrays on it, but you can save savables, then I was thinking in using a node as an array object, and the values will be its children. Is it fine?

Right now I’m doing so :


Yeah, you can save any savable really, so you don’t even need any node or spatial.

1 Like

The audio nodes from scene explorer are streamed? I didn’t see any stream property in scene explorer. Time Offset just work for streamed audios.

EDIT: Also, I think I found a bug in scene explorer. I set the audio data, and set other properties so the save button can be enabled, and then I save the scene. If I close the scene and open again, the audio data was not saved :/.

idk, the AudioNode behaved strangely in the SDK after there were some changes, in MonkeyZone it seems the audio in the j3o files still plays though.

Ok. I think I have a workaround for it, by creating the audio datas by hand and set it to the audio nodes.

Hey, I’m saving my nodes so

[java]SaveGame.saveGame(“rhythmgame/musics”, “Musics”, track.getAudioNode().getParent().getParent().getParent());[/java]

But I couldn’t find them. Where is it xD?

EDIT: Is saves ok, I can load it ok, but I would like to find the saved datas :).

Depends on the platform, mostly home/.jme3/yourpath/yourfile

Thanks for the help. This was the final touch in game :).