ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
on:
2007-02-22 04:39:52 » |
|
Hi there... Another Java 4K entry.. A tribute to an old classic :-) .... Full instructions here : http://www.ahristov.com/raiden4kComments,ideas and bugs are appreciated :-). I've tested it under Linux (Fedora Core) and Windows and seems to work fine. No way to test it under Mac, though.
|
|
|
|
toasten
Jr. Member   Posts: 56
|
 |
«
Reply #1 on:
2007-02-22 13:09:58 » |
|
The "End-Boss" is too fast, u can't get around without being hit, cause his fire rotates to fast.
And a "Bug": The Ship get's nearly out of the screen at the bottom.
Win2K, Java 1.5, AMD 3000+
|
|
|
|
|
CaptainJester
JGO Neuromancer     Posts: 1138 Medals: 8
Make it work; make it better.
|
 |
«
Reply #2 on:
2007-02-22 14:17:42 » |
|
And a "Bug": The Ship get's nearly out of the screen at the bottom.
That's not a bug. When you don't run a WebStart app signed, it puts a status bar at the bottom of the window. Unfortunately they didn't do it smartly, so it overlays your display. Anybody running an unsigned webstart app needs to take that into account when making their games.
|
|
|
|
Games published by our own members! Go get 'em!
|
|
SimonH
JGO Strike Force    Posts: 896 Medals: 14
|
 |
«
Reply #3 on:
2007-02-22 14:55:00 » |
|
I'm impressed! Brilliant for 4k.
|
|
|
|
nonnus29
JGO Ninja    Posts: 687
Giving Java a second chance after ludumdare fiasco
|
 |
«
Reply #4 on:
2007-02-23 06:13:02 » |
|
Too fast, too hard in the beginning, not enough power ups, the boss is too hard. When I died it didnt' decrement my ship count. Otherwise, nice game.
|
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #5 on:
2007-02-23 07:05:53 » |
|
Too fast, too hard in the beginning, not enough power ups, the boss is too hard. When I died it didnt' decrement my ship count. Otherwise, nice game.
Thanks What kind of computer do you have? As for the powerups, do you mean "not enough variety" or "they don't drop frequently enough"? Regarding lives, it's definitely impossible :-) Lives are decreased the very moment you die, and this is reflected immediately in the lower status bar. Since when you start again nothing changes in the status (because lives have already been decremented), it may create the illusion that they were not. This, or maybe you picked an additional life.
|
|
|
|
Abuse
JGO Kernel      Posts: 1866 Medals: 5
falling into the abyss of reality
|
 |
«
Reply #6 on:
2007-02-23 08:08:06 » |
|
Wow, I'm impressed! I've never played a Java game before manages to cause a machine crash/overload!!! Twice now, while playing this game (no other app. running), my work PC has instantly powered down - and refused to boot back up again until the power cable was removed for ~10 seconds. Athlon 64 3000+ cpu, MSI mobo, Geforce 6200LE gfx. Good old Geforce drivers I bet  [edit] Just caused another crash! :S I'd got quite far too  I had max firepower, max fire speed, hadn't died(obviously), and had 10 orbiters  [/edit]
|
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #7 on:
2007-02-23 08:11:37 » |
|
Wow, I'm impressed! I've never played a Java game before manages to cause a machine crash/overload!!! Twice now, while playing this game (no other app. running), my work PC has instantly powered down - and refused to boot back up again for ~60 seconds. Athlon 64 3000+ cpu, MSI mobo, Geforce 6200LE gfx. Good old Geforce drivers I bet  ?!?!?!  Anything I can do about it?  I have no idea why this might be happening. I swear my game yields for 25 ms every game loop and I use nothing extraordinary inside.... My computer is a P4 3GHz HT With a GeForce FX 5200...
|
|
|
|
Abuse
JGO Kernel      Posts: 1866 Medals: 5
falling into the abyss of reality
|
 |
«
Reply #8 on:
2007-02-23 08:29:33 » |
|
Nah, doubt very much its anything you are doing. As soon as Java started using hardware acceleration, it became susceptible to the whims of the driver authors  I'm not overly suprised tbh, MSI are a crappy mobo. mfg, and 6200LE's are the crappiest card that Geforce do. This is the third MSI motherboard that i've had in this machine, the other 2 were faulty in some way or other...
|
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #9 on:
2007-02-23 09:58:19 » |
|
Ok, I've fixed the frame-rate and game speed to about 32-33 FPS, so now it should be reasonable on faster computers ... I knew that the ship could go to the lowest end of the screen but I didn't consider this as a problem. Anyway, now it can't go below the score line. If you want, give it a new try here : http://www.ahristov.com/raiden4k/raiden4k-2.jnlp
|
|
|
|
Games published by our own members! Go get 'em!
|
|
appel
JGO Wizard     Posts: 1477 Medals: 23
I always win!
|
 |
