Randomly generated aliens
Randomly generated aliens
This could equally be in programming as well as graphics I suppose.
I've messed about with this kind of thing before with Spritemaker and EFMB. I'm revisiting the idea of randomly generating alien sprites for shmups.
If you take random bytes and mirror them (these pics would be for a horizontal shooter), then randomly mask the nose end to taper it, you get serviceable results IMO.
I'd be interested if anyone has any different takes on how to do this, or improve on the above. I considered inserting some pre-made graphics like a cockpit, but that would be missing the point really.
I've messed about with this kind of thing before with Spritemaker and EFMB. I'm revisiting the idea of randomly generating alien sprites for shmups.
If you take random bytes and mirror them (these pics would be for a horizontal shooter), then randomly mask the nose end to taper it, you get serviceable results IMO.
I'd be interested if anyone has any different takes on how to do this, or improve on the above. I considered inserting some pre-made graphics like a cockpit, but that would be missing the point really.
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Randomly generated aliens
These look great. The tapering really helps to sell them.
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Randomly generated aliens
I see a helmet and wheels on the fourth one. A Pharmula One car! The race for the cure on a microscopic scale.
Anyone a crappo to bump into the virus crowd?
Anyone a crappo to bump into the virus crowd?
Re: Randomly generated aliens
Cheers fellas. Here it is bundled into a .tap (zipped and unzipped options):
http://stonechatproductions.co.uk/zxgam ... erator.tap
http://stonechatproductions.co.uk/zxgam ... or.tap.zip
Press 'h' for tapered horizontal sprite, 'v' for untapered space invaders alien, or just for you hikoki - 'c' for a car!
http://stonechatproductions.co.uk/zxgam ... erator.tap
http://stonechatproductions.co.uk/zxgam ... or.tap.zip
Press 'h' for tapered horizontal sprite, 'v' for untapered space invaders alien, or just for you hikoki - 'c' for a car!
Re: Randomly generated aliens
Works quite well.
Not sure what tweaks you could make to make them look different from each other. Maybe a different set of masks to generate 'pincers' rather than tapered noses. (If you get what I mean).
Not sure what tweaks you could make to make them look different from each other. Maybe a different set of masks to generate 'pincers' rather than tapered noses. (If you get what I mean).
My Speccy site: thirdharmoniser.com
Re: Randomly generated aliens
Aye you could alternate between masks for variety. Clipping the back a bit if you wanted to make something more uridiumy or xenony.
I'm not sure what else there could be, but it looks like there's not much that can be done beyond random bytes and symmetry.
Re: Randomly generated aliens
These look really good!
Are they really just random bytes, or is there an algorithm to restrict the changes from one row to the next?
Are they really just random bytes, or is there an algorithm to restrict the changes from one row to the next?
Re: Randomly generated aliens
Other than a tapering nose mask, these are just random bytes and symmetry. In previous attempts, I put in all manner of checks and twists with no discernible benefit (things like don't insert a zero, and try inverting or negating the byte every so often).
This is addictive! I can't stop watching!
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Randomly generated aliens
Bloody smooth, too!
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Randomly generated aliens
truly terryfying and very R-Type-esque insects, pigs, robots, warriors, xenomorphs.. not for the faint of heart
What about fish?
What about fish?
Re: Randomly generated aliens
Smooth...! Though what happens when a player scores over 99,999,999?
I guess you could even set a seed for the generation of the graphics so that the same 'sequence' of ships gets created?
My Speccy site: thirdharmoniser.com
Re: Randomly generated aliens
Broilliant! What about an all-you-can-eat mode aka buffet libre? the player would press a key to run into that bug again.I guess you could even set a seed for the generation of the graphics so that the same 'sequence' of ships gets created?
Hehe this reminds me of the alexa thing, please serve me "toothy bugeyed seafood"
Re: Randomly generated aliens
Lovely!
This is addictive! I can't stop watching!
If you could also generate behaviours* based on the random sprites then you could make an interesting endless-shooter. The gameplay of this could be fun - you'd see the enemy wave appear and then have a split second to try to figure out their behaviour. Over time the player would get better at guessing how the behaviour algorithm worked and thus a better chance at surviving for longer.
* Some simple ideas:
- Sprites with more pixels overall move slower than ones with fewer pixels
- Sprites with lots of pixels in the central "spine" tend to move straight forward, others move up and down too
- Annnndddd.. I'm out of ideas already, but hopefully you get my idea
Re: Randomly generated aliens
It could be smoother! These sprites are preshifted in 2 pixel jumps. However I'm pleased that nowadays I can easily get 5 sprites and all the necessary into 1 frame. I know that's not a big technical achievement, but I used to really struggle to fit the sprite draw/delete in time.
A message pops up saying "Hello clebin"
That would be as easy as a RANDOMIZE statement. As long as nothing else is using that RN generator subroutine, you can just set the same seed and get exactly the same again.I guess you could even set a seed for the generation of the graphics so that the same 'sequence' of ships gets created?
I like the idea of a 'like' key. It's probably beyond what I'll be using it for this time, but I think that would work well as part of a blind spritemaker routine. You 'like' (or collide with?) the one you like, and that becomes the seed to breed and mutate from.
Re: Randomly generated aliens
Cheers. That's a great idea. I can only add colour as an indicator of something.evilpaul wrote: ↑Mon Nov 09, 2020 11:22 am
Lovely!
If you could also generate behaviours* based on the random sprites then you could make an interesting endless-shooter. The gameplay of this could be fun - you'd see the enemy wave appear and then have a split second to try to figure out their behaviour. Over time the player would get better at guessing how the behaviour algorithm worked and thus a better chance at surviving for longer.
* Some simple ideas:
- Sprites with more pixels overall move slower than ones with fewer pixels
- Sprites with lots of pixels in the central "spine" tend to move straight forward, others move up and down too
- Annnndddd.. I'm out of ideas already, but hopefully you get my idea
The example seen in the picture will feature as part of something else in Woot this December, so I won't be able to include many ideas (you'll see why), but this is something for a standalone project next year.
Re: Randomly generated aliens
Have you considered a 16x16 version of "the blind spritemaker" - which is excellent by the way.
CLEAR 23855
Re: Randomly generated aliens
Cheers. I did a 16 x 16 version years ago, but I wasn't happy with it enough to release it. I'll have another bash when I get a sec. I don't know about you, but I struggled to breed a decent shape with the UDG version, a 16 x 16 one should work a lot better.
Re: Randomly generated aliens
I'm going to spill an idea I'm probably never going to get round to now...
The title of the game should be something corny like "Abey Seedy and the Eyeff of Gee" (or something really sweary) but the the player can edit the title to be "Something Something and the Something(s) of Something. You have all the fonts to display whatever the user types in as a snazzy title (maybe limit each word to 10 characters, maybe have a few fonts on standby and pick different colours) then you combine the characters to form the seed of the random number that generates the levels.
Be careful, maybe use different seeds for different jobs; don't tie that particular random number generator to a timer or other user input, and always re-initialise it at the start of the game. The idea is that anyone who types in that same title on any machine gets exactly the same game (down to title presentation, attack waves, everything), then people can share their favourite titles and compare hi-scores.
For a bit more variation, have some random scenery chunks ready to throw at the player too. But select a theme with the random generator too (e.g. top or bottom mountains or both, machinery, biological junk, angular slopes/columns, free-floating asteroids) as well as any randomisation of the graphics. Maybe have some pre-drawn shapes in different styles and randomly assemble them into larger scenic chunks..?
The title of the game should be something corny like "Abey Seedy and the Eyeff of Gee" (or something really sweary) but the the player can edit the title to be "Something Something and the Something(s) of Something. You have all the fonts to display whatever the user types in as a snazzy title (maybe limit each word to 10 characters, maybe have a few fonts on standby and pick different colours) then you combine the characters to form the seed of the random number that generates the levels.
Be careful, maybe use different seeds for different jobs; don't tie that particular random number generator to a timer or other user input, and always re-initialise it at the start of the game. The idea is that anyone who types in that same title on any machine gets exactly the same game (down to title presentation, attack waves, everything), then people can share their favourite titles and compare hi-scores.
For a bit more variation, have some random scenery chunks ready to throw at the player too. But select a theme with the random generator too (e.g. top or bottom mountains or both, machinery, biological junk, angular slopes/columns, free-floating asteroids) as well as any randomisation of the graphics. Maybe have some pre-drawn shapes in different styles and randomly assemble them into larger scenic chunks..?
Re: Randomly generated aliens
Exactly what I thought.
Then color encoded tokens for weapons/ lives/ shields, shuffle them at the start of game session and you have roguelite shmup.
Proud owner of Didaktik M
Re: Randomly generated aliens
Yes, I've always wanted to take the 'Rogue' style further, with dungeons more like those of a Zelda game, where the layout of a (randomly-generated) dungeon maze is carefully 'gated'. By which I mean that there are specific objectives to achieve down side-branches, to allow progress along the primary path.
At a simple level, there'd be a locked door obstructing you part-way along the main path through the maze, and a generic dungeon key placed down one of the dead-ends on your side of the door. It'd need careful tracking and probably some quite complex logic to work out where such obstructions can be placed, how many dead-ends can be exploited beforehand, and whether to put keys, treasure, magic-lock-tokens of some kind, or switches down each one. Maybe even trimming off dead-ends if there are too many. You could also have a type of gateway or obstruction that needs a specific tool-weapon to get past, then you guarantee to place the weapon (like a key) before the point it's needed.
It might also be neat to make the maze as a map of cells on a grid, then combine some of those cells into larger scrolling areas if they are all joined by open doors anyway. And impose restrictions to get particular shapes of mazes when you look at the map, or impose symmetry, or place the final room at the top.
Problems come if you place locked doors down side-branches, as you may use a key on the main path and miss a side-branch (a side-branch where you could have got another key), meaning that part of the maze is forever inaccessible. There's a bit in the Gerudo maze in Ocarina of Time that's like that, although it's not game-breaking. You just miss a bit of treasure and another key, which would be used up anyway.
At a simple level, there'd be a locked door obstructing you part-way along the main path through the maze, and a generic dungeon key placed down one of the dead-ends on your side of the door. It'd need careful tracking and probably some quite complex logic to work out where such obstructions can be placed, how many dead-ends can be exploited beforehand, and whether to put keys, treasure, magic-lock-tokens of some kind, or switches down each one. Maybe even trimming off dead-ends if there are too many. You could also have a type of gateway or obstruction that needs a specific tool-weapon to get past, then you guarantee to place the weapon (like a key) before the point it's needed.
It might also be neat to make the maze as a map of cells on a grid, then combine some of those cells into larger scrolling areas if they are all joined by open doors anyway. And impose restrictions to get particular shapes of mazes when you look at the map, or impose symmetry, or place the final room at the top.
Problems come if you place locked doors down side-branches, as you may use a key on the main path and miss a side-branch (a side-branch where you could have got another key), meaning that part of the maze is forever inaccessible. There's a bit in the Gerudo maze in Ocarina of Time that's like that, although it's not game-breaking. You just miss a bit of treasure and another key, which would be used up anyway.