Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  Print  
  4KJO (four Kilobyte game JAR optimiser)  (Read 10402 times)
0 Members and 2 Guests are viewing this topic.
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #30 on: 2006-12-27 07:26:51 »

if it were not for the need to sign the jar the byte saving  would be much greater... Sad
Offline appel

JGO Wizard
****

Posts: 1477
Medals: 23


I always win!


« Reply #31 on: 2006-12-27 08:42:30 »

Pretty impressive work Smiley I might revisit the code and add some nice features that I had to cut out Smiley thanks!

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #32 on: 2006-12-27 09:07:50 »

Ehem... p200 isn't allowed.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Go get 'em!
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #33 on: 2006-12-27 16:49:59 »

it is not allowed on the server side, i.e. the server is not allowed to send the jar via pack200 as it is deemed unfair as many web hosts do not have a pack200 transport system inplace.

By embedding the pack200 in the jar itself, the web server does not need to have the pack200 transport system as it it the client that extracts itself, i.e. it is still vaid as part per the rules as i under stand them.
Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #34 on: 2006-12-27 17:39:22 »

http://javaunlimited.net/contests/java4k.php

Quote
Contest Rules
Basic rules are as follows:
[....]
* No Pack200
[...]

弾幕 ☆ @mahonnaiseblog
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #35 on: 2006-12-27 23:26:38 »

That is true, for the server side...

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

see the second paragraph. Pack200 is disallowed on the webhost.
Offline oNyx

JGO Kernel
*****

Posts: 2943
Medals: 5


pixels! :x


« Reply #36 on: 2006-12-28 04:37:56 »

>see the second paragraph

That one simple outlines the reasoning. And it doesn't matter what has been said in some thread or on irc, if there is a page with rules. "No Pack200" means no pack200. No matter how you look at it. Even some lawyer with mad law bending skills couldn't work around that.

(Btw you aren't the first one who had that idea Wink)

弾幕 ☆ @mahonnaiseblog
Online Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5866
Medals: 255


Hand over your head.


« Reply #37 on: 2006-12-28 05:33:34 »

The reason Pack200 is disallowed is, it "relies on server-side configurations".

I think woogley meant to disallow the Pack200 way of distributing your file, not using the technology, if it doesn't "rely on server-side configurations"


It's like saying "It is against the law to carry guns, because it lowers the threshold to commit murder" (sorry, Americans)

That doesn't mean "It is against the law to carry guns" for the military.


(aaaah, don't you love those scewed examples?)

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #38 on: 2006-12-28 07:01:39 »

I guess we both had different interpretations of that rule.

Can woogley or someone or someone involved in the organisation please advise?

If it is decided that embedding a pack200 compressed jar in an self executing jar is against the spirit of the rule then I am more than willing to concede.

Offline appel

JGO Wizard
****

Posts: 1477
Medals: 23


I always win!


« Reply #39 on: 2006-12-28 08:22:23 »

Well, it says "no pack200", so I guess that means no pack200  Grin

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Games published by our own members! Go get 'em!
Online Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5866
Medals: 255


Hand over your head.


« Reply #40 on: 2006-12-28 08:28:01 »

there is something called a 'context', which I tried to show in my example..

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #41 on: 2007-01-09 07:05:44 »

UPDATE!

I have made a new version which fixes some bugs (but introduces others due to feature creep Tongue ).

Major addition is the ability to automatically make embedded pack200 self executing JAR files. This will on average give you between 50-100 extra bytes ON TOP OF any bytes gained using the 4KJO tool.

To use run the EmbeddedPack200.jar with no command line parameters to get help.  *IMPORTANT NOTE* since it is a very brittle tool you may have to launch the jar from the same directory where you have extracted all the files to.

Also, it is best to steer clear of the JShrink option in the 4KJO tool as it has not been correctly implemented.

The new version can be found at:

http://www.sharebigfile.com/file/55424/4KJO-7z.html

You may need 7-zip or the latest version on winrar to extract the archive.

Let me know if you have any trouble using the new tool.



Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #42 on: 2007-01-09 18:12:32 »

Some other notes:

You will need to remove the main method from your main class when using the EmbeddedPack200 tool.

Not all projects will benefit from this tool. e.g my previous j4k entry (java rally racer 4k) gained 100 bytes, while the Starship Invaders entry saved 59 bytes. Your project may likewise not recieve any benefit from the tool.
Online Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5866
Medals: 255


Hand over your head.


« Reply #43 on: 2007-01-09 20:44:52 »

The previous version took my JAR, and reduced it to 3937 bytes (and threw a bunch or errors)

The current version only manages 4068 bytes... Sad

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline moogie

JGO Strike Force
***

Posts: 775
Medals: 5


Java games rock!


« Reply #44 on: 2007-01-09 21:40:45 »

hmm...

what was the original size of the input JAR?
Do both version produce a working JAR?

would you be able to post your input JAR so I can fead it through the system to see what is going on?
Pages: 1 [2]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.121 seconds with 21 queries.