Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  Getting resourcess from server-webstart issue  (Read 4963 times)
0 Members and 1 Guest are viewing this topic.
Offline SluX

Junior Member





« Posted 2006-08-04 14:42:43 »

I need to develop a banner rotation system for our game. It is webstart enabled game..so i guess thats all there is to it.
Game has a server to which clients connect to get game data.... I need to somehow make a system which can download images/strings to clients machine, store it there and later display(i know the latter Wink).

So if any1 of u has done something simmilar ever, or has idea what to use to implement this in efficient way..all clues and hints are welcome.
Tnx.

P.S If u want to check it out it is in my sig Wink

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #1 - Posted 2006-08-04 19:34:18 »

You can get images/stuff through the URLConnection class very easy - that's what I use.

Offline SluX

Junior Member





« Reply #2 - Posted 2006-08-04 21:04:00 »

You can get images/stuff through the URLConnection class very easy - that's what I use.

Looks promising, but does it require web server on the server side? We only have our game server up and running there...

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #3 - Posted 2006-08-04 21:24:24 »

Yes - but you have a web site anyway (http://www.b92.net/sport/mundijal2006/arena.php). You upload images to the web site (with e.g. FTP) and then access it simply through http://www.b92.net/sport/mundijal2006/images/Image1.jpg with URLConnection.

Offline SluX

Junior Member





« Reply #4 - Posted 2006-08-05 01:33:16 »

Sure...but our game server is on the other machine...I ll look into the code then.

One more question Smiley-what if there was no web server at all ? Smiley

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #5 - Posted 2006-08-05 03:24:22 »

Sure...but our game server is on the other machine...I ll look into the code then.

One more question Smiley-what if there was no web server at all ? Smiley

doesn't need to be on the same machine.

If there is no web server - I assume you have a game server setup - then just send the image through the game server to the client.

Offline SluX

Junior Member





« Reply #6 - Posted 2006-08-05 12:00:45 »

OK, thats all clear...but since client is webstarted, how to store image? Muffins? Anything else more convenient? Smiley

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #7 - Posted 2006-08-05 23:08:31 »

I tend to store the images in a .jar file. So, when you start your game through web start, the images/resources.jar is downloaded automatically too. Just add it to the list of required .jar files. Accessing the images/resources in the .jar is easy.


Offline SluX

Junior Member





« Reply #8 - Posted 2006-08-07 15:42:14 »

Sure storing in jar is the most easier...but then i have to change the jnlp right? And when it gets changed, then all previously downloaded files will have to be downloaded again..i guess Smiley-i dont want that Smiley

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #9 - Posted 2006-08-08 08:46:27 »

Java tends to cache .jar files, so you will only download new/updated jar files. Grin

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SluX

Junior Member





« Reply #10 - Posted 2006-08-09 12:41:13 »

Java tends to cache .jar files, so you will only download new/updated jar files. Grin

That is correct, but i think that when jnlp is changed, all will get installed again as another app i think....correct me if i m wrong.

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #11 - Posted 2006-08-09 13:07:01 »

ARgh argh argh. Stupid forums. Sorry, apparently I clicked modify instead of Quote. Sorry, sorry, sorry!

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #12 - Posted 2006-08-09 13:07:38 »

Java tends to cache .jar files, so you will only download new/updated jar files. Grin

That is correct, but i think that when jnlp is changed, all will get installed again as another app i think....correct me if i m wrong.

OK: you are wrong Smiley. As stated previously (and in fact one of the main points of webstart) it only downloads the files that have changed.

EDIT: ever wonderd why webstarts include the href to the jnlp? its so that you can completely change the jnlp name / location but webstart will *know its the same app* (have tried this many times, it works)

malloc will be first against the wall when the revolution comes...
Offline SluX

Junior Member





« Reply #13 - Posted 2006-08-10 10:24:17 »

Java tends to cache .jar files, so you will only download new/updated jar files. Grin

That is correct, but i think that when jnlp is changed, all will get installed again as another app i think....correct me if i m wrong.

OK: you are wrong Smiley. As stated previously (and in fact one of the main points of webstart) it only downloads the files that have changed.

EDIT: ever wonderd why webstarts include the href to the jnlp? its so that you can completely change the jnlp name / location but webstart will *know its the same app* (have tried this many times, it works)

Smiley  Tnx for the info. I guess that i will stick to the jars then....though i still think that they arent that convinient for banner system....there might be big number of jars...could create a mess maybe...

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline Kova

Senior Member





« Reply #14 - Posted 2006-08-10 11:16:57 »

of course they aren't convinient... use web server and load images from them, why are you rejecting this solution?
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #15 - Posted 2006-08-10 19:24:08 »

Yes, the images should be on the server and you use URLConnection to access them ...


Offline SluX

Junior Member





« Reply #16 - Posted 2006-08-11 21:27:19 »

of course they aren't convinient... use web server and load images from them, why are you rejecting this solution?

Hehe..on contrary..i want this solution. I just want to know what is the best way to store thos images on the client-dont want to dwnld al over again. Are muffins good choice?Any other?Dont remember client is webstart app.

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline Kova

Senior Member





« Reply #17 - Posted 2006-08-12 13:44:41 »

ok then, just save the image after you download it ... I'm sure you already thought of that... good luck with your sponsors
Offline SluX

Junior Member





« Reply #18 - Posted 2006-08-13 11:49:06 »

ok then, just save the image after you download it ... I'm sure you already thought of that... good luck with your sponsors

Sure i will save it Tongue

But whats the most convenient way? Muffins?

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #19 - Posted 2006-08-13 13:04:59 »

ok then, just save the image after you download it ... I'm sure you already thought of that... good luck with your sponsors

Sure i will save it Tongue

But whats the most convenient way? Muffins?
I'm not sure of what do you mean by Muffins ? I only know Jars..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #20 - Posted 2006-08-13 13:11:03 »

Muffins are like cookies, but larger. Grin

They're for non-signed (ie sandboxed) webstart apps to provide them with a small amount of local storage since they can't access the local file system. I think Kev had some muffin code knocking around the shared code forum a while ago.

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/examples.html#PersistenceService

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline kevglass

JGO Kernel


Medals: 164
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #21 - Posted 2006-08-13 23:41:19 »

Muffin Code:

http://www.java-gaming.org/forums/index.php?topic=5488.0

I can't take (all/any) of the credit since mostly came from Onyx.

Kev

PS. Yes, infact I do know the muffin man. He lives on Drury Lane.

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.

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

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

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
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!