I've done a lot of searching and reading but so far have been unable to come up with an answer for this. Is there a way to call/load another .pde sketch from within a sketch? For example, what I want to do is have 4 mini games that can be called with one Processing sketch that has 4 buttons to load each game. Then each game would have a button at the end saying "go back to game choice menu" that would then load the original sketch.
Or, if this isn't possible, what would be the best way to accomplish this idea?
Hey everyone, I'm new here and new to Processing so please forgive me if this is a really dumb question.
I am making a simple version of the game Missile Command. I've created a class called Missile which draws one "missile" (an ellipse) on the screen from one point on the screen to another.
What I want to do is create a loop that will call my moveMissile function every x amount of seconds. Preferably the amount of seconds could be a variable I can work with, e.g. to create different difficulty levels in the game.
I can use an if loop to check if a certain time has elapsed to draw only one missile with this:
int time = millis();
if (millis() > time + 2000)
{
miss.moveMissile();
}
which happens one time at the 2 second mark. Beyond that though I'm stumped!