Computer Science Canada Some More Advanced Graphics - Skifree Backcountry |
Author: | GregLP [ Fri Nov 18, 2005 10:10 pm ] | ||
Post subject: | Some More Advanced Graphics - Skifree Backcountry | ||
I'm doing a remake of the classic game Skifree. Problem is that with all the moving objects, it's quite blinky with all the graphics, even with a delay. Any ideas?
The particularily troubling area is the draw scenery section. I'm trying to get it so that when the object goes off the screen, another one is redrawn randomly on the opposite side to fll in the map so it is an infinitely large hill. Don't mind some of the messy programming, I usually clean the stuff up when I'm done anyhow. G |
Author: | MysticVegeta [ Sun Nov 20, 2005 8:24 pm ] |
Post subject: | |
-> Use the jpegs instead of bmp, jpegs are compressed and will save CPU process and will actually run it faster and smoother. -> What do you mean by "when the object goes off the screen, another one is redrawn randomly on the opposite side to fll in the map so it is an infinitely large hill" |
Author: | iker [ Sun Nov 20, 2005 9:05 pm ] | ||||
Post subject: | |||||
What I think he means is that when a tree is far enough behind you, that it will dissapear and reappear infront of you? i guess... anyways, I used a code like that in my LFS game, so i can tell you say the trees are drawn at: tree(n)x, tree(n)y (n) representing a number loop the trees going upwards then when a tree reaches the top of the screen redraw it at the bottom
also, instead of putting a loop, then say when the skier's speed downwards is actualy the trees speed upwards lets say if you press the down arrow, the guy moves
|
Author: | [Gandalf] [ Mon Nov 21, 2005 1:28 am ] |
Post subject: | |
MysticVegeta wrote: -> Use the jpegs instead of bmp, jpegs are compressed and will save CPU process and will actually run it faster and smoother.
No. You may not have noticed, but jpegs are horrible for when you are using Pic.SetTransparentColor. Too bad Turing doesn't support pngs or gifs... |
Author: | ZeroPaladn [ Mon Nov 21, 2005 10:08 am ] |
Post subject: | |
you say the animation is flickery, maybe because you have about 3 or 4 different loops with animation, but only one of them has View.Update. the only animation loop that has the View.Update will not flciker, but the other ones will. My suggestions is to stuff your code into procedures, and make a main loop and then stick only 1 cls, View.Update, and delay in so the animation will stop flickering. that usually solves my problems.[/code] |
Author: | MysticVegeta [ Mon Nov 21, 2005 2:50 pm ] |
Post subject: | |
[Gandalf] wrote: MysticVegeta wrote: -> Use the jpegs instead of bmp, jpegs are compressed and will save CPU process and will actually run it faster and smoother.
No. You may not have noticed, but jpegs are horrible for when you are using Pic.SetTransparentColor. Too bad Turing doesn't support pngs or gifs... oh I didnt pay attention to transparent color command. |
Author: | GregLP [ Mon Nov 21, 2005 11:09 pm ] | ||
Post subject: | |||
I discovered what was wrong! It was all how I was drawing the pics. It seemed like the left edge of the screen was 'collecting' the pics and that gave me the hint that I should split up the drawscenery if statements into:
This solved my problem and now it's quite smooth. I just need to change my blasted pics back to bmp now!!!! Thanks for the suggestions. I broke my program into messy procedures and tried to improve efficiency. This proggy will prolly be quite CPU intensive after I add all the other stuff and possibly even more scenery g |