Log In  

Cart #tekisimuna-0 | 2019-10-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#68691 2019-10-09 21:14

Plays smoothly.

The bat goes fast enough to catch the ball, which is good.

The bat doesn't accelerate so quickly and decelerate so slowly that you might end up sliding past the ball, which is good.

For the web player, it could do with three lines put in as a border at the start of every _draw, so that the black background and the black surround don't merge and leave the player guessing where/when the ball is going to bounce. This is true of many of the brick breaker and breakout games that have been up on the BBS lately. If it's not already in the code-to-be-taught (presumably it is), perhaps whoever is teaching that class could add it in at some point?

line(0,127,0,0,5)
line(0,0,127,0,5)
line(127,0,127,127,5)

(Snippet untested - I'm on an Android device at the moment.)

The line command (from memory) is:

line(x1,y1,x2,y2,colour)

The first coordinates x1,y1 can be omitted if there has already been a line command - the x2,y2 coordinates of that previous line are where a line with just a single set of coordinates will start.

:-)

P#68749 2019-10-11 06:32 ( Edited 2019-10-11 06:35)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-19 01:44:21 | 0.012s | Q:14