This site requires JavaScript, please enable it in your browser!
Greenfoot back

RcCookie's Comments

Back to RcCookie's profile

RcCookieRcCookie

2020/9/30

Thanks!
I‘m not to creative with games, but you can create one. Jut download the scenario and take a look into the source code, it explains how to use this.
RcCookieRcCookie

2020/9/29

Thanks!
RcCookieRcCookie

2020/9/19

Thanks! Btw, if you have a question on the code just ask
RcCookieRcCookie

2020/9/17

@Roshan Thanks!
RcCookieRcCookie

2020/9/17

@ninjapuffin Actually there are no „levels“, each level is generated exactly the same way
Let’s say your moving speed is 10 pixels per frame. If your tank has a rotation of 10 degrees, it would move 9.8 -> rounded to 10 pixels to the right and 1.7 -> rounded to 2 pixels down, resulting in a real move with the angle of about 12 degrees. If you again have a rotation of 10 degrees but only move 1 pixel, the tank will move 0.98 -> rounded to 1 pixel to the right and 0.17 -> rounded to 0 pixels down. In other words, your tank will just move straight, even if you move 1 pixel 10 times. What smooth moving does is saving the exact location you are theoretically at and displaying the rounded value. So if you move 10 times 1 pixel, it will have the same result like moving 10 pixels once, no matter at what angle.
I don’t mean it to move slower or anything, but if you move like 2 pixels per frame right now, you can only turn in 22.5 degrees steps, even if it looks smooth
It‘s fine At least you didn’t just say ‚Cookie‘ like most people