Ok, here's my situation: I am making a top-down, grid-based sand castle game. The game terrain is comprised of a few hundred "sandTerrain" objects, each one of which is a tile on the grid. Each tile has a "height" value of 1 to 4, which is represented by the coloration of the tile.
I'm giving players the ability to either add height to the sand, or lower the height. They can hold down and drag the mouse button across the terrain to edit a line of sand. I am running into two problems with this:
1. If the player moves the mouse really fast, some squares on the grid are skipped, and instead of a full line of edited squares I have a dotted line. Which makes sense; the mouse is moving faster than the code is checking. I suspect that I'll need to learn about fast loops and use those to do this, but any other thoughts or techniques would be very appreciated.
2. Second, if the player is moving the mouse anywhere below max speed, the mouse hovers over an individual square long enough for the code to check at least twice, usually three or four times. This means that a piece of terrain at height 4 can be lowered down to height 1 faster than the eye can follow. Ideally, each single piece of terrain can only be raised or lowered once per mouse click. In order to make another change, the player would need to let go of the button they're holding, and then click again.
I am unsure of a good way to fix the second problem, so any advice would definitely be appreciated.
You can download a stripped-down version of my .cap file here:
http://www.mediafire.com/?yv3rhozqzrw
I am using Construct version 0.99.42