Blood Typing Game Notes and examples


Collision Detection example

test007 for Android

//mouse states and mouse events on sprites
//click and hold the mouse button while hovering on the sprites

Sprites: is a p5.js library for the creation of games and playthings. provides a Sprite class to manage visual objects in 2D space and features such as animation supportbasic collision detection and resolution, sprite grouping, helpers for mouse and keyboard interactions, and a virtual camera.

The game running in the background was made with and it's about 100 lines of code. Check all the examples/tutorials. extends p5.js, a javascript library (and a community) that aims to make coding accessible for artists, designers, educators, and beginners. If you are not familiar with p5.js, you should start here. is built for accessibility and simplicity, not performance. It is designed to be understood and possibly modified by intermediate programmers. It is not a box2D-based physics engine, it doesn't use events, nor supports 3D. If you are looking for robust (but more complex) game frameworks I suggest or easel.js. is still in beta! To contribute or report bugs go to the github page.

Initiated by Paolo Pedercini | | @molleindustria

My local copy of the Examples

test002 This is working! It's an editied version of the first Animation

let img;
let url =

function setup() {
createCanvas(400, 200);

text("The image would be loaded below:", 20, 20);

loadImage(url, img => {
image(img, 20, 40, 100, 100);
(event) => {
text("Error: The image could not be loaded.", 20, 40);