Path: utzoo!attcan!uunet!mcvax!enea!dkuug!freja!viggo From: viggo@freja.diku.dk (Allan Kim Schougaard) Newsgroups: comp.binaries.ibm.pc.d Subject: Making balls move with TC 2.0 graphics, a tough problem HELP Message-ID: <4343@freja.diku.dk> Date: 9 Jan 89 15:34:32 GMT Organization: DIKU, U of Copenhagen, DK Lines: 34 Hello, I have been trying to make a Breakout game for the EGA with TC 2.0 (just for the fun of it and to find out the if's and the how's of the TC graphics). Anyhow it turns out that it isn't very simple making things move with TC. First I tried just using circle and floodfill to make the ball, but that was to slow. Then I tried getimage/putimage with XOR_PUT option but that made the ball flicker. So I tried putimage(newx,newy,ball,AND_PUT); putimage(oldx,oldy,ball,XOR_PUT); putimage(newx,newy,ball,COPY_PUT); but this made the ball seem "long" in the moving direction, and it took an extra color for the color that appered after the AND_PUT. Then I got a new idea: let's capture a window around the old ball, big enough to hold both the old ball and the new ball, then put the new ball in the captured buffer and XOR_PUT the buffer on the screen. That would be fast, efficient and flicker less. But the way TC stores graphics internaly i awfull: The to first words (int's) in a capture is width and hight, according to the manual, but how they are messured isn't revealt. Then the graphics are stored in a strange way: byte no. 4 is the gray bits in the beginning of the first line of the picture, byte no. 5 is gray bits after the first bits... byte x is red in the beginning of the first line... byte y is green in... byte zzz is gray in the second line of the picture... and so on. So I haven't found a way to get my ball moving both fast and flickerless. Will someone PLEASE HELP me: HOW IS IT DONE ? Isn't there an easy way ? Please E-mail or post any solutions you might think possible, I am ready to try anything. (This is really geting on my nervs.) Viggo at DIKU Viggo@freja.dk