Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Brick breaker in Turing?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Lounia




PostPosted: Mon May 24, 2010 9:32 pm   Post subject: Brick breaker in Turing?

What is it you are trying to achieve?
I have to make a brick breaker game for my summative in Programming class.



What is the problem you are having?
I'm not sure how to animate the ball and the sliding bar,
or how to make the bricks disappear when the ball hits it.


Describe what you have tried to solve this problem
I tried using google, the Turing booklet, and this website and I've gotten nowhere Neutral


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
this is what I've got so far;

Turing:



setscreen ("nocursor")
setscreen ("graphics:vga")
setscreen("graphics:400;500")
var x1, x2, y1, y2, xc, yc : int
var x, vely, velx:int                                                                                                                                                                                                                                                                                                                                         
var c, t:int
var chars:int
drawfillbox (30, 450, 100, 480, 103)
drawfillbox (110, 450, 180, 480, 103)
drawfillbox (190, 450, 260, 480, 103)
drawfillbox (270, 450, 350, 480, 103)

drawfillbox (60, 400, 140, 430, 81)
drawfillbox (160, 400, 240, 430, 81)
drawfillbox (260, 400, 340, 430, 81)

drawfillbox (32, 350, 102, 380, 103)
drawfillbox (110, 350, 180, 380, 103)
drawfillbox (190, 350, 260, 380, 103)
drawfillbox (270, 350, 350, 380, 103)

drawfillbox (60, 300, 140, 330, 81)
drawfillbox (160, 300, 240, 330, 81)
drawfillbox (260, 300, 340, 330, 81)




Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon May 24, 2010 9:53 pm   Post subject: RE:Brick breaker in Turing?

Lets start with a sliding bar.

You need to be able to draw it (I see you know how to draw boxes already). You need to be able to read used input to control it -- Input.KeyDown is a good choice. You need to do this repeatedly, so you'd also need to place this all in a loop. You don't want it to move off the screen, so you might want to read up a bit about collision detection.

All of those concepts will also come in useful when you start dealing with a ball.

Turing Walkthrough is an excellent resource that will point you to a variety of great tutorials.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Lounia




PostPosted: Thu May 27, 2010 11:53 am   Post subject: RE:Brick breaker in Turing?

Thanks!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: