Hi. I’m pretty new to Processing and I want to add a score keeper to my game. The object of the game is to hit the ball back and forth with different levels: easy, normal, hard, and extreme. I want to add make the score go up each second. I’m not familiar with the millis function, and I need help. I want the level easy to only get half as many points per second while keeping the ball on the screen as normal, and stuff like that. Here is my code if you need it(don’t worry about the IMG):
boolean go;
float x, overX1, overX2, size1, size2, speed;
PImage img;
void setup() {
size (1100, 700);
img = loadImage ("space.jpg");
x = width/2;
go = false;
}
void draw() {
background(img);
text ("To play hit the ball with the right and left arrow keys!", 156, 100);
text ("To make the ball start moving, hit a, s, d, or f. To reset the ball hit r!", 80, 135);
Hi, Im very new to Processing and i’m trying to make my first game. This isn’t gonna be a good game, i’m just trying to get basic things down. The game is kinda like pong, but worse; its just a ball and u have to press the button at the right time to stop it from flying off the screen. I have absolutely no idea on how to make a game menu for my game so when i press start the game starts, and when the game finishes it goes back there. Here is my code if you need it.