Log In  

Cart #30091 | 2016-10-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

Invader Maker

i originally wrote this for blitzmax back in jan of 2016.

The principle is the same:

[1] Generate 9-16 dots in a 4x8 field. (4-across cause it's mirrored when plotted later)
[2] Ensure all dots touch each other. (no stray dots)
[3] Mirror the field horizontally. (pixels 5, 6, 7, and 8)
[4] Then pick 2-random colors to paint it with. (no same colors)

Here is how it looks in BlitzMAX. Since the screen is a little over 1200 pixels across, you can get some nice detail, including a single pixel separation per bigger pixel to make it stand out better.

But ... back to the resolution of 128x128 w 16-colors - Press (Z) to draw a new set.

Found a sprite you like ? Work it into a game and let me know ! :)

P#30092 2016-10-05 19:43 ( Edited 2016-10-06 20:16)

Thanks man. Your codes are very didactic ... I learn alot from them!

Keep the god work!

P#30106 2016-10-06 04:29 ( Edited 2016-10-06 08:29)

amazing! every single one looks great!
wondering if there could be a way to animate them properly (like moving some 'random' pixels around)

here are a few related carts from the tweetjam section (food for thought):

Cart #24070 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Cart #24078 | 2016-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Cart #24633 | 2016-07-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Cart #29605 | 2016-09-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

P#30115 2016-10-06 11:51 ( Edited 2016-10-06 15:51)

This is great, thanks for porting it over to Pico8. It'll be a great source to copy from when we need some "alien" sprites or whatever.

I guess it could be easily translated down into 8x8 squares too, huh? Or any size, really.... if you're doing 4x8 and then mirroring to get 8x16, should just be able to generate 4x4 to get 8x8, and so on...hmmmm

P#30116 2016-10-06 12:21 ( Edited 2016-10-06 16:21)
:: dw817

Thanks, Hokutoy !

You know, I would really like to put comments on the end of every programming line in PICO, but there are just not enough characters to show them. Calculating you only have 32-characters across in a 128x128 screen, and most of that I'm already using for code, more so when I indent for loops.

Sure, I can put a remark on every other line, but that looks messy. Here's hoping future PICO allows for a standard editor w Truetype Font and colors.

Okay to keep the 128x128 resolution for runtime and file mode, however I would like a true editor where you can pick the size and shape of your fonts, like Courier pt16, full screen editor. This would DEFINITELY give me the room I need to add visible comments for all parts of coding.

And yes, I know there are some new GUIs floating around and while I haven't figured out how to get them to work, they are not 'official.' That is, ZEP has not worked them into his program - and that's the one program I'm going to be interested in as every update he makes would automatically include an advanced program editor that everyone has access to.

. . .

Hi MorningToast. Glad you like it. Tried out your 'makers' pretty neat ! Here's a suggestion. A face maker ? Maybe in a 15x15 field for a natural pixel center. Hair, Glasses, Beard, Ears, Earrings, Piercings, Eyeshadow, Rouge, Lips, Neck, Eyes, all kinds of things you could modify to make a face.

As for 4x4 to 8x8, then it just looks like a colorful fireball and not an Invader maker. :)

P#30118 2016-10-06 12:56 ( Edited 2016-10-06 20:06)

Really interesting approach with some really cool results. Thanks for sharing.

P#30130 2016-10-06 16:01 ( Edited 2016-10-06 20:01)
:: dw817

Random can get rather interesting in the right code and restrictions, Eoinmcg. A command you may not be familiar with yourself is SRAND(X).

With it, you can force the same random results to appear each time. What could this be used for ? A wide variety of things. :) I will definitely be exploiting this function later when consistent computer generated maps are needed.

P#30133 2016-10-06 16:16 ( Edited 2016-10-06 20:16)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-06-06 20:49 | 0.028s | 4194k | Q:66