Update: was able to open it in Wine!
This is one of my favorite game/operating system/hallucination’s ever.
Thanks! This was helpful. Now I’m currently on my v4 and used your great tips for shrinking setting the enemy positions and having them move 4-ways only. I also used your tip to set the temp vars in init too.
I updated the code above.
I’m still having some issues with the GOTO jumps after reading a bit but getting stuck on the limitations with nested functions. I only want the enemies to move only one step rather than continuously and wasn’t able to get this to work correctly.
Okay, I’ve shaved off a bit more. In the end, I moved the score in the location of the ‘cat’s tail’ (let me shave off the last 2 chars.
r,x,y,f=rnd,3,3,1function _init()
e={}a=r(8)\1b=r(8)\1
for i=1,5do repeat e[i]={x=r(8)\1,y=r(8)\1}until e[i].x!=x or e[i].y!=y end m()end
function _draw()v=btnp()
if(v==2)x+=1m()
if(v==1)x-=1m()
if(v==4)y-=1m()
if(v==8)y+=1m()end function m()d=16for y=0,114,d do for x=0,114,d do
fillp(r(9999))rectfill(x,y,x+d,y+d,2)end end
?"▒",a*d+4,b*d+5,9
?"🐱"..f,x*d+4,y*d+5
for j in all(e)do
j.x+=r(3)\1-1
j.y+=r(3)\1-1
?"😐",j.x*d+4,j.y*d+5,8
if(j.x==x and j.y==y)stop()
if(x==a and y==b)f+=1_init()
end end
Thanks, this helps a lot. I’ve implemented all of these except the GOTOs. Can you explain more about how that works?
I added in checks to make sure monsters don’t start on top of player when new level drawn.
Current code, 507 chars:
r,x,y,f=rnd,3,3,1function _init()
e={}a=r(8)\1b=r(8)\1
for i=1,5do repeat e[i]={x=r(8)\1,y=r(8)\1}until e[i].x!=x and e[i].y!=y end m()end
function _draw()v=btnp()
if(v==2)x+=1m()
if(v==1)x-=1m()
if(v==4)y-=1m()
if(v==8)y+=1m()end function m()c=114d=16for y=0,c,d do for x=0,c,d do
fillp(r(9999))rectfill(x,y,x+d,y+d,2)end end
?"▒",a*d+4,b*d+5,9
?"🐱",x*d+4,y*d+5
?f,2,2
for j in all(e)do
j.x+=r(3)\1-1
j.y+=r(3)\1-1
?"😐",j.x*d+4,j.y*d+5,8
if(j.x==x and j.y==y)f=1stop()
if(x==a and y==b)f+=1_init()
end end
One of my faves from class! Love the creepy factor! The turning and movement work extremely well. This is great on fullscreen mode. In terms of your screen tearing, I didn’t test it myself but I wonder if basically you can restrict the camera to follow up to but not exactly to the edge.
I thtink there is a good balance of difficulty but maybe a little more tweaking could be done. THis is always a hard part: finding the ‘goldilocks’ challenge level.
Overall, really nice work.
Your images here look really nice! I agree that it is easy to quickly build a mess of colors. I think building up so you don’t make a mess of dense cloud of colors is a challenge and probably takes some practice. I’m trying to get better myself. Having some nice routines that you can return to and gradually morph between might be one way to deal with this. Naoto Hieda does a nice job of manipulating hydra in intentional ways that are sharp/precise. You could check out their videos and tutorials for some ideas.
There’s also nice ways to integrate hydra and p5 together! And Ted Davis has a nice interview with Processing on this. I also like this unique tutorial on text collage with p5 and hydra by nervous data.
Hey, excellent visuals and ‘polish’ to the gameloop with start and endscreens as well. As you mentioned, you would benefit here from balancing the challenge. It’s too easy! :p Some sound would be fun too. I love your use of dithermark to create variants.
One simple thing would be to add an attribute like flipped to each squirrel. If moving left then flipped should be true and you display the sprite facing to the left. Otherwise, display right-facing sprite.
You could load two versions of the image. Some game engines have a way to flip sprites. I don’t think p5 does natively but one option:
if (facingLeft){
//need to add push and pop if woven into a larger program since scale will affect other draw functions afterwards
scale(-1, 1)
image(img,-width/2,height/2);
} else {
image(img,width/2,height/2);
}
Heheh, Alfie really gets knocked around in that last one.
Nice work building little learning modules leading up to the final version. Also, great work integrating lerp() for some more natural movement. Now you have a nice bag of tools. This is some good pre-written code that can be adapted for lots of projects going forward. I think slowing it down and adding your own graphics and more of a procedurally generated environment would be obvious next steps if you wanted to go further with this kind of thing.
I love the variety of output (sizes, positions, amount) this produces! Obvious next steps are to have them move, maybe with perlin noise or perhaps another algorithm.
Could use a simple countdown timer similar to our life timer we did in the last class on particle systems for having animations like rolling up.
Good list of links! How’s it coming along?
Not to add more to your plate, but you may also like puzzlescript.
As we discussed in class, I really love this one, and my appreciation has grown for it over time too! A great procedural system. We talked about a lot of ways you could keep building on this, with different names appearing at different times, more random timer triggers, and maybe even different people and different positions they pop up, and more names available potentially. To have it work more ambiently with much longer time between the graff writer popping up would enter the more ‘screen saver’ realm, which I don’t mean as a negative here. IT might let this have some breathing room and work in a more exhibition context.
The trippy flower and green matrix are cool effects.
Take a look Javascript tips section of the Hydra book to see how you can place different subprocedures into functions that you can independently call. Might help you automate/build up a workflow for live performance:
Nice! The challenge level is about right. My high score:

This is a pretty faithful recreation of the original. I think it works pretty well. Some minor improvements would be consistent icons/images, add sound.
The movement works well. One thing to consider would be diagonal moving (and could be reused in other programs as well). If that was the case
I made a little example of one way that could work. There are more sophisticated ways as well:
//moving on a diagonal
let x,
y,
xspeed = 0,
yspeed = 0;
//i left out setup() boilerplate
function draw() {
if (keyIsPressed) {
if (keyCode == RIGHT_ARROW) {
xspeed = 2;
}
if (keyCode == LEFT_ARROW) {
xspeed = -2;
}
if (keyCode == DOWN_ARROW) {
yspeed = 2;
}
if (keyCode == UP_ARROW) {
yspeed = -2;
}
} else {
xspeed = 0;
yspeed = 0;
}
x += xspeed;
y += yspeed;
circle(x, y, 10); //or draw player here
}
Yeah, it’s a great idea to do more of these. Past Merveilles jams/projects include:
It’s kind of great to see the path of the penguins!

I enjoyed this one! The rotation adds a lot. It will be cool to start to add in other behaviors (flocking), or potentially a finite state machine. For example, maybe the penguins follow the season, nest, breed, offspring are born, fishing, swimming, etc.
I think this is a cool approach to data visualization explaining social conditions or communities, and love that you’ve focused on rap here. This is very much in line with the Rap Research Lab. You might dig their projects.
Rap Research Lab is a community-based creative technology studio that uses a Hiphop framework to develop new ways for people to engage with data and culture.
One of their projects was the Mapper’s Delight.
Red/blue can denote gang afiliation, not sure if you meant to refer to that but maybe other colors would remove this connotation.
P, this is incredibly cool! I love the idea to incorporate poetry in this. It’s brilliant. Here’s my recent run.

This is cool as-is, but one thing that did come to mind was the idea potentially to have text fade after a certain amount of time.
Really nice work.
I think you’d like the work in the HTML Review. And maybe we can brainstorm some ideas for the next issue of Random Walk.
Thanks for this step by step description. Nice approach to figuring out the northerly approach of the iceberg, trying things out, doing some research, and trying again. It’s a good way to try to figure out how to combine these two different ‘random’ noise generation techniques.
You may have to turn on markdown mode for your code in these devlogs!
This produces really nice output. I love the slow-moving icy little berg. I know you said you weren’t implementing collision detection here, but I thought I’d drop this useful link in case you’re interested later. It’s for Processing, but could be ported to p5.js (or maybe someone’s already done it). Here is the point/triangle collision detection algorithm.