I've been in this class for a semester now, and have been struggling to complete my previous projects. My class is actually supposed to be an introduction to programming using visual basic, but my teacher thought it would be more beneficial to learn processing. I have received this project a few days ago and it is due Friday, so I want to get it finished as soon as possible. For my previous two projects, I have been able to start with some code and some people on here have been able to help me fix what I've done wrong or add things that I didn't know I was missing, and I am very grateful for everything people on here have taught me.
For my final project, I have to create a slider puzzle, and this is the link my teacher gave me as an example.
What I am asking for is some help, but I do NOT want someone to just type out the code for me. I would appreciate it (and I know a lot of you probably do not have all the time in the world to sit around on a forum and help me) if someone would be able to give me a mini tutorial of some kind, maybe just to help me start. I really really want to understand how this works so if anyone can offer me some advice, that would be wonderful. Thank you to anyone who is willing to help.
Ok, I've been posting in another topic about a project I've been working on, and I'm almost done with it but I've hit a roadblock on probably one of the most important parts. I've been making a mini version of Frogger for class, and everything else was working decent enough, but when trying to create a collision I messed something up and now I can't get the game to work at all. I know what part of the code messed up the game and can take it out to make it run again, but my question is this...
How can I correctly make it so that if my frog collides with the car, I can display the frogsplat.gif. I'm also trying to make it so the frog cannot be moved once it has either won or been killed. I have a boolean in there and I keep getting an error message once I tried to create...something...but I'm really confused with this at the moment, and hopefully someone can help me debug this and tell me what I'm doing wrong to get this error. Thanks in advance for anyone who can help.
Here is my code, I have 3 seperate classes
Frogger (I'm getting a nullerpoint exception here, it highlights frogLeft = frog.x)
final int WIDTH = 200;
final int HEIGHT = WIDTH;
final int MIDDLE = WIDTH / 2;
final color BLACK = color(0);
final color RED = color(255, 0, 0);
final color GREEN = color(0, 255, 0);
final color BLUE = color(0, 0, 255);
final int CAR_WIDTH = 30;
final int CAR_HEIGHT = 10;
int frogx = MIDDLE;
int frogy = 170;
PImage frogimg;
PImage frogdeadimg;
Car car1;
Car car2;
Car car3;
Frog frog;
boolean livefrog = true;
void setup()
{
size(WIDTH, HEIGHT);
rectMode(CENTER);
car1 = new Car(RED, 0, 100, CAR_WIDTH, CAR_HEIGHT, 2);
car2 = new Car(GREEN, 50, 50, CAR_WIDTH, CAR_HEIGHT, 1);
car3 = new Car(BLUE, 150, 150, CAR_WIDTH, CAR_HEIGHT, 2);