Log In  

Cart #10086 | 2015-04-21 | Code ▽ | Embed ▽ | No License
11

Hi everyone! Here goes my first submitted thing : a recreation of the good old rotoscaling effect, quite known in the demoscene... scene... in way less than 1kb of code. I made it fit to a round 1kb by comments in the source code to explain some tricks about the calculation.

Rotoscaling is based on two things : rotation (good old cossin sin-cos) and scaling. I precalculate scaled sine and cosine tables according to the current angle in the update loop to gain some overall speed.

I programmed it on the alpha 0.0.5. I don't know if anything changed around to the speed/cpu usage but this should run quite quickly (don't expect 30 FPS neither, I couldn't make the pixel blit faster) on the 0.1 alpha.

I really liked playing with PICO and I'm not done at all with it! :D

P#10087 2015-04-21 13:14 ( Edited 2015-05-10 15:42)

COOOL!!!!! Can you show me the code used to make this effect?
I am bad at coding. I don't know what I am going to do with it but maybe I can do something.

P#10098 2015-04-22 11:59 ( Edited 2015-04-22 16:00)

I am base at coding, too. In fact, I don't really know how to code.

P#10102 2015-04-22 13:05 ( Edited 2015-04-22 17:05)

Sure, you can download and load the cartridge, but well, here goes the source code : https://gist.github.com/Eiyeron/47d9314700a4b131cca7

Have fun reading through it! ;)

P#10114 2015-04-22 16:12 ( Edited 2015-04-22 20:12)

Nice one dude, thanks for the share!

P#10568 2015-05-10 05:55 ( Edited 2015-05-10 09:55)

I wonder is there a way to optimise this? I guess that the 128 * 128 loop + "psetting" every single pixel manually kills the performence.

P#10571 2015-05-10 11:42 ( Edited 2015-05-10 15:42)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-18 17:43:40 | 0.011s | Q:24