You could go a step further and add “local collision” as I like to call it, which would add enemy support and is less laggy (when done right).
However it’s pretty complicated, and you would have to rewrite the entire collision code and on top of that, you would need to add special collision data (which in your case would be 4X larger than normal level data)
Not to mention you would have to redesign all levels to add collision data, so I wouldn’t do that in this project if yours. But in your next platformer I highly recommend adding this system.
This project has this collision system, although it’s not very optimised, and could be improved, especially the enemy movement.
I was just surprised I was able to pull it off. Makes me wonder that FPS people will get now, but I unfortunately don’t have access to an older device that still supports playing the game. I can’t be sure if it even changed at all.
Last I could remember, your frame rate on mine was 53 FPS when the project first started, and so much got added in the past months. Safe to assume it was around 36-40 FPS for the longest time.
You can still access my older versions, so you’ll be able to see the difference in performance (once you have access to your old iPad, of course).
Moving some videos that don’t fit our guidelines - we’ll reach out with some clarifications, both publicly and privately, to help with any confusion surrounding what can and can’t be shared!
I added rotational support (also thanks to Awesome_E)
I fixed an issue where going to the left side of the screen to an angle of -90 would automatically set it to -270 when not intended to, causing multiple unexpected lines to be drawn through the mirroring axes (this was because at -90 and -270, the distance between the center on the y axis is 0, and the code sets the angle in both cases to 0 - reference). [1]
This was fixed by checking if the angle got set to -270, but was at the left side of the screen, then increasing the mirror angle offset by 180 if true. ↩︎
That’s really nice work and thanks for explaining too. Can you share a project link so I can take a look more easily?
I can also update the Mirror custom rule and credit you in Comment block, if we decide to add those optimisations and fixes.
In regards to rotational support, I am not sure yet of the changes, from the video, but the drawing is rotational symmetry by default — it will do rotational drawing and mirror each axis, so it’s doubled.
(Mirror was intentional, like this is basically Mirror Draw with custom number of axes, to let people play with parameters — but mirroring does also avoid accidentally having a symbol that has very negative associations, if you have rotational symmetry with 4 axes)
I think if you want to add more parameters, you could also have the user change the Center X and Center Y, or maybe even the rotation of the axis, though I could see how that can become confusing to someone who is just looking to mirror one thing horizontally
This would be hard to do, as various devices are different in size (meaning it would be hard to set the default parameter to the center of every screen (512x384, 683x512, etc.)).
a sort algorithm i coded. currently too slow (video is at 25x speed), i’ll adjust the sorting speed tomorrow to make exactly 6 sorts per frame, or 360 sorts each seconds