Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  4KJO (four Kilobyte game JAR optimiser)  (Read 14912 times)
0 Members and 1 Guest are viewing this topic.
Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #30 - Posted 2006-12-27 12: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


Medals: 51
Projects: 4


I always win!


« Reply #31 - Posted 2006-12-27 13: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 Coder


Medals: 2


pixels! :x


« Reply #32 - Posted 2006-12-27 14:07:50 »

Ehem... p200 isn't allowed.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #33 - Posted 2006-12-27 21: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 Coder


Medals: 2


pixels! :x


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

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

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

弾幕 ☆ @mahonnaiseblog
Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #35 - Posted 2006-12-28 04: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 Coder


Medals: 2


pixels! :x


« Reply #36 - Posted 2006-12-28 09: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
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #37 - Posted 2006-12-28 10: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 Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #38 - Posted 2006-12-28 12: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


Medals: 51
Projects: 4


I always win!


« Reply #39 - Posted 2006-12-28 13: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! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #40 - Posted 2006-12-28 13: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 Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #41 - Posted 2007-01-09 12: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 Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #42 - Posted 2007-01-09 23: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.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #43 - Posted 2007-01-10 01: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 Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #44 - Posted 2007-01-10 02: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]
  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.

Pippogeek (36 views)
2014-09-24 16:13:29

Pippogeek (29 views)
2014-09-24 16:12:22

Pippogeek (18 views)
2014-09-24 16:12:06

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

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

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

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

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

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

BurntPizza (52 views)
2014-09-19 03:14:18
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!