h3ckboy
|
 |
«
Posted
2009-11-29 16:11:10 » |
|
is it possible to save data files to a computer without signing the jar?
is there like a special folder that can be accessed in the sandbox?
cause I would not like to have the player have to have big download every new version.
it owuld also be nice if there could be custom maps for my game. but that wont work out unless there is a way to save them to harddrive.
|
|
|
|
|
Riven
|
 |
«
Reply #1 - Posted
2009-11-29 16:42:48 » |
|
There is very limited data storage when using WebStart Muffins (like Cookies in a browser)
If you want more, just sign the darn thing.
|
|
|
|
h3ckboy
|
 |
«
Reply #2 - Posted
2009-11-29 17:04:43 » |
|
There is very limited data storage when using WebStart Muffins (like Cookies in a browser)
If you want more, just sign the darn thing.
Webstart Muffins? Il google it. I know I could sign it, but how many times has someone said "why did you have to sign it, I dont like to play signed games because...." EDIT: also, are webstart muffins pausible in applets?
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
h3ckboy
|
 |
«
Reply #3 - Posted
2009-11-29 20:19:12 » |
|
well, I just found out that javax.jnlp does not exist 
|
|
|
|
|
DzzD
|
 |
«
Reply #4 - Posted
2009-11-29 22:01:17 » |
|
what kind of data do you want to store ? user specific data or just cache some stuff ?
|
|
|
|
kappa
|
 |
«
Reply #5 - Posted
2009-11-29 22:07:39 » |
|
well, I just found out that javax.jnlp does not exist  in order to use that package you have to add jnlp.jar to your java class path or ide, which is found in your jre lib folder. (added automatically when using java webstart or jnlp applets).
|
|
|
|
|
zoto
|
 |
«
Reply #6 - Posted
2009-11-29 22:54:34 » |
|
I got around this by having the program send data to a php script that would save to a file on the server. This method has the added advantage that users can play the saved game from any computer. This method has the downside that it increases data transfers and space used on the server.
|
|
|
|
|
DzzD
|
 |
«
Reply #7 - Posted
2009-11-29 23:07:40 » |
|
what kind of data do you want to store ? user specific data or just cache some stuff ?
I got around this by having the program send data to a php script that would save to a file on the server. This method has the added advantage that users can play the saved game from any computer. This method has the downside that it increases data transfers and space used on the server.
that was nearly the reason of my previous question for user specific data save to server is not that bad : client side you only have to put a cookie with a unique ID and serverside save data linked to this ID.
|
|
|
|
davidc
|
 |
«
Reply #8 - Posted
2009-11-30 03:13:29 » |
|
|
|
|
|
|
Riven
|
 |
«
Reply #9 - Posted
2009-11-30 08:03:44 » |
|
If it used JFileChooser, it's unusable. You can't even properly navigate through directories with it. A double-click will make you rename the directory, a single click will select it, and hitting ENTER will not open it, but return it as the result. see this thread, or use googleAfter all these years, Sun has never been able to reproduce this bug -- and amazingly, sometimes it all works, but heck... it's unusable to let end users play with it - it's quite often that I can't traverse any directory. So let's hope it uses java.awt.FileDialog but that's rather unlikely...
|
|
|
|
Games published by our own members! Check 'em out!
|
|
davidc
|
 |
«
Reply #10 - Posted
2009-11-30 08:35:07 » |
|
It does indeed appear to use the standard JFileChooser dialog. I haven't had much trouble with it myself, except for being painful trying to navigate to folders on a different drive to the current one.
|
|
|
|
|
h3ckboy
|
 |
«
Reply #11 - Posted
2009-11-30 16:04:38 » |
|
it owuld also be nice if there could be custom maps for my game. but that wont work out unless there is a way to save them to harddrive.
I got around this by having the program send data to a php script that would save to a file on the server. This method has the added advantage that users can play the saved game from any computer. This method has the downside that it increases data transfers and space used on the server.
would kinda defeat the purpose....
|
|
|
|
|
zoto
|
 |
«
Reply #12 - Posted
2009-11-30 22:44:48 » |
|
You could load the map files from the server.
|
|
|
|
|
zammbi
|
 |
«
Reply #13 - Posted
2009-12-01 05:25:37 » |
|
What does JavaFX use? It doesn't need to be sign to use its hidden storage.
|
|
|
|
h3ckboy
|
 |
«
Reply #14 - Posted
2009-12-01 07:44:55 » |
|
would kinda defeat the purpose....
You could load the map files from the server.
once again, that would defeat the purpose.
|
|
|
|
|
CaptainJester
|
 |
«
Reply #15 - Posted
2009-12-01 15:40:51 » |
|
Have you looked at the Preferences API (java.util.prefs.Preferences). I don't know if a sandboxed applet can use it, but it is worth a shot.
|
|
|
|
h3ckboy
|
 |
«
Reply #16 - Posted
2009-12-01 16:33:24 » |
|
I am not suer, but I dont think taht can handle real data, but it rather for saving passwords and such.
|
|
|
|
|
CaptainJester
|
 |
«
Reply #17 - Posted
2009-12-01 17:00:32 » |
|
It can store any primitive, String or array of bytes. So if you can convert your data to an array of bytes then you can store real data up to 8K per key for a String and 6144 bytes for a byte array.
|
|
|
|
h3ckboy
|
 |
«
Reply #18 - Posted
2009-12-01 18:28:23 » |
|
by comparison about how many characters is 6144 bytes? thx this might actually work 
|
|
|
|
|
Riven
|
 |
«
Reply #19 - Posted
2009-12-01 18:52:41 » |
|
java.util.prefs.Preferences is not available for unsigned apps.
|
|
|
|
h3ckboy
|
 |
«
Reply #20 - Posted
2009-12-01 20:09:37 » |
|
well, in that case, I am back to muffins....
anyone know how much data it can store?
thx, h3ckboy
|
|
|
|
|
Riven
|
 |
«
Reply #21 - Posted
2009-12-01 21:45:44 » |
|
Instead of waiting hours and hours, you can simply... try.
|
|
|
|
zammbi
|
 |
«
Reply #22 - Posted
2009-12-02 02:17:27 » |
|
|
|
|
|
h3ckboy
|
 |
«
Reply #23 - Posted
2009-12-02 16:18:33 » |
|
Instead of waiting hours and hours, you can simply... try.
well you only replied an hour and a half after me so....
|
|
|
|
|
Markus_Persson
|
 |
«
Reply #24 - Posted
2009-12-03 12:27:27 » |
|
well you only replied an hour and a half after me so....
.. without the data you requested. 
|
|
|
|
h3ckboy
|
 |
«
Reply #25 - Posted
2009-12-04 12:49:53 » |
|
.. without the data you requested.  fair enough  . well if you guys want to know why I am not googling this/ testing to find my own way. for starters: I did try and use muffins  . The thing is that it just wont handle the amount of data that I am looking for. For seconds: I am doing pre-emptive research, I am not at the point in my game where I am pressing for this to be done. So I ask here, and save myself the time googling. And in that saved time, work on the other stuff I need to be doing to get to that point where it is pressing.
|
|
|
|
|
|