Procedural shooter concept study

Since the vectorball idea died so quickly, I was pondering what I could do with the codebase. So I picked up another idea of mine, to make a sidescrolling shooter with all content procedurally generated. All images and sounds in the game will be created by the program itself, from random numbers and some graphics shuffling. And bits and bytes and magic. Or so ;D

At the moment I have a starfield sort of background, an untextured tunnel shape, and one way to create enemy ships. No collision detection yet, no scoring and no game … I’ll work on that someday soon. Also I want to more variance in enemy ship designs, and a tunnel rock texture, and decorations.

For a brief moment I thought it might be something for the Java4k contest, but the jar file is 17k if I strip the debug info, and have it compressed, that seems to be way too big to try and shrink it into 4k. So I’ll let that be, although I think that a shooter with procedural content generation might be a project candidate for the Java4k contest.

Download (22k):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r1.jar

You can move the ship, shoot (but not hit anything), explore the tunnel and watch random enemy designs. More to come …

Edit: use the cursor keys to move, ctrl to shoot. And yes it goes leftwards, there are enough rightwards scrolling shooters :wink:

Bullets can hit and kill enemies now. Once I have a bit of free time again, I’ll add scoring, also collisions between the ship and tunnel walls as well as between the ship and enemies.

Download (18k):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r2.jar

Feels a bit like an arcade shooter already …

New:

  • ship-tunnel collision checks
  • ship-enemy collision checks
  • slightly smoothed ship movement
  • a little ship drive effect animation

Score calculation:

  • Destroyed enemies give points, the harder they are to destroy the more points you get
  • Score penalty if your ship collides with an enemy
  • Score penalty if your ship collides with the tunnel

Download (17k)

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r3.jar

Attack of the dendril ships!

Made a new ship shape generator, did some more playtesting.

Download (17k):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r4.jar

I manged to produce some presentable explosions effects.

Overall I’m quite pleased with the progress on this project. It’s been easier than I thought, and the procedural content seems quite alright for the time spent on the routines. Actually it’s quite fun to fly along and watch the enemy shapes and the explosion colors. Particlarly the dendril ships have a huge variety of shapes.

Download (18k):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r5.jar

Next will be to create procedural sounds. I’ve no experiences with that so far, but I hope that the combination of envelopes with waveforms of different frequencies will create something usable.

While playtesting I found a stupid bug - ghost ships could collide with your ship and kill your score. Now there are now more ghost ships. And the dendril ships became a bit more colorful.

I’ve also changed the tunnel looks a bit. It’s still the weakest of all graphical structures in the demo, I think, but a bit better now than before.

Download (18k):
http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r6.jar

Just played it and your collision detection is very odd. 80% of the time a bullet hits an object, nothing happens. I like the whole concept, but made you should make it so that the player loses lives when they hit the tunnel’s edges. Good work.

Thank you for the feedback! The collision detection runs in a low priority thread, maybe that was a bad decision. What kind of CPU does your computer have?

When I have time to work on it some more I want to add a shield meter, and collisions will reduce the shield levels. Also I think some enemies should shoot back.

Thanks again :slight_smile:

Edit:

Quick release for testing:

  • Collision detection now run as high priority thread
  • Winged ships got more interesting designs now

Download (18kb):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r7.jar

PS: Big ships have more armor points. You need to hit them several times till they explode.

Yup, collision works now and all bullets hit instead of having some pass through.

Good idea.
Its really interesting to make everything random.

Found the following bugs:
Hittest against wall is very glitchy.
Bullets fly trough walls (maybe intended, but it would make the game more interesting when the wall stops bullets).
Explosion is kinda slow, at first i thought my game was lagging.
Enemy’s fly trough each other, and the flying patters are really simple, maybe the enemys should swarm less.

Good to know. I found another problem in the collision checks enemy vs. ship, but I must spend more time on investigations. The ship vs. tunnel check is very coarse, too, but I’m confident that I can improve that once I spend a bit more time on it (currently only tests ship bounding box vs. tunnel spikes).

Screenshot featuring the “winged ship” design improvements:

@RobinB:

It’s intended that bullets can pass through walls, the enemies can do that too ;D I’m not quite decided if it’s a good or bad feature, but I think it can stay for the moment.

The enemy flight pattern will be improved, but it will need a bit of time to include splines and set up other grouping patterns than just lines.

I’ll investigate the explosions. On my system they start quite immediately when a enemey is destroyed. What is the exact problem, are explosions delayed after an enemy is destroyed, or is the animation going too slow?

A little update:

The current state of the project includes one one new feature: random mines, which block the tunnel. Well, also a slightly improved bullet vs. enemy check, not sure if it will make much of a difference though.

Download (r8, 18kb):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r8.jar

Some day I want to try that with other genres too, particularly with adventure or role playing games. But those are quite complex, so I wanted to start my studies with something easy. But it helps to make games which one can play oneself as developer, and still be surprised now and then :slight_smile:

Well it makes the random walls much more interesting if your bullets cant pass tough, but yeah it does not matter.
The animation itself is really slow, each frame is delayed like 1 to 2 seconds.
But besides this, the game is already really nice.

Suddenly, a voice yells over the bridge, “Commander, they’ve learned to shoot back!”

(But luckily they are bad at aiming …)

New in r9:

  • explosions aren’t so heavy on the CPU anymore
  • enemies shoot
  • less mines

At the moment hits from enemy bullets just lower the score. It’s just to see that the hits are correctly processed and to give the player a little incentive to avoid bullets.

Download (19kb):

http://www.java-gaming.org/user-generated-content/members/132627/vks-shooter-study-r9.jar

Thanks :slight_smile:

I hope the change for the explosions helps a bit. Otherwise I must reconsider my image blending routines.