News for hackers. Stuff that matters.
Re:P5.play by mgas on Wednesday August 03, 2022 @05:09PM (#32336690)
Anyone who wants to go into p5 for games or visualizations would be well advised to either read Dan Shiffman's book (as another poster mentioned) or check out his YouTube channel, and code along to his 10 minute challenges: https://www.youtube.com/watch?v=17WoOqgXsRM&list=PLRqwX-V7Uu...
Re:P5.play by dmarlow on Wednesday August 03, 2022 @04:48PM (#32336492)
Great work. The examples are fantastic. Code looks really clean, but there's quite a bit of magic going on that's not immediately understandable. For example, in the flappy bird clone, how are the pipes' placement determined?
Re:P5.play by ticklemyelmo on Wednesday August 03, 2022 @05:28PM (#32336839)
The playfield is a moving camera view on a static world.

The bird moves forward constantly, the camera follows the bird, and the pipes spawn at a fixed location one screen width ahead of the bird.

Re:P5.play by phonescreen_man on Wednesday August 03, 2022 @04:31PM (#32336358)
Just about finished Dan Shifmans nature of code book - I believe he is re-writing it for p5.JS Definitely worth keeping an eye on.
Re:P5.play by agloeregrets on Wednesday August 03, 2022 @03:39PM (#32335908)
There's a fun 2 person Pong demo under examples, It's remarkably hard to play both halves of pong at the same time.
Re:P5.play by pradn on Wednesday August 03, 2022 @01:57PM (#32334928)
I like this framework. It provides the next run of benefits for a graphics library, turning it into a game library. Perhaps the hierarchy, in order of increasing complexity, is:

* Drawing basic 2D primitives @ a specific frame rate, handling inputs

* Drawing image files and spritesheets

* A way to organize scenes/stages

* Collision detection

* Path finding

Re:P5.play by ChrisArchitect on Wednesday August 03, 2022 @04:50PM (#32336519)
(2015)

Still be maintained after much neglect, but it's 7 years old

Re:P5.play by batmansmom1 on Wednesday August 03, 2022 @03:55PM (#32336055)
I love this wow