[PWC38] Advent Calender

Hello Everybody, this is the 38th Weekly Processing challenge, the challenges are decided just to give you a prompt to test your skills so it can be as simple or as complicated as you have time to write!

Start Date : 28-10-2016 End Date : 05-12-2016 Post entries in the comments here.

This Weeks Challenge : Advent Calender, I am not sure how worldwide this is. But in the UK starting on the 1st of December we open one box a day until Christmas and there is usually a treat or chocolate inside each box.

Try to implement some variation of this in Processing to celebrate the start of Christmas.

Winners from last week : -Nicolai

submitted by /u/seoceojoe
[link] [comments]

[PWC38] Advent Calender

Hello Everybody, this is the 38th Weekly Processing challenge, the challenges are decided just to give you a prompt to test your skills so it can be as simple or as complicated as you have time to write!

Start Date : 28-10-2016 End Date : 05-12-2016 Post entries in the comments here.

This Weeks Challenge : Advent Calender, I am not sure how worldwide this is. But in the UK starting on the 1st of December we open one box a day until Christmas and there is usually a treat or chocolate inside each box.

Try to implement some variation of this in Processing to celebrate the start of Christmas.

Winners from last week : -Nicolai

submitted by /u/seoceojoe
[link] [comments]

Want to make 6 rectangles play 6 different .wave files?

Hi guys,

So i have made a basic sketch of a guitar with 6 strings and want the guitar to play 6 .wav files (named E.wav , A.wav, D.wav, G.wav, B.wav, ee.wav) Im pretty stuck at the moment and have just been messing around with the idea of playing the sound with the mouse is clicked at a certain Y position. If anyone could look at the could and possibly tell me what lines of code do I need to add to make this work?

Thanks so much

:::::::::

import processing.sound.*; SoundFile file;

void setup() { size(400,400); background (255, 253,208); //file = new SoundFile(this, "E.wav"); //file.play(); }

void draw() {

fill(0,0,0); ellipse(200, 200, 250, 250); fill(128,128,128); noStroke();

int stringThickness = 5;

rect (0,95,400,stringThickness); //E rect (0,135,400,stringThickness); //A rect (0,175,400,stringThickness); //D rect (0,215,400,stringThickness); //G rect (0,255,400,stringThickness); //B rect (0,295,400,stringThickness); //e }

void mousePressed() { if (mouseY >= 95 || mouseY <= 95 + 5) { println("E"); } else if (mouseY >= 135 || mouseY <= 135 + 5) { println("A"); }

println(mouseX + "," + mouseY); }

submitted by /u/hyrys
[link] [comments]

Hi! I really need help!

Hello!! I'm in my very first year of college and unfortunately for my slow self, I have a class focussed on Processing! It is a very basic course and we've only made it up to working with arrays... Well, almost everyone without including me haha

The final project is to make a very simple game with what we've learnt through the year with certain details assigned to each game, and... Well, I'm having lots of trouble with it, to say the least. I'm also working on the art for another videogame and basically handling the concept art for yet another videogame all on my own too, so I can't sit down and binge watch tutorials until I can work something through!

The basic idea for the videogame is for it to happen at a pizza place, where the cook throws pizzas at you and you're supposed to catch them in a box. Said box has to be opened when you're trying to catch a pizza, otherwise you lose a life! You can move your character with the arrow keys or your mouse. The game should have three levels, so the way to get through them is to catch enough pizzas as the game tells you. Other than that, how the difficulty is handled is up to yourself.

Any sort of help is greatly appreciated!!

submitted by /u/saitam95
[link] [comments]

Basic Problem – COM Port / Arduino

Hi,

I have used this code to determine the COM-Port:

import processing.serial.*; import cc.arduino.*; println(Arduino.list()); 

The results were: COM1 COM3

According to the Arduino IDE the correct COM Port is COM3.

But when I use the arduino_input example and change the code to

arduino = new Arduino(this, Arduino.list()[COM3], 57600); 

I receive an error message: "The variable "COM3" does not exist

If I change the code to

arduino = new Arduino(this, Arduino.list()[3], 57600); 

I receive the error message: ArrayIndexOutOfBoundsException: 3

Thank you for your advice and help in advance.

Passer

submitted by /u/passer_domesticus
[link] [comments]