I am making this game where a number on monsters are placed on a grid at random (DONE). Once the monsters are on the grid food will fall from the top of the grid (sky) at random and land somewhere on the grid. Sort of like tetris. I am having problems though getting and item to fall across the grid. Items just appear when i want them to slowly drop to its randomly given xy coordinates.
Any advice on a simple way to achieve this? Thanks.
First, do #include <windows.h>
Then in between each step of them falling into place do Sleep(1000);
This will cause the program to delay a second in between each dropping of food.
I hope this wasn't too general.
What type of game is this? Is in in the console, or does it have graphics using SDL, SFML, or similar? We need more information to answer you question. At least explain the process if the code is to lengthy to provide.