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 (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-05-04 21:18:25
Source code posted at:

under GPL.

Please let me know if you make any changes, and I'll make them available for all to enjoy.

I'll probably make mods at some point in the near future, as I get time.
2  Games Center / 4K Game Competition - 2006 / Re: And the winner is ... on: 2006-03-13 19:44:13
I won! Yay! :-D
Miners4k was in my own personnal top 3 (with 'A spring in the air' and 'gravitator 4k')

Woogley -> Would it be possible next year to remove the best and worst note for each entry?

Just on a lark, I did a little statistical analysis.

I want to preface this by saying that the three winners definitely deserved to win, and I'm not recommending any changes in the results at all!

But this might be useful info for deciding on a judging system in the future.

If you remove the highest and lowest scores (the "trimmed mean"), the top three scores are: Miners4K, Roll 4K, and Xero.

Interestingly, the trimmed mean results (on average) in a 1.21 higher score for entries.  Although there was a wide range.  The best gain was +12.89 for Xero, and the biggest loss was -2.71 for Daleks4K.  It's interesting that the change between mean and trimmed mean was usually positive: that means that there were more extreme low scores than there were extreme high scores.

If you use the median instead of the average (or mean), the top three scores are: Miners4K, Xero, and Goomba4K.

The three biggest standard deviations (on untrimmed scores) belonged to: Xero, Kana Invaders, and Daleks4K.  These were games whose scores had some wide variations.  The three smallest standard deviations (again, on untrimmed scores) belonged to: Goomba4K, Roll 4K, and Gandalf 4K.  These were games with very consistent scoring.

3  Games Center / 4K Game Competition - 2006 / Re: And the winner is ... on: 2006-03-13 14:33:51
Congrats to Miners4K and Markus - that really is a great game!

Interestingly, my three entries wound up getting ranked in exactly the reverse order of the way I personally consider them.  Gravitator is certainly a love-it or hate-it kind of thing.  And thanks for the encouraging comments about it, gang!  I'm definitely going to continue work on it and will post enhancements soon.

On judging and scoring, if you guys wanted to discard the highest and lowest scores (very standard in athletic judging), that's called a "trimmed mean".  You'd want more judges (nine in the Olympics), I think, and that might be hard to do.

4  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-03-10 17:03:16
It is suprisingly addictive.  I have made it to level 14 so far, but could not continue playing.  Like suggested, a pause key would be really nice.  Especially when nature calls.  Also it seems on later levels that some emmiters shoot particles at a lower rate than others.  A lot of times I am wating 2-3 seconds between particles to finish the last target while others are just spitting them out left right and centre.

Thanks!  Pause is definitely high on the list.  As far as the particles go, there is one piece of code that controls all emitters.  The emission rate is constant among ALL emitters taken as a whole.  So when you're not seeing one emitter shooting particles, that means another one is actually doing the shooting.  Even with only two emitters, if you look closely you'll see that they're never shooting particles at exactly the same time.  Basically on higher levels I was worried about the sheer number of particles.  The program doesn't only have to keep track of the particle positions and velocities, but it has to compute the gravitational effects of every mass (and there can be quite a # on higher levels) on every particle on every frame.

However, I have a few ideas:
1. Rather than perform those calculations at every frame for every particle, simply make an in-memory map of the combined gravitational field.  A particle would just need to refer to the map, depending on its current position, to see how its velocity vector should change.  The map would be updated with every mass placement.  One potential problem - added granularity to the simulation.  It might result in less predictable behavior, which would kill the game.  Of course, I can't be sure until I test it.  Also, I'm not sure how long updating the map would take when a new mass is placed.
2. Limit the # of masses.  Not sure how this would affect the balance of the game.  A well played level shouldn't need more than a handful of masses.  However, sometimes those extra ones are necessary to cancel out the effect of a badly placed mass.
3. Simply allow more particles in the system, which would limit the lower-end machine that the game could be played on.

Also, that screenshot you posted previously is hilarious!  I wonder: should the game prevent such serendipity?  Or is it okay to sometimes have that kind of thing happen?
5  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-03-09 18:07:02
This came is amazingly addictive!  I've been totally hooked for the last few days and keep going back for more.  The only problem I have is that I can't see the numbers when the targets get small on the higher levels!  Also I've found it'd be nice to be able to pause it (work calls).  Just goes to show a bit of originality can produce a really playable game.  And in only 4K!

I do intend to do additional work on it after the contest.  Thanks for pointing out the problem with higher levels... I actually haven't had the time to get that far myself!  Also, I'll release the source code.  Maybe I should set it up as a project on  If so, it may need to get reworked into something a little more easily maintainable.  When you're shooting for small size, good design goes out the window!  If this were developed into a full-blown game, for example, I'd want to add sound, and I'd want to upgrade from the 1.0 Event Model, among other things!

I also imagine an "Evil" level where the playfield is a solar system, with planets orbiting the sun.  Try to shoot your targets with any accuracy THEN!

Thanks for the compliments, by the way.  It means a lot to hear when people enjoy playing your game!  It's more important than winning or losing the contest itself.

And this game currently weighs in at only 2.77K
6  Games Center / 4K Game Competition - 2006 / Re: Whats Going On With The Downloads? on: 2006-03-03 01:04:09
Seems to be a /. post from David Levine...

Most /. users download games in alphabetic order... Not good for me Wink

Well, I found out about the contest through Slashdot in the first place, so I thought it was appropriate.  I made sure to make the post as generic as possible and not point out any games in particular (e.g. my own).
7  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-03-01 17:11:39
Got to level 7, before quitting 'cos my sore throat is realy hurting Undecided


The new version is much better - is it my imagination, or do each of the particles also attract one-another?

Thanks!  Inter-particle attraction is just your imagination.  However, it is important to note that when you place a new mass somewhere down the "chain", it affects everything on the field, even particles very far away.  What happens next is that you see your mass immediately affect nearby particles in some fairly obvious way... usually the way you intended.  However, over time, as the distant particles finally arrive near the mass, they will behave slightly differently than the nearby particles did and will take on new trajectories.  This behavior is pretty non-intuitive and can occassionally look like the particles are affecting one another.  Also, there is a granularity to the simulation - this means that even if you settle down to a steady-state situation and never add new masses you'll still see occassional variations in particle trajectories from one another, even though they are starting at the same point at the same velocity being affected by the same masses.
8  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-02-23 19:19:46
Ok, modified the game to include multiple emitters/goals on higher levels.  Made the particles themselves a little bigger.  Goals don't start shrinking until level 6.  Replaced key-press with mouse-click.  No draggable masses.  Number of masses you are allowed increases with the number of goals.  Number of required "hits" in the center of each goal.  Text doesn't go as far down now.

Used proguard/jarg/kzip (originally the class was small enough just to use normal zip compression and no classfile optimizers) so the jar size is now smaller than before.

Link above still works, I just replaced the jar file.  Also replaced the screenshot.

Still plenty of room for more code, but I'm not sure how much more time I'm going to have.

Any other suggestions or comments welcome!

Strategy hint: setting up multiple successful streams at once is cool, but sometimes it is easier to concentrate on one at a time... as long as it doesn't take you too long to set it up.

Hint #2: when placing masses (or anti-masses) far away from the emitter/fountain, gravitational effects will add up significantly by the time the particles travel far enough.  Also, since all particles are affected when you place a new mass, even far away ones, expect your particle stream to change sometimes ten or fifteen seconds AFTER placing the mass (enough time for further away particles that were perhaps just emitted when you were placing the mass to travel across the field).

Hint #3: anti-masses are good for completely reversing particle flow when the emitter is facing entirely the wrong way... otherwise they can be used to "nudge" a stream, but should probably be placed further away from the stream than you think.

EDIT: I'm able to get up to level 4, score 159777.  Haven't passed level 4 yet, though.
9  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-02-22 23:49:03
Nice idea, but in level 4 the destination-thingy gets way too small Smiley

You could make it more difficult by having more than 1 emitter

Or having more that 1 destination, with a certain amount of particles required per destination

Or both! Smiley


Yes, figuring out exactly what to do with the levels is going to be my challenge for the next few days.  I'll play around with the idea of multiple destinations/emitters.  What about color-coded ones?  For example, white particles need to hit a white target and blue particles need to hit a blue target.

Also, if possible, I might play around with making the masses draggable.
10  Games Center / 4K Game Competition - 2006 / Re: Gravitator4K on: 2006-02-22 23:46:46
Cool game, but if I run it through JWS using Java 1.5 Update 2 on Windows XP (latest SP and patches) I can't see the bottom of the window as intended: Example

Apart from that little flaw it's nice. I just poked around with exactly that sort of physics for a 2D planet simulation. Smiley

Thanks, I'll adjust the placement in my next update.
11  Games Center / 4K Game Competition - 2006 / Gravitator4K on: 2006-02-22 21:57:01
Here's an early version of Gravitator4K.

The game is fairly simple, and is controlled via mouse.  There's a particle fountain randomly placed on the left side of the screen, with a blinking blue target randomly placed on the right side.  You click on the screen to create gravitational masses (left click for attractors, right-click for repulsors).  You can place up to 25 masses on the screen, but not inside the target area.  You need to get 100 particles to the target in 60 seconds.  Each level up, the target decreases in size a little.

The level difficulty really doesn't change much, and I still need to work on this.

Click to Play

1. I've only tested this with Java 1.4, not 1.5.
2. I have not tested this on Mac or Linux, only on Windows so far.
3. The machine being used for testing is a 2GHz P4 running Windows XP, with 512MB of RAM.

JAR File (2836 bytes):
JNLP File (707 bytes):

I still have some work to do, but I welcome any comments.  For this game, I have not yet used any special compression techniques, so I do still have some room to play with.
12  Games Center / 4K Game Competition - 2006 / Re: LunaBug 4K on: 2006-02-21 23:42:28
Interesting, quite funky idea.

Think it would be nicer if one was allowed to move the mouse after pressing the mouse button. As it is now the thrust direction stays fixed when you move the mouse around, but that is a minor issue. How about a minimap. When there are a lot of dots - bugs was it? -  then you don't want to go for the one furthest away, so that might be nicer than the red - green line.

Good start.

Updated the jar file (now actually 3 bytes smaller from 2835 bytes to 2832 bytes) and added the minimap and being able to drag the mouse around while holding the button.  Also added a particle system showing your thrust.  How did I add that in while reducing the byte count?  By removing the targetting system, which, as was mentioned by swpalmer, is buggy.

Also updated the screenshot above.
13  Games Center / 4K Game Competition - 2006 / LunaBug 4K on: 2006-02-13 21:49:32
Here's an early version of LunaBug4K.  I'm also working on Kaboom4K, already posted in this forum.  I haven't submitted either yet officially as contest entries, but will after a little more work.

The game is fairly simple, and is controlled via mouse.  There's a kind of moon-like scrolling background (randomly generated), and you are represented very simply as a dot with a line sticking out in the direction you are facing.  Because you're in hovering above the surface (via, um, an anti-grav field, yeah that's it), your movement is totally frictionless and pseudo-zero-gee.  In other words, you can spin around and face 180 degrees away from your direction of travel.  There are shadows to indicate your height.  As of now, your height is a constant (not changeable).

You move the mouse to point your "craft" in the direction you want to go, and then you hold down the mouse button to apply thrust.  So stopping involves turning around and applying enough thrust in the opposite direction to cancel out your motion.  A bit like the old arcade game Asteroids.

Unlike Asteroids, the object of this game is to TOUCH the other objects.  They are "lunabugs" and you catch them by touching them.  Level one has one lunabug, level two has two lunabugs, and so forth.

You'll actually see TWO lines sticking out of your circle.  One is the nose of your "craft" and shows which way you are pointing.  It's light blue, and casts a shadow.  The other line is a directional vector to your current target (and it won't cast a shadow... think of it as a Heads Up Display).  This will be green if it is far away, yellow if close, and red if REALLY close.  It doesn't always point to the closest bug, but it should always point to the same bug until you capture it, at which point it will switch to the next bug.

There's a time limit, and if you catch all the bugs on a level, your score is increased by the amount of milliseconds remaining, and you move to the next level.  Each level gives you one minute to catch one bug.  So, in other words, the time limit on Level 1 is 1 minute, and the time limit of Level 5 is 5 minutes, and so on.

This is probably too easy.  I can generally catch each bug in about 30 seconds, so this may change.

Click to Play

1. I've only tested this with Java 1.4, not 1.5.
2. I have not tested this on Mac or Linux, only on Windows so far.
3. The machine being used for testing is a 2GHz P4 running Windows XP, with 512MB of RAM.

JAR File (2835 bytes):
JNLP File (655 bytes):

I still have some work to do, but I welcome any comments.  Yes, I do have quite a bit more space to work with here.

Unlike Kaboom4K, the animation here is completely time-based and not frame-based.  However, I imagine the quality of animation may vary considerably on different machines.  The general speed of objects should not, however.
14  Games Center / 4K Game Competition - 2006 / Re: Radar III on: 2006-02-02 01:09:22
Very nice.  I like it.
15  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-02-02 01:07:47
My jar and webstart files are updated.  The jar file size increased by 1 byte from 4091 to 4092.  The signed jar is, of course, way over.

Sound should work in webstart now.

The game speed should be slower now, more in line with what I see on my development machine.  I can't test this myself until later today, though.

Ok, I got to test it on my better machine, and frankly, it's still too fast - but it's better.  I'll do a little more tweaking.  When I play it at the "proper" speed, it's quite possible to last a few minutes if you keep your concentration.  At the current speed, though, I can't do much better than 30 seconds!

I'm also noticing tiny pauses I think must be garbage collection - which I don't notice with a slower framerate.  We'll see what I can do.
16  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-02-01 22:10:44
yeah - it's easier - I got 22900 points now

+ sound works now also Smiley

the number of the people increases, but does it increase enough to have any effect at all? I don't know, because you can't look at the stats, while you're concentrating on game.

No, actually, it's more of a joke.  When I first created the game, the population was steady except for when your planet was hit by one of the meteors.  As I played, I realized this wasn't realistic, so I made sure to have the population increase over time.  It has no real effect on gameplay, except that your planet can sustain 6 hits instead of 5 (which would be the case if the population started at 10 billion and only went down, not up).
17  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-02-01 20:39:21
Thanks for the info, jbanes and Morre.

My jar and webstart files are updated.  The jar file size increased by 1 byte from 4091 to 4092.  The signed jar is, of course, way over.

Sound should work in webstart now.

The game speed should be slower now, more in line with what I see on my development machine.  I can't test this myself until later today, though.
18  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-02-01 16:38:45
Ok, so I'm working on two updates:
1. Making sure the game runs the same speed on all machines.
2. Making sound work in WebStart.

I'm using, which doesn't work in an unsigned JAR in WebStart.  I've tried changing the JNLP to ask for all permissions, and signing the JAR with a self-signed cert.  It works - WebStart will play my audio.  However, the signed JAR is WAY over the 4k limit (my unsigned JAR is just 5 bytes under).  Since the plain executable JAR is under 4k, would that be acceptable in the contest?

I also think I've got the speed problem fixed.  However, don't go trying it yet since I haven't actually updated the files on my server.  Before doing that, I want to hear opinions on whether or not my signing size problem is really an issue or not.

19  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-02-01 01:04:05
works nice on Linux, but I didn't here any sound, too - but I was also playing the webstart.

I got a bit above 10000 points

hmm, I got to a score of 10090 in about 20 seconds of play  Shocked

I think you might be right Sandor - I'd say its about 50% faster than is intended?

I'm playing on a Athlon64 3000, with a GF6800GT.

btw, I like the terrain generation - its a shame such a cool feature serves such a minor (eye candy) role in the game.

Perhaps you could come up with a new game oriented around the terrain generator alone Smiley

Ok, I just tested on another machine - an Athlon64 2800 with 1 gig RAM running Win2K.  On this machine it is DEFINITELY too fast - - seems like twice as fast as the 2GHz P4 I developed it on.  So I will need to change the code to use time-based animation.  I hope I can keep the size under limit!

Since you've already played this version, you'll probably now think that it's a piece of cake when you play it at the speed I intended!

And thanks for the compliment about the terrain generator.  Yeah, it was actually the first thing I coded up before I knew what kind of game I wanted to do.  Originally I was thinking about a really tiny exploration game, but I'm not convinced I can do something good enough to really enjoy in only 4k.  The funny thing is that it takes a pretty hefty amount of the 4k in this game (maybe 25-30%) for (as you say) a pretty minor role.  If I have time before the deadline, maybe I'll play around with the exploration game concept... but I also have at least one other game idea I want to do first (after fixing the sound and framerate issues here).
20  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-01-31 20:29:43
works nice on Linux, but I didn't here any sound, too - but I was also playing the webstart.

I got a bit above 10000 points

Hi, Arne.  Thanks - it's good to know it works on Linux.  I promise to try getting sound running under webstart soon.
21  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-01-31 20:20:07
That's not Kaboom, that's a variant of Star Castle!   Shocked

Kaboom has a guy in stripes. Who drops bombs. From the roof. Fast.   Grin

Nice job, BTW. It's a very interesting entry.

Hi, jbanes.  Thanks for the compliment!

Yep, I remember Kaboom well, one of my favorites.  I'll grant you that this game is circular, like Star Castle... but the basic gameplay is still Kaboom.  Asteroids are being dropped instead of bombs.  The playfield is wrapped into a circle, instead of horizontal.  Instead of getting three or four lives (the buckets), you get six hits on the planet.  And the guy in stripes is just a blue circle.  If this game were "unwrapped" so that the planet's surface was a horizontal line at the bottom of the screen, and the asteroid-dropping alien moved back and forth along the top of the screen, with your blue "paddle" in the middle, it would essentially be Kaboom.  One major difference is that in Kaboom, as you loose buckets, the game gets harder.  In my game, as asteroids hit the planet, the gameplay is unaffected (the game just gets faster over time whether or not you sustain any hits).
22  Games Center / 4K Game Competition - 2006 / Re: Kaboom4K on: 2006-01-31 20:15:23
Am I just crap, is that insanely difficult??

I don't last more than 15 seconds!
A higher birth rate, and lower asteroid rate is needed!

btw, sound doesn't work.

I think it'd be cool if you could see the population centres on the planet, and the asteroids hit the planet in different places, depending on their approach angle.

You could then atleast concentrate on stopping the ones that threaten the greatest population centres. (or the UK, depending on where your priorities lay  Grin)

Hi, Anon666.  I wonder - what's your CPU?  I'm not using time-based animation, so if your system is more powerful than mine, perhaps it's going too fast on your machine.  I can generally last a few minutes, but I really need to concentrate on the screen.  Also, keep your mouse close to the center of the screen so that you need to move it as little as possible.  If it seems like a lot of people are having issues with the speed, I may need to rewrite to be time-based.

About the sound - like I said in my original post, not working under webstart, but it works (for me, at least) when played directly from the JAR.  If you're not using webstart, but still aren't getting sound, let me know - that will be something I'll have to look into.  I'm hoping to get the webstart sound working in my next update.

I do like your idea about seeing cities on the planet, but I'm not sure if I can squeeze it in.  I'll see what I can do.  The asteroids do hit different places on the planet, but a majority of them go for the exact center - this is a bug I need to fix so that it's equally likely for them to hit any visible part of the planet.

In my original versions of the game, each planet had a random population between 2 billion and 15 billion, and each hit had a different effect on the population (anywhere from 0 to 1 billion).  This was a cheap way of simulating the fact that a planet's surface isn't homogenously populated.  The only problem was that such randomness isn't really fair in a game when you want people to be able to compare high scores, so I changed it to every planet starting with 10 billion, and every hit killing 2 billion.  Generally, due to the slight population growth, you should be able to sustain 6 hits before the game ends (the 5th hit will leave you with just a handful of people).

23  Games Center / 4K Game Competition - 2006 / Kaboom4K on: 2006-01-31 19:35:31
Here's an early version of Kaboom4K, vaguely inspired by the old Activision "Kaboom!" game.  This will be my first ever entry into this contest.

The game includes a psuedo-3D starfield background, procedural sound, a particle system, and a terrain generator.

The game is controlled with the mouse.

There is only one level, which simply gets progressively harder.  Like the original "Kaboom!", there is no way to really beat the game - it's just a question of how high a score you can get before the end.

Each replay generates a new terrain.

Click to Play

1. I've only tested this with Java 1.4, not 1.5.
2. I have not tested this on Mac or Linux, only on Windows so far.
3. The machine being used for testing is a 2GHz P4 running Windows XP, with 512MB of RAM.
4. Sound works if you run the JAR file directly, but does not work under WebStart.  Is it possible this is because my JAR is unsigned and I'm accessing the class?
5. The frame is currently resizable, which is wrong - it won't be in the final version.

JAR File (4092 bytes):
JNLP File (873 bytes plus 5433 bytes for signed jar):

I still have some work to do, but I welcome any comments.  I suspect there will be performance problems on some machines.
Pages: [1]
EgonOlsen (75 views)
2018-06-10 19:43:48

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

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

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

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

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

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

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

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

Solater (173 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!