SluX
|
 |
«
Posted
2006-08-04 16: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  ). 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 
|
"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Play strategic football
|
|
|
noblemaster
|
 |
«
Reply #1 - Posted
2006-08-04 21:34:18 » |
|
You can get images/stuff through the URLConnection class very easy - that's what I use.
|
|
|
|
SluX
|
 |
«
Reply #2 - Posted
2006-08-04 23: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 Play strategic football
|
|
|
Games published by our own members! Check 'em out!
|
|
|
|
SluX
|
 |
«
Reply #4 - Posted
2006-08-05 03:33:16 » |
|
Sure...but our game server is on the other machine...I ll look into the code then. One more question  -what if there was no web server at all ? 
|
"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Play strategic football
|
|
|
noblemaster
|
 |
«
Reply #5 - Posted
2006-08-05 05:24:22 » |
|
Sure...but our game server is on the other machine...I ll look into the code then. One more question  -what if there was no web server at all ?  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.
|
|
|
|
SluX
|
 |
«
Reply #6 - Posted
2006-08-05 14:00:45 » |
|
OK, thats all clear...but since client is webstarted, how to store image? Muffins? Anything else more convenient? 
|
"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Play strategic football
|
|
|
noblemaster
|
 |
«
Reply #7 - Posted
2006-08-06 01: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.
|
|
|
|
SluX
|
 |
«
Reply #8 - Posted
2006-08-07 17: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  -i dont want that 
|
"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Play strategic football
|
|
|
noblemaster
|
 |
«
Reply #9 - Posted
2006-08-08 10:46:27 » |
|
Java tends to cache .jar files, so you will only download new/updated jar files. 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
SluX
|
 |
«
Reply #10 - Posted
2006-08-09 14:41:13 » |
|
Java tends to cache .jar files, so you will only download new/updated jar files.  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 Play strategic football
|
|
|
blahblahblahh
|
 |
«
Reply #11 - Posted
2006-08-09 15: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...
|
|
|
blahblahblahh
|
 |
«
Reply #12 - Posted
2006-08-09 15:07:38 » |
|
Java tends to cache .jar files, so you will only download new/updated jar files.  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  . 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...
|
|
|
SluX
|
 |
«
Reply #13 - Posted
2006-08-10 12:24:17 » |
|
Java tends to cache .jar files, so you will only download new/updated jar files.  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  . 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)  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 Play strategic football
|
|
|
Kova
|
 |
«
Reply #14 - Posted
2006-08-10 13:16:57 » |
|
of course they aren't convinient... use web server and load images from them, why are you rejecting this solution?
|
|
|
|
|
noblemaster
|
 |
«
Reply #15 - Posted
2006-08-10 21:24:08 » |
|
Yes, the images should be on the server and you use URLConnection to access them ...
|
|
|
|
SluX
|
 |
«
Reply #16 - Posted
2006-08-11 23: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 Play strategic football
|
|
|
Kova
|
 |
«
Reply #17 - Posted
2006-08-12 15: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
|
|
|
|
|
SluX
|
 |
«
Reply #18 - Posted
2006-08-13 13: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  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 Play strategic football
|
|
|
Amos Wenger
|
 |
«
Reply #19 - Posted
2006-08-13 15: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  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"
|
|
|
|
|
|
|
|