«
Reply #10 on:
2007-02-23 10:13:18 » |
|
Very impressive stuff.
But I agree, a bit too fast at start.
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #11 on:
2007-02-23 10:26:33 » |
|
Very impressive stuff.
But I agree, a bit too fast at start.
Even the recent, slowed-down version?
|
|
|
|
appel
JGO Wizard     Posts: 1477 Medals: 23
I always win!
|
 |
«
Reply #12 on:
2007-02-23 11:36:46 » |
|
Even the recent, slowed-down version?
Sorry, only clicked on the link in the original post. The newest version seems to be good.
|
|
|
|
nva225
Sr. Member   Posts: 298
|
 |
«
Reply #13 on:
2007-02-24 00:07:09 » |
|
Completely awesome. Definitely not too easy, but then it's not too difficult either. Very impressive amount of features in a 4k game, and graphical scrolling background along with it. Very good work. Only one real complaint, detailed in screenshot below:  Note I am not hitting any bullets. Why did I die? =(
|
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #14 on:
2007-02-24 03:36:24 » |
|
Completely awesome. Definitely not too easy, but then it's not too difficult either. Very impressive amount of features in a 4k game, and graphical scrolling background along with it. Very good work. Only one real complaint, detailed in screenshot below:  Note I am not hitting any bullets. Why did I die? =( Thanks a lot for your opinion... You died because there was not enough space in the game to do a proper collision detection other than a "bounding box" calculation. So basically the game thinks you ran into the boss. The image below shows the bounding boxes for both ships  Now I'll see what I can do about this. Probably it's not much, because I've used every single optimization stuff I could think of but maybe I can think of something...
|
|
|
|
moogie
JGO Strike Force    Posts: 775 Medals: 5
Java games rock!
|
 |
«
Reply #15 on:
2007-02-24 04:21:53 » |
|
To help squeeze out the last few bytes from your game I suggest trying to remove as many intermediate variables as possible and simply use the full statements in their stead. i.e. from your game (i decompiled it to see what i could suggest to help) there is a block of code similar to this: 1 2 3 4
| int l4 = ai1[0] - ai1[j1]; int l6 = ai2[0] - ai2[j1]; ai3[j1] = (int)(10D * Math.cos(Math.atan2(l6, l4))); ai4[j1] = (int)(10D * Math.sin(Math.atan2(l6, l4))); |
I would recommend changing it to: 1 2
| ai3[j1] = (int)(10D * Math.cos(Math.atan2(l6, ai1[0] - ai1[j1]))); ai4[j1] = (int)(10D * Math.sin(Math.atan2(l6, ai2[0] - ai2[j1]))); |
This is a little counter intuitve but in most cases it will reduce the number of bytes after compression. I also ran your "raiden.jar" through the 4KJO tool and it reduced the jar by one byte... Not much i know but i do not have access to your original class before being run though obsfucators, I would imagine some more gain if the original class file was used in the tool.
|
|
|
|
|
Abuse
JGO Kernel      Posts: 1866 Medals: 5
falling into the abyss of reality
|
 |
«
Reply #16 on:
2007-02-24 04:53:48 » |
|
I'd suggest using a better bytecode optimiser, rather than mangling the source-code....
|
|
|
|
|
moogie
JGO Strike Force    Posts: 775 Medals: 5
Java games rock!
|
 |
«
Reply #17 on:
2007-02-24 04:58:14 » |
|
heh, isnt source code mangling what j4k is all about ? 
|
|
|
|
|
ahristov
Jr. Member   Posts: 54
Java games rock!
|
 |
«
Reply #18 on:
2007-02-28 10:45:58 » |
|
To help squeeze out the last few bytes from your game I suggest trying to remove as many intermediate variables as possible and simply use the full statements in their stead.
Thanks moogie, I used your wonderful 4KJO metaoptimizer while developing the game, but the code became so so complex that most optimizers were simply crashing when trying to analyze the code. I had to run both ProGuard and 4KJO with the <b>-Xint</b> switch so that they wouldn't throw StackOverflowException or other strange errors at me  .... And using <b>-Xint</b> means that each game iteration took about 5 minutes to test - much more that I'm capable of bearing.... I've used so many optimizations and code-mangling sutff that I doubt the amount of code that a proper collision detection requires can be compensated through further optimizations. As an extreme example, I have variables that are reused more than 6 times throughout the code for completely different purposes - just to increase repetition in stack frame references. So I guess I'm going to let it stay as is.... Actually, I'd rather add more gameplay if I had the space...
|
|
|
|
|