Would the objects be moving, or would they be in a fixed position?
If moving, I'd recommend using a class to represent them.
For something like in q9, where the items fall from above, I'd do something like...
class Item {
int type; // You could use a string for this, but ints would be more efficient.
double x;
double y;
Item() {
type=random(0, types); // Where you'd replace types with how many types there are. If you only need one, change this to type=0 or remove it entirely.
x=random(minX, maxX); // replace minX and maxX with the maximum and minimum x positions.
y=top; // Replace top with how high you want items to start.
}
}
And then the items would need to fall every so often, and updating a sound to represent their location would come in handy.
Of course, that's just the item definition. That doesn't actually run the game or anything.
看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
George... Don't do that.