Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (843)
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  
  Regarding Reducing the jar size  (Read 2673 times)
0 Members and 1 Guest are viewing this topic.
Offline jeevan_gr

Junior Newbie

Java games rock!

« Posted 2003-12-19 07:53:37 »

Hi, Cheesy

          I am having problem in reducing the jar size, If you have any idea please let me know. it may be Image size reduction or Code size Redution. for that Image iknow Clipping, if u know  any new idea pls let me know
Offline mhnsp

Junior Newbie

Java games rock!

« Reply #1 - Posted 2003-12-19 11:12:38 »

1. If you know that a class variable will not change, make it "static final".

2. Use as few methods as possible.

3. Use as few classes as possible.

4. Use method instance variables over class instance variables.  Note: Jury is still out on this for me.  I've seen a reduction using this technique, but not sure if it was truly the idea or the obfuscator made the difference.

5. Use something like ProGuard to further obfuscate and reduce your code.

Other?  I am relatively new to J2ME development, too, so I am still learning the tricks of the trade as I go along.  Smiley
Offline mhnsp

Junior Newbie

Java games rock!

« Reply #2 - Posted 2003-12-19 11:20:18 »

Here's another article that talks about optimization a little more ...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #3 - Posted 2003-12-19 13:50:00 »


It might be a good idea to give us some more information.

Tell us how many classes and images you have. What kind the images are... how you organized em... wich format... how big the palette is.

Also tell us how big that files are and how small it should be etc.

Finally a rule of thumb hint... use an obfuscator or even two... for example the Jax + Jarg combo was quite nice for the 4k game contest. Also 7zip compresses damn well (use "ultra"). Oh and if you use png images crunch em as much as possible with pngout (by Ken Silverman - that's the guy who made the Build engine used by Duke Nukem 3D btw Wink).

弾幕 ☆ @mahonnaiseblog
Offline Jeff

JGO Coder

Got any cats?

« Reply #4 - Posted 2003-12-19 15:12:07 »

On older KVM implementations, the over head for every class and interface is something like .5K  Sad

Unfortunately given the incredible limits those same had sets have on MIDLET size (as little as 64K) the best answer I can give for those environments is to abandon much of your OOP.

Don't use interfaces at all.  Limit yourself to the absolute smallest number of classes you can get away with without  making your code totally impossible to maintain.  Obfuscate to reduce namespace.  Those are the biggies.

If you have a lot of images you may want to look at how you are encoding them and do things like reduce the bit-depth, depending on your target's capabilities...

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Pages: [1]
  ignore  |  Print  

EgonOlsen (38 views)
2018-06-10 19:43:48

EgonOlsen (20 views)
2018-06-10 19:43:44

EgonOlsen (40 views)
2018-06-10 19:43:20

DesertCoockie (187 views)
2018-05-13 18:23:11

nelsongames (122 views)
2018-04-24 18:15:36

nelsongames (121 views)
2018-04-24 18:14:32

ivj94 (861 views)
2018-03-24 14:47:39

ivj94 (122 views)
2018-03-24 14:46:31

ivj94 (758 views)
2018-03-24 14:43:53

Solater (139 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!