was8bit 2024-06-14 13:05 (Edited)
Drag finger to adjust speed....
X switches to drag mode, where you may drag individual pixel blocks around
Checkmark goes back to making and spinning pixels
Version 2x2 is a different format... use the older version if u prefer...
SP4CEBAR 2024-06-14 15:25
Cool!
was8bit 2024-06-14 15:32
Thanky :)
... not sure yet if it is usefull ... i am trying to see if there is an optimal arrangement for a 45 degree rotation ...
was8bit 2024-06-15 13:35
... you will note that version 2x2 has virtually no graphics... can u figure out how i have so many special graphics on the screen ;)
SP4CEBAR 2024-06-16 19:19 (Edited)
I think you used 52 sprites (8x8-4x3 = 52)
Also, I found an ATAN(DY/DX) which is notorious for causing unreliable programs that crash once in a while
I recommend you to use
SUB TO_POLAR( DX_TO_ANGLE, DY_TO_RADIUS )
DX = DX_TO_ANGLE
DY = DY_TO_RADIUS
CALL PYTHAGORAS( DY_TO_RADIUS, DX, DY )
IF DY_TO_RADIUS <= 0 THEN
DX_TO_ANGLE = 0
EXIT SUB
END IF
DX_NORMALIZED = DX / DY_TO_RADIUS
CALL CLAMP( DX_NORMALIZED, -1, 1 )
DY_DIRECTION = 1 + 2 * ( DY >= 0 )
DX_TO_ANGLE = ACOS( DX_NORMALIZED ) * DY_DIRECTION
END SUB
SUB PYTHAGORAS( RETURNS, A, B )
RETURNS = SQR( A*A + B*B )
END SUB
SUB CLAMP( RETURNS, LOW, HIGH )
RETURNS = MAX( LOW, MIN( HIGH, RETURNS ) )
END SUB
Note that the subprogram inputs are ordered DX first and then DY.
If DX and DY are both 0, the output radius is 0 and there will be no valid angle, so you could set the output angle of this subprogram to the INF value (0^(-1)
) which can be detected later (but this could lead to an unreliable program if you forget about it). I didn't find a way to detect the NAN value ((-1)^0.5
) later.
was8bit 2024-06-17 03:40
Yes, the math can be tricky, Thanks :)
I have yet to figure out the math to handle multiple balls … i know the math for one on one ball collision …. However when more than 2 balls hit, my math fails… and regardless of the # of balls, balls begin to stick to each other ….
I have always wanted math for just same sized carrom chips… they are not balls, so no spin or English, keeping the math very simple…
but I can never figure out how to use lowres basic code to get such a system to work correctly :(
SP4CEBAR 2024-06-17 11:40 (Edited)
So you want colliding circles? is it like this NX billiards game? The implementation I used makes the balls generate a repulsive force, this may be way too energetic
was8bit 2024-06-17 14:23 (Edited)
Its all close... but if you have ever played real American carrom, it has a specific feel, using plastic rings, all the same size... many of my extended family had this game and we played it a lot.. i still have mine ;) the board was waxed, but as it ages we sprayed the board with silicon to keep it slippery ... either way the rings could easily slide, and had great "bounciness" when they collided... much more active than the traditional wood set which i also have...
SP4CEBAR 2024-06-18 16:31
I saw you made carrom remixes of the billiards game linked above. I think you can get closer to that feel by reducing the friction and drag settings (the closer to zero the less friction), if the balls appear to have pinball levels of energy then you could adjust the repulsion force accordingly
SP4CEBAR 2024-06-18 16:34
Maybe I should've removed the massive repulsion force that occurs whenever the white ball falls into a hole...
was8bit 2024-06-18 17:15 (Edited)
I tried again to research ball colliions... it comes down to vector math... additionally it gets tricky as to how to handle all simultaneous collisions...
I am trying another test... failed...
... i like your system, but it doesnt have the same feel as American carrom ... when it comes to that game i get very finicky... in fact, there is NO existing carrom game in the Apple store that i like.. i "DO" have a copy i do like, but it is unplayable with current ios...it is still playable on my little ipad with ios 10.3 ... but the creator never upgraded it, so i keep my little ipad as 10.e JUST so i can play that game ;)
Here is Carrom Deluxe... it is traditional carrom
https://www.youtube.com/watch?v=zMqYp7ZPpJk
American carrom is different as the shooter is the same size and weight as the pieces you shooting at... it makes the game totally different..
SP4CEBAR 2024-06-18 21:15 (Edited)
I've tweaked the physics parameters to match the video: https://lowresnx.inutilis.com/topic.php?id=3365