Log In  


PICO-8 + Nature of Code + ECS = piconoc.

Emergent ecosystem behaviors for agents in Pico-8. Based on Daniel Schiffman's "Nature of Code". Uses Entity Component Systems.

***UPDATE: 100% more player control of frog with arrow keys. Frog also eats nearby flies.

Cart #piconoc_ecosystem-8 | 2021-11-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

Hi! I want to simulate flies and frogs and lizards and spaceships and such in PICO-8. And I want to do so in ways that give surprising results. PLUS I want to refine my understanding of Entity Component Systems (ECS). This cart holds my efforts to do all those things.

Critters should be recognizable by their behaviors, not the graphics and/or sounds.

This is a very early learning project in process.

More details and source code;
https://github.com/camerongoble/piconoc

Critters in progress:

  • flies (implemented!)
  • frogs (implemented!)
  • rabbits
  • snakes
  • cows?
  • aliens?
  • Cthulhu?

When a fly hits the borders, it makes a "blatt" sound. Because flies make annoying sounds in real life. So authentic!

The framework will ideally make it possible to simply add data without lots of customized functions for each critter's particular behavior. I'm not there yet. But I'm getting there.

4


1

This is awesome!

For the past week or two, I've actually been working on an interactive pond ecosystem simulator with flies, dragonflies, fish, and frogs. Haven't ever worked with or heard of ECS before (even though Nature of Code is in my library... must've skipped that chapter) - thanks for putting this on my radar. :D

Will be keeping an eye on this project -- you did a great job creating readable and helpful sourcecode.

Cheers


1

Thanks, Professir! It's cool that we started doing this similar work in parallel. I'm interested to see the solutions you come up with.

ECS isn't in Nature of Code. It's just that NoC is so object-heavy and PICO isn't, I felt like it would be a good opportunity to give ECS a try, since it has its own way of connecting data with processes. Not object-like, really--a whole different thing. I'm happy to chat with you about it in the discord server any time.


1

This is lovely! You might be interested in looking at my cart “Hungry Bobs” — it’s not elegantly programmed or anything, but it’s another little ecosystem made from what you could call autonomous agents.
https://www.lexaloffle.com/bbs/?tid=42182

I look forward to seeing how your little ecosystem blooms :)


1

@camerongoble
I see, I see -- Definitely need to brush up on my architecture :D

I did stumble upon this https://github.com/JoebRogers/PICO-EC tonight and it connected a lot of dots. Still want to look into jesstelford's ECS that you linked. Wish I would've had some of this in mind before starting my sim -- or even any plan at all lol

Happy to chat in the discord if I catch you on there as well - and look forward to your future progress here


1

You have the makings of a game here, @camerongoble. You can do it a few ways.

  • To have a limited timer and eat endless insects. When the timer expires, that is your score.

  • Eat all the insects you want but avoid the RED ones. Three red ones and you're out. That is your score.


[Please log in to post a comment]