Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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  
  Metro4K  (Read 2797 times)
0 Members and 1 Guest are viewing this topic.
Offline nullterm

Senior Newbie





« Posted 2007-01-10 04:01:34 »

Metro4K

Webstart - http://javaunlimited.net/games/launch.php?type=jnlp&id=130

Homepage - http://www.nullterminator.net/java/metro4k/

A small city building simulation. Construct as big of a city as you possibly can. Keep it powered with utilities and safe with emergency services. The higher a section goes, the bigger it gets and the more it helps to fuel the entire city system. The more successful your city becomes, the more money you get to build it even larger.

Plan your city. Make sure that industrial pollution won't hinder the growth of residential areas. Make sure there is adequet transportation with streets. Use parks around the city and the waterline to make the city more beautiful for residential and commercial districts.


My 2nd contest entry (and game in Java).  An inspired re-make of an old classic.  More challenging trying to get the simulation working.  If there's one thing I wish I could squeeze in, it would be a system for communicating how well different areas of the city are doing (crime, pollution, utility, work, products, retail, etc).  May take a 2nd look at it to see if there's some more byte crunching I can do.  But there's only so much you can do in 4K, as you're well aware.  Wink

See the homepage for more details and instructions.

Have fun!

B
Offline g666

Junior Devvie





« Reply #1 - Posted 2007-01-10 11:36:28 »

Wow, a really well done game!

Looks nice and plays very nicely. Much more of a city sim than i would expect to be do-able in 4k.

If you have some more space tho, you could make it slightly harder, i ended up with so much money i couldnt spend it fast enough. Also you could give some more feedback to why areas are doing poorly.


desperately seeking sanity
Offline nullterm

Senior Newbie





« Reply #2 - Posted 2007-01-10 12:31:10 »

Haha, wicked city.

You nailed it right on the head with your two comments...

Once you get enough momentum, you can keep going.  Still trying to think of a way to balance it so it's not as easy. 

And I'd love to have more feedback.  I had a feature for displaying bars over the zones to monitor the stats.  But they had to get pulled out to slip under the size limit.

I just barely squeezed in the procedural water generation, which was a bigger plus than I thought it would be.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #3 - Posted 2007-01-10 13:45:49 »

Really cool.  Grin Even if it doesn't make it under the size limit, I'd still like to play a version with more feedback and stats.

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

JGO Wizard


Medals: 68
Projects: 4


I always win!


« Reply #4 - Posted 2007-01-10 13:47:40 »

I never liked these Sim games, although I remember playing SimTower way back...and enjoying it a bit.

But this entry is amazing Smiley Very nice achievement, I'm impressed.

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

JGO Ninja


Medals: 15
Projects: 6
Exp: 10 years


Java games rock!


« Reply #5 - Posted 2007-01-10 21:28:34 »

some tips to reduce your jar size:

-use pngcrush or similar on your graphic file
-rename the graphic file to "m" instead of "m.png"
-convert all the static methods to non-static methods
-try to reduce the number of methods used (each method needs an entry for its signature in the resulting class file)
-I am not sure, but does your webstart version of the JAR selfexecuting? if so it is not necessary so remove the meta-inf directory to save space. (you will need to put it back in for your downloadable JAR version (which can be over 4k as long as the webstart version is under 4k)
-reduce the number of static and class variables as like with the methods, these variables' signatures are recorded in the class file. Instread try to make 'method scope' variables where you can.

Ideally you will only have two 'methods' one main entry method which will call the constructor where all your code is.

The main trick to fit more into 4k is to NOT think OO and do nastry procedual code Smiley

The final point is to run your .class through an optimiser (see 4KJO for a tool which attempts to find the best combination)

Java4k RIP 2014
Offline appel

JGO Wizard


Medals: 68
Projects: 4


I always win!


« Reply #6 - Posted 2007-01-10 22:50:57 »

Easy to optimize more.

I used bjwflate on the contents of your jar, and it went from 4.090 bytes to 4.039 bytes.

Also, you don't need that META-INF directory if your jar is webstartable. I deleted it and rezipped it, it' s now 3.906 bytes., saving you 184 bytes.

I took a look at your code using jshrink, and I noticed few things that could be done differently that could probably save you up to 100 bytes. You should take a look Smiley

You're using a lot of methods, try inlining them instead.

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

JGO Ninja


Medals: 15
Projects: 6
Exp: 10 years


Java games rock!


« Reply #7 - Posted 2007-01-10 23:30:01 »

I just ran your game through 4KJO to make an embedded pack200 self exectuing JAR.

The only changes i made was to remove the main() method from your m.class and to remove the manifest.

I was able to compress it down to: 3651 bytes! (see the attached file)

With optimistaions to the structure of your program I would imagine another 100-200 bytes could be saved.

Java4k RIP 2014
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.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!