this doesnt really matter, but instead of a hard-coded terminal velocity you can use a formula where terminal velocity is X x=a/(1-f(friction coefficient)) therefore, if you want that terminal velocity to be -.5 and acceleration to be -.05 then you can have an f value of .9, multiply vertical velocity by .9
Really neat! I love pushing the limits of scratch. Do you have experience in written programming languages or have you learned how to program completely in scratch?
Also now I hat i think about it there is alot of benefits to using a ray tracer i have a 3d rendering that can run at like 700 fps but i cant get textures but using a ray tracer i can have textures and collision and it maybe i can render from a different camera perspective and display it somewhere else
Random update no one asked for: i gave up on trying to do textures and went back to using my original 3d engine but you videos gave me and idea i can check collision based on a grid system to cutdown on computation and it would just be easier to make maps
Thanks! Though this is not the highest level of 3D... raycasting is a very slow and low-quality method. I may make a tutorial on a better method of 3D, using triangles, at some point.
I post videos once a week. The next video will be a tile scrolling platformer expansion because I promised that a while back. Then next Sunday I'll post episode 4. Once a week is already pretty frequent; you must understand that real life exists for me as well.
I think you could improve your code in many way : 1. For the differents textures in a block, you could use a list to store each textures of each sides instead of using an « if » block for each textures 2. For the player collision, you could use the « AABB » collision check and some loops to check every colliding blocks ( because you only use axis-aligned cubes). Like that, you can avoid the big chunk of scratch blocks for every collision points and handle easily the collision of larger entities. I hope to help you improve your tutorials with my comment.
Thank you for your suggestions! 1. This is a good thought and I may yet implement it if I add more blocks which have different top/bottom textures. 2. Because the blocks are aligned on a grid, we only have to check collisions with the ones surrounding the player, and we know exactly which these are, using the "get block at" custom block. Thus, AABB collision, which checks collision with every block, is not necessary, and will be far slower.
The AABB collision detection is better for bigger entities ( if you add slimes for example), and I didn’t meant to check for every blocks, but only do every useful checks.
If you want more then 18 textrues in same costume you can make new block under rest and set the camera zoom in editer to equal button and select all and set it to their center of canvas and change the num textures variable to match how much textures you have.