kevglass
|
 |
«
Reply #60 - Posted
2005-01-20 05:16:29 » |
|
Kzip is giving me around 48% I think, but I've not got the figures here to check.
Kev
|
|
|
|
mlk
|
 |
«
Reply #61 - Posted
2005-01-20 22:18:59 » |
|
Does bz2 output jar-compatable files?
|
|
|
|
oNyx
|
 |
«
Reply #62 - Posted
2005-01-21 00:31:05 » |
|
jar=zip and zip has a bzip2 mode (and copy... and deflate [default] and deflate64). Hm. But it isn't any good anyways. The p200/gzip combo is much better. (Pack200 saves alot!) 3424 bytes for my game... instead of 4094 (jarg+kzip and the image was even external!) # The presentation (jar, class, or other) does not matter, as long as the code can be directly run from the shell. # The target JRE is 1.5.So. Uhm... we could actually use that... right? Gah... a half k (670+2 bytes actually)... I could have done so much with that 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
mlk
|
 |
«
Reply #63 - Posted
2005-01-21 00:44:46 » |
|
I though bz2 was a different beasty all togther. But I could be wrong. I ofton am 
|
|
|
|
William Denniss
|
 |
«
Reply #64 - Posted
2005-01-22 05:21:09 » |
|
bz2 does not create .jars, indeed it can only compress single files.
I have found that 7zip with compression set to max, and the algo set to zip (so its jar compatable) created a smaller .zip file than bzip2 could a bz2 file, with the advantage that it is a .jar. About 55% compression I think. Additionally the overhead for the 7zip created archive was very small (about 70 bytes).
Will.
|
|
|
|
oNyx
|
 |
«
Reply #65 - Posted
2005-01-22 06:51:17 » |
|
1.4 chain: -compile -jar (doesn't matter if it's stored or compressed) -obfuscate (eg jarg or jax->jarg) -extract [-decompile] [-check if there's still stuff which should be inlined] [-if so change it and goto 1] -jar (7zip max or kzip[usually better] and compare if it's smaller than the jar from step 3)
That one left 2 bytes... and the image had to be external.
1.5 chain (1.5/webstart only and you need some serversided script for serving it): -compile -jar (doesn't matter if it's stored or compressed) -obfuscate (eg jarg or jax->jarg) -extract [-decompile] [-check if there's still stuff which should be inlined] [-if so change it and goto 1] -jar (store) -pack200 (--no-gzip) -gz(max eg with 7zip)
That one left 672 bytes... and the image was also included.
|
|
|
|
|
woogley
|
 |
«
Reply #67 - Posted
2005-01-22 14:53:38 » |
|
game list updated.. I had to make an alternative launcher for T4XI, because games.cokeandcode.com still doesnt work for me. Hope you dont mind kev 
|
|
|
|
kevglass
|
 |
«
Reply #68 - Posted
2005-01-22 14:59:42 » |
|
No problem.. as long as it works.. I'm really getting worried about that domain.
Some people got, some people don't...
Kev
|
|
|
|
kevglass
|
 |
«
Reply #69 - Posted
2005-01-23 08:29:04 » |
|
Working with images is a right git isn't it? I've tried SuperPackME but it doesn't seem to do me any good. Anyone got any tips? I've got an indexed image with 23 colours at size 80x32. I can just fit it in but at the expense of game features  Kev
|
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #70 - Posted
2005-01-23 09:26:48 » |
|
Yeah, make it 40x32 instead  Cas 
|
|
|
|
jojoh
|
 |
«
Reply #71 - Posted
2005-01-23 13:49:59 » |
|
Cas is right, but why stop there? Make it 16 or even 8 colors and 40x16 or even smaller. Should save some space, and if you then scale it up when drawing, it will give the game a nice retro feel. In Late 4K I ripped my own old gfx from atari, and scaled it by a factor 2.234324... or something, and still works sort of OK. Has anybody tried to generate images ("sprites") in code? How has that been compared to loading huge images (>150B  )
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #72 - Posted
2005-01-23 19:29:06 » |
|
My Super Sprint 4k clone is still too large to enter, first I want to get the game working, then I'll concentrate on making it small. I'm currently using 7088 bytes, which is 173% of the allowed size. I'm going to be looking at having all images included in the code, therefore no image loading code is required, also no headers will be needed for stuff like PNGs so I should be able to save some space. I also have lots of methods and static final variables, I think another thread mentions that I should inline everything into a single main method to reduce space, can anyone confirm this? There is a great article on saving space in code, it takes a look at how to get Hello World down to 70bytes. http://www.sys-con.com/story/?storyid=37060&DE=1I was wondering as well if 1.1 class files are smaller than 1.5 class files, has anyone tested compiling with a -target=1.1 flag to see if that helps? I'm not using any 1.5 features so this is a possibility for me. Andy.
|
|
|
|
jbanes
|
 |
«
Reply #73 - Posted
2005-01-23 22:31:43 » |
|
Working with images is a right git isn't it? I've tried SuperPackME but it doesn't seem to do me any good. How so? SuperPackME will probably give you about a 15% reduction (displayed as 85% reduction rate) with those images, plus it will compress even better. Be aware that even if the final result is near 100%, the JAR compression will still reduce it above and beyond the size of the PNG files. Anyone got any tips? I've got an indexed image with 23 colours at size 80x32. If you're using SuperPackME, split the images apart. That will save you from having to draw only parts of the image. i.e. You can use g.drawImage(image, x, y, observer) or g.drawImage(image, x, y, scaleWidth, scaleHeight, observer). Also make sure you're using 7Zip. I've tried KZip, but haven't gotten any improvement. I use 7Zip like this: [code]7z a -tzip -mx=9 myzip.zip file.class META-INF/MANIFEST.MF I can just fit it in but at the expense of game features  That's always the tradeoff, isn't it? :-) Beware that your best results from SuperPackME are going to be from small images with few colors. It's best if you keep the colors per image below 16. :-)
|
|
|
|
|
William Denniss
|
 |
«
Reply #75 - Posted
2005-01-24 22:09:22 » |
|
My Super Sprint 4k clone is still too large to enter, first I want to get the game working, then I'll concentrate on making it small. I'm currently using 7088 bytes, which is 173% of the allowed size.
I found it better not to do it that way, and if I wanted to add a feature then I had to optimise some stuff to get it in, else I can't have the feature (e.g. I don't have full screen mode  because it cost too much). Will.
|
|
|
|
William Denniss
|
 |
«
Reply #76 - Posted
2005-01-24 22:21:43 » |
|
Speaking of full screen, anyone got a better way of doing it (size wise) than I am? I replace: 1 2
| f.setSize(1024,768); f.setVisible(true); |
with 1 2 3 4 5 6 7
| { GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment(). getDefaultScreenDevice(); gd.setFullScreenWindow(f); gd.setDisplayMode((new DisplayMode(1024, 768, 16, 60))); } |
And it costs me 139 compressed (7zip, max zip compression) bytes. f is my JFrame. Will.
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #77 - Posted
2005-01-25 01:03:37 » |
|
I'm of the opinion that I write the game that I'd like to play (nothing says I can't release the game after the comp at 150Kb) and then I take out all the bits I don't really need (fancy graphics) to get it under the 4k limit.
I too would like to thank the organisers, this comp has really lit a fire under my ass to get coding on small managable (see finishable) projects rather than working on huge unfinished stuff...I think Cas made this comment 3 years ago, I'm finally listening Cas!
I have a few ideas as well for other entries, so as soon as I finish this one, I'll start on the next, the current record for number of entries is currently 5 or 6 I think.
Andy.
|
|
|
|
princec
|
 |
«
Reply #78 - Posted
2005-01-25 07:47:36 » |
|
I wish I'd listen to myself some time  Cas 
|
|
|
|
William Denniss
|
 |
«
Reply #79 - Posted
2005-01-25 22:29:36 » |
|
it is good advice  Regarding the full screen stuff, I ended up taking out the "gd.setDisplayMode((new DisplayMode(1024, 768, 16, 60)));" call which saved a lot of bytes, and isn't so great on LCD monitors anyway (since they are best run at native resolution and there is no way I have enough space to make it user adjustable). Will.
|
|
|
|
Morre
|
 |
«
Reply #80 - Posted
2005-01-29 18:24:57 » |
|
|
|
|
|
kevglass
|
 |
«
Reply #81 - Posted
2005-01-30 07:08:10 » |
|
Having seen Markus's Dungeon4k I think I'm going to have to do another entry to have a chance of winnng  If the game is to be client/server based.. does the server have to be inside the 4k too? Or just the client? Kev
|
|
|
|
mlk
|
 |
«
Reply #82 - Posted
2005-01-30 08:08:00 » |
|
Client & Server, else you could just have a 4K VNC client, and a spankingly large server. Now I've fixed my game from bluescreening random computers, and fixed the controls: Stag Party 4kIt is your Stag Party, so your mates decided it would be a bit of a laugh to open up an interdimensional portal, and throw you through! Now you are stuck dimension where evil cubes are trying to kill you, and all you have to ward them of it Small Good Cubes that fire out of your eye balls. Yeah, the plot sucks, but that is fine; so does the game! Controls:Rotate: Left/Right/Up/Down/Z/X Fire: Space Quit: Escape DownloadsA big Thanks to Woogley for the space! 
|
|
|
|
blahblahblahh
|
 |
«
Reply #83 - Posted
2005-01-30 09:12:12 » |
|
Having seen Markus's Dungeon4k I think I'm going to have to do another entry to have a chance of winnng  Personally, I wouldn't necessarily say dungeon4k was even the best I've seen so far. It's good, and fun nostalgia, but I'm not sure why people are so wowed by it (I've seen much much more impressive graphics in 4k), and I'm judging by gameplay at the moment more than graphics. For instance, I've seen animated reflective water in an FPS shooter in 4k. Um. Gameplay sucked, though.
|
malloc will be first against the wall when the revolution comes...
|
|
|
Danskeren
|
 |
«
Reply #84 - Posted
2005-01-30 13:33:12 » |
|
|
|
|
|
jojoh
|
 |
«
Reply #85 - Posted
2005-01-30 16:41:24 » |
|
If the game is to be client/server based.. does the server have to be inside the 4k too? Or just the client? Client & Server, else you could just have a 4K VNC client, and a spankingly large server.
Woogleys pages states: Must be self-contained- no external resources (e.g. loading an image from a website) Not absolutly clear, but looks like a both client and server would have to be within 4K. I also wonder what the verdict on midi sound is... Guess that your game uses that Mlk, like Abuses previous entry to a 4K compo? But the midi lib is not part of the distribution is it? Or have they baked that into 1.5? If that is OK, I need to learn Midi in a hurry
|
|
|
|
cyberyoyo
Junior Devvie  
Java games funk
|
 |
«
Reply #86 - Posted
2005-01-30 18:56:27 » |
|
I find all these 4k games awesome and for some reason they provide me with more entertainment than if they were full of 3d and songs and lalalas. when this contest is over, why don't you guys compile all these 4k entries in one bigger game? You could invent a meta-plot (for example an alien who must collect X prizes to get back home) with pretexes to play each mini-game. Isn't that a good idea? 
|
|
|
|
William Denniss
|
 |
«
Reply #87 - Posted
2005-01-30 22:50:42 » |
|
Personally, I wouldn't necessarily say dungeon4k was even the best I've seen so far. It's good, and fun nostalgia, but I'm not sure why people are so wowed by it (I've seen much much more impressive graphics in 4k), and I'm judging by gameplay at the moment more than graphics.
For instance, I've seen animated reflective water in an FPS shooter in 4k. Um. Gameplay sucked, though.
I don't know why people were so wowed by it either. I thought the graphics were pretty cool for 4k, but the gameplay wasn't that exciting. Will.
|
|
|
|
nonnus29
Senior Devvie   
Giving Java a second chance after ludumdare fiasco
|
 |
«
Reply #88 - Posted
2005-01-31 00:44:02 » |
|
I'm impressed as hell because I've been trying to make a game with VERY simple 3d rendering. :-/
|
|
|
|
jbanes
|
 |
«
Reply #89 - Posted
2005-01-31 04:19:34 » |
|
While Dungeon 4K isn't a very interesting *game* yet, it is a very impressive display of technology. Sure, it's easy for a senior level programmer to replicate, but only if they have a few years of experience in dealing with the nuances of 3D programming. I know 3D is simple on paper, the implementation of a GOOD engine is still something that not all that many developers can do. Even those that have delt with 3D all their lives many know nothing of procedural textures, ray tracing, ray casting, or (in some cases) the precise 3D math that makes the various transformations possible! And even if they know these things intellectually, implementation is a whole other matter. As Cas likes to say, "things start to get a bit fiddly." :-) So from that perspective, I think Dungeon 4K is a very impressive entry. However, I'm still hoping I'll cream it in the Gameplay score. If it had been a free movement engine similar to Wolf3D, then I think we all would have been toast. 
|
|
|
|
|