Discuss Scratch

mcjohnso
Scratcher
47 posts

Recursion Based Platforming Engine

How this project came along:
I was browsing through my old projects, and I found a platforming base. It used tons of “if” blocks, and was completely impractical. I thought I would redo it with recursion (now that functions are in scratch). This is the result.

Terms of use:
If you are going to use this engine in your project, either give credit to me, or use the “remix button”.

Link to project:
http://scratch.mit.edu/projects/12993971/#player

Credits:
trueGamerz, for reducing lag, and cleaning up the code a bit.


Also, I may turn this into an easy to use custom block that can control speed jump height and such.

Last edited by mcjohnso (Oct. 7, 2013 00:40:13)

mcjohnso
Scratcher
47 posts

Recursion Based Platforming Engine

If anyone is wondering what recursion is, its when a function refers to itself in the function definition. A simpler way of putting that is: When you create a custom block and then use that custom block within itself, you get recursion.
mcjohnso
Scratcher
47 posts

Recursion Based Platforming Engine

I would love it if some people would use this in their project,. (bump)
mcjohnso
Scratcher
47 posts

Recursion Based Platforming Engine

*bump* again. I just need opinions on this, just give me a fair chance. I usually wouldn't bump like this but…
Locomule
Scratcher
1000+ posts

Recursion Based Platforming Engine

From what I read, recursion is best to be avoided because it will work for a while but eventually crashes Scratch, possibly more so on some systems than others.
mcjohnso
Scratcher
47 posts

Recursion Based Platforming Engine

Locomule wrote:

From what I read, recursion is best to be avoided because it will work for a while but eventually crashes Scratch, possibly more so on some systems than others.
Very strange. I wonder why that is, recursion could be very useful for pathfinders.
Locomule
Scratcher
1000+ posts

Recursion Based Platforming Engine

Most of the pages I find now are for it. Here is the one that mentioned issues… http://scratch.mit.edu/discuss/topic/15346/?page=1

But now that I read page 2, it looks like he was wrong. Sorry! heh

Last edited by Locomule (Oct. 8, 2013 19:18:14)

Powered by DjangoBB