-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|247|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> AI and Movement


 
Pakz
Created : 15 February 2024
Edited : 15 February 2024
Language : Javascript

Worm like herds.

Gemini made a herd of wondering worm cattle









Version 2 :

Latest Update

Make by Bard or Gemini now. Animated worm blobs that might be fun as targets in a shooter.

The prompt :

Could you create a single html and javascript file that has a canvas. On this canvas a block is randomly positioned and this moves between 3 and 8 steps leaving a tail. 50 of these block snakes are then randomly added on the canvas but only added on the canvas if they touch no other blocks.

 

Comments


Thursday, 15 February 2024, 08:53
Jayenkai
Cool!
.. Now make a game out of it
Thursday, 15 February 2024, 09:07
Pakz
I was looking and thinking how to modify the drawsnake function to make it get to look like anything interesting. I added shadow for now. See the 2nd screen I just added.
Thursday, 15 February 2024, 09:23
Jayenkai
Stick some faces on them! Obligatory JSE edition
Thursday, 15 February 2024, 12:54
Pakz
I made a green blob version when at my Mum tonight. Updated the post.
Friday, 16 February 2024, 00:03
Pakz
I made a quick video of the progress this morning.


View on YouTube
Friday, 16 February 2024, 00:27
AndyH
Alien Syndrome! Looks great so far.
Friday, 16 February 2024, 01:31
Jayenkai
\o/yeay\o/
Saturday, 17 February 2024, 01:39
Pakz


I kind of kept working on the code. I added variable blob size. Base color mixing with individual colors. I might stil try and give each blob their own tail length.

The gfx is looking better than what I had initially imagined. Stil not 2D AAA

Here the current code (No assets needed)

Saturday, 17 February 2024, 02:07
AndyH
Honestly Pakz that is amazing. They do look like genuine little organisms. I would love to see this as some sort of game. Are you going to make into a game?

The other thing it reminds me of is Conway's game of life. Or maybe Populus.
Saturday, 17 February 2024, 02:17
Pakz
My back is stil painful. I can sit and work, or stand and do dishes for minutes before numbing pain locks in. My first goal now is to try and do the exercises until I can get through the day without problems. Sitting down for weeks or months just won't work now.

The code here I am making for later use. Learning how to build these type of npc's. I did have a idea this morning to add a controlable player blob with a kind of a canon on his back. But I would want explosions and other liquid splat effects and such
Saturday, 17 February 2024, 02:35
Jayenkai
Yeah, a nice twin-stick blaster would be nice with these.
I look forward to seeing the results
Saturday, 17 February 2024, 02:47
AndyH
Ah sorry about your back, I know how horrible that can be. Get well soon. Great to hear you will be doing something with this when you're able to.
Sunday, 18 February 2024, 00:53
Pakz


GPT4 really is something. I asked for some more more simulation. Then I copied the previous drawing routine into this example. Fish like tweak settings!