Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (564)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  save files without signing  (Read 3164 times)
0 Members and 1 Guest are viewing this topic.
Offline h3ckboy

JGO Coder


Medals: 5



« Posted 2009-11-29 15: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.
Online Riven
« League of Dukes »

JGO Overlord


Medals: 800
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2009-11-29 15: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.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #2 - Posted 2009-11-29 16: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!
Legends of Yore - The Casual Retro Roguelike
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #3 - Posted 2009-11-29 19:19:12 »

well, I just found out that javax.jnlp does not exist Huh
Offline DzzD
« Reply #4 - Posted 2009-11-29 21:01:17 »

what kind of data do you want to store ? user specific data or just cache some stuff ?

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #5 - Posted 2009-11-29 21:07:39 »

well, I just found out that javax.jnlp does not exist Huh

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).
Offline zoto

Senior Member


Medals: 4



« Reply #6 - Posted 2009-11-29 21: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.
Offline DzzD
« Reply #7 - Posted 2009-11-29 22: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.

Offline davidc

Senior Member


Medals: 5
Projects: 2



« Reply #8 - Posted 2009-11-30 02:13:29 »

Have you tried looking at FileOpenService and FileSaveService?

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/examples.html#FileOpenService
Online Riven
« League of Dukes »

JGO Overlord


Medals: 800
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2009-11-30 07: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 google

After 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...

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davidc

Senior Member


Medals: 5
Projects: 2



« Reply #10 - Posted 2009-11-30 07: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.
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #11 - Posted 2009-11-30 15: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....
Offline zoto

Senior Member


Medals: 4



« Reply #12 - Posted 2009-11-30 21:44:48 »

You could load the map files from the server.
Offline zammbi

JGO Coder


Medals: 4



« Reply #13 - Posted 2009-12-01 04:25:37 »

What does JavaFX use? It doesn't need to be sign to use its hidden storage.

Current project - Rename and Sort
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #14 - Posted 2009-12-01 06:44:55 »

would kinda defeat the purpose....
You could load the map files from the server.
once again, that would defeat the purpose.
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #15 - Posted 2009-12-01 14: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.

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #16 - Posted 2009-12-01 15:33:24 »

I am not suer, but I dont think taht can handle real data, but it rather for saving passwords and such.
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #17 - Posted 2009-12-01 16: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.

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #18 - Posted 2009-12-01 17:28:23 »

by comparison about how many characters is 6144 bytes?

thx this might actually work Smiley
Online Riven
« League of Dukes »

JGO Overlord


Medals: 800
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #19 - Posted 2009-12-01 17:52:41 »

java.util.prefs.Preferences is not available for unsigned apps.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #20 - Posted 2009-12-01 19:09:37 »

well, in that case, I am back to muffins....

anyone know how much data it can store?

thx,
h3ckboy
Online Riven
« League of Dukes »

JGO Overlord


Medals: 800
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #21 - Posted 2009-12-01 20:45:44 »

Instead of waiting hours and hours, you can simply... try.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline zammbi

JGO Coder


Medals: 4



« Reply #22 - Posted 2009-12-02 01:17:27 »

Not sure but this may help: http://weblogs.java.net/blog/2009/04/21/how-store-preferences

Current project - Rename and Sort
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #23 - Posted 2009-12-02 15:18:33 »

Instead of waiting hours and hours, you can simply... try.
well you only replied an hour and a half after me so....
Offline Markus_Persson

JGO Wizard


Medals: 15
Projects: 19


Mojang Specifications


« Reply #24 - Posted 2009-12-03 11:27:27 »

well you only replied an hour and a half after me so....

.. without the data you requested. Wink

Play Minecraft!
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #25 - Posted 2009-12-04 11:49:53 »

.. without the data you requested. Wink
fair enough Tongue.

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 Smiley. 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.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Grunnt (20 views)
2014-09-23 14:38:19

radar3301 (14 views)
2014-09-21 23:33:17

BurntPizza (31 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (29 views)
2014-09-20 20:14:06

BurntPizza (33 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (75 views)
2014-09-10 13:57:51

TehJavaDev (107 views)
2014-09-10 06:39:09
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!