forums

TNT Basic Forums > Programming Q&A
arkanoid like game
< Last Thread     Next Thread >
Author
Thread        Post A Reply

01-09-2003 17:43

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I was thinking of an arkanoid clone. I thought as the bricks to destroy as spirites. So i coded something as



sprite the bricks

repeat
sprite the ball,x,y,..
x=x+deltax
...
until mouse button

Drawing the bricks only at the beginning, without spriting them at every loop of the main repeat, hoping TNT would not redraw them at every frame.
But it seems as TNT DOES redraw them, and that of course slows down a lot.
Of course I could use draw picture insted of sprite for the bricks, but I loose some usefull stuff such as sprite off that leaves the background as it was.

Oh well, If that is so I must use the power and i' ll put zooming, twirling and scaling alpha channelled bricks...
:-)

01-09-2003 19:18

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Background

You could open another canvas with a copy of the background in, then draw your bricks as pictures and where they are hit, use the 'copy canvas' command to restore the background from the backup you made.

TNT has to redraw the sprites every frame so that any drawing operations you do to your background are drawn under the sprites (sprites are always in front of the background). That's the point of sprites really!

Hope this helps!

Mark

01-09-2003 20:13

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Ok

That sure is an idea. Another thing: The music in Beans, can I put it in a TNT Project? It' s cool!
Thanks

Matteo

01-09-2003 20:14

Posted by:
Danlab games

Click Here to Email Danlab games   Find more posts by Danlab games

you can take a look at Creepy mines..
the only sprite is the ball and speciale effect

If you found a good way for the ball collision..
me for Creepy, i used cos and sin when the ball collide a brick

01-10-2003 00:46

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Hmm, I think it' s not much of a problem ho handle collisions and rebounds with vertical and horizontal lines. You just put xvel (the x variation of the ball) =-xvel if it collides with vertical lines and yvel=-yvel if it collides with an horizontal.

Instead it was much tougher to handle collisions with a generically oriented plane, and there you had to use degrees and sin and cos.

I did a great game that you have a spaceship that does not shoot, but only rebounds enemy shots, and that is the only way to kill your enemies... Really Cool. You can play in 1,2,3 or 4!

If somebody wants it, you better ask it now cause maybe I' m gonna make it shareware in a while... :-)

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.