Computer Science Canada Issue with graphics |
Author: | Geostigma [ Fri Jan 18, 2008 10:02 am ] | ||||
Post subject: | Issue with graphics | ||||
I have been working on a program, generally recreating the game iceblocks. I have the game running, scoring and all that fun other stuff but I want to add an animation of a falling block. The general code of making a block fall from the sky in the right position is not the problem but the getting the rest of the pyramid to display while the block is falling from the sky. This is what my partner has done end animate
My syntax
Everything else works fine no matter what code we use but I am not sure how to display a block falling from the sky with out wiping everything else out. |
Author: | TokenHerbz [ Sat Jan 19, 2008 12:20 pm ] | ||
Post subject: | RE:Issue with graphics | ||
what exactly is happening? Is the block wiping out the picture it was previously drawn over? Is it not refreshing correctly? You should use View.UpdateArea(x1,y1,x2,y2) since your using graphics, it should make the program faster for the specific falling block animation. of course its a little trickier to use though. edit: you should capture the background of the block first, before you draw your picture over it. you can do this by:
|
Author: | Geostigma [ Thu Jan 24, 2008 1:40 am ] | ||
Post subject: | RE:Issue with graphics | ||
Yes the problem was the whole entire screen would fail to draw my backround, pyramid etc.. I tried different things but I can't get it to work. I would love to try the View.UpdateArea but it doesnt exsist. The screen clears, draws the backround, draws the falling block but erases the pyramid, then redraws everything. I know the cls and the view update is in the wrong place so it causes the block to replicate 700times but thats only because its in rough and not a concern EDIT i dont have the new v of turing, just updated and I have the View update area
|
Author: | Geostigma [ Thu Jan 24, 2008 2:05 am ] |
Post subject: | Re: Issue with graphics |
I'm just attaching my game, see whats up with it |