List scrolling platformer [FIXED]
@Stage\n\ndefine convert (list) to string\nset [str return v] to []\nrepeat (length of [str v])\n    set [str return v] to (join (str return) (item (1) of [str v]))\n    delete (1) of [str v]\nend\n\ndefine convert (text) to list\ndelete all of [str v]\nset [list counter v] to [1]\nrepeat (length of (text))\n    add (letter (list counter) of (text)) to [str v]\n    change [list counter v] by (1)\nend\n\ndefine setup render\ndelete all of [mitdk's list platformer v]\nrepeat (13)\n    add [_________________________________________________________________] to [mitdk's list platformer v]\nend\nreplace item (6) of [mitdk's list platformer v] with [________________________________🙂________________________________]\nrender\nif <(item (1) of [spaces v]) < [-260]> then\n    delete all of [mitdk's list platformer v]\n    repeat (13)\n        add [] to [mitdk's list platformer v]\n    end\n    replace item (1) of [mitdk's list platformer v] with [                                                           You Win!]\n    replace item (2) of [mitdk's list platformer v] with [                                                  Thanks for playing!]\n    replace item (3) of [mitdk's list platformer v] with [                                                              🙂]\n    stop [all v]\nend\n\nwhen flag clicked\ngenerate world\nforever\n    if <(item (1) of [rows v]) < [-45]> then\n        generate world\n    end\n    if <(letter (34) of (item (7) of [mitdk's list platformer v])) = [~]> then\n        if <[0] < (y vel)> then\n            change [y vel v] by (-0.2)\n            set [in air? v] to [1]\n            change y by y vel\n        end\n        set [y vel v] to [0]\n        set [in air? v] to [0]\n    else\n        change [y vel v] by (-0.1)\n        set [in air? v] to [1]\n        change y by y vel\n    end\n    if <(letter (34) of (item (7) of [mitdk's list platformer v])) = [∆]> then\n        generate world\n    end\n    if <(letter (34) of (item (7) of [mitdk's list platformer v])) = [=]> then\n        set [y vel v] to [0]\n        set [y vel v] to [1.2]\n    end\n    if <(letter (34) of (item (5) of [mitdk's list platformer v])) = [~]> then\n        set [y vel v] to [-0.1]\n        change y by y vel\n    end\n    if <(letter (35) of (item (6) of [mitdk's list platformer v])) = [~]> then\n        change x by [3]\n    end\n    if <(letter (32) of (item (6) of [mitdk's list platformer v])) = [~]> then\n        change x by [-3]\n    end\n    if <key (right arrow v) pressed?> then\n        change x by [-3]\n    end\n    if <key (left arrow v) pressed?> then\n        change x by [3]\n    end\n    setup render\n    wait (0) seconds\n    if <<key (up arrow v) pressed?> and <(in air?) = [0]>> then\n        set [y vel v] to [0.8]\n    end\nend\n\ndefine add platform (starting y) (spaces) (content)\nadd (starting y) to [rows v]\nadd (spaces) to [spaces v]\nadd (content) to [content v]\n\ndefine generate world\ndelete all of [content v]\ndelete all of [rows v]\ndelete all of [spaces v]\nset [in air? v] to [0]\nset [y vel v] to [0]\nadd platform [13] [26] [~~~~~~~~~~~~~~~~]\nadd platform [17] [45] [~~~~~~~~~~~~~~~~]\nadd platform [21] [50] [∆∆∆∆∆~~~~~~~~~~~_____________________________>>>_________________________>>>]\nadd platform [26] [80] [===============]\nadd platform [27] [80] [~~~~~~~~~~~~~~~]\nadd platform [31] [96] [_____________________________________~~~~~~~~~~~~~~~~~~∆∆∆∆∆~~~~~~~~~~~∆∆∆∆∆∆∆∆∆∆]\nadd platform [34] [180] [~~~~~~~]\nadd platform [37] [190] [~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~∆∆∆∆∆∆∆∆~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~∆∆∆∆∆∆∆∆∆∆~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~∆∆∆∆∆∆∆∆~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]\n\ndefine change y by y vel\nset [counter v] to [1]\nrepeat (length of [rows v])\n    if <<((item (counter) of [rows v]) + (y vel)) < [7]> and <[7] < (item (counter) of [rows v])>> then\n        if <<[33] > (item (counter) of [spaces v])> and <[33] < ((item (counter) of [spaces v]) + (length of (item (counter) of [content v])))>> then\n            set [y vel v] to ((item (counter) of [rows v]) - (7.8))\n            replace item (counter) of [rows v] with ((item (counter) of [rows v]) + (y vel))\n            change [counter v] by (1)\n        else\n            replace item (counter) of [rows v] with ((item (counter) of [rows v]) + (y vel))\n            change [counter v] by (1)\n        end\n    else\n        replace item (counter) of [rows v] with ((item (counter) of [rows v]) + (y vel))\n        change [counter v] by (1)\n    end\nend\n\ndefine change x by (x)\nset [counter v] to [1]\nrepeat (length of [spaces v])\n    replace item (counter) of [spaces v] with ((item (counter) of [spaces v]) + (x))\n    change [counter v] by (1)\nend\n\ndefine render\nset [counter v] to [1]\nrepeat (length of [rows v])\n    set [space v] to []\n    repeat (item (counter) of [spaces v])\n        set [space v] to (join (space) [_])\n    end\n    replace item (item (counter) of [rows v]) of [mitdk's list platformer v] with (join (space) (item (counter) of [content v]))\n    if <(item (counter) of [spaces v]) < [0]> then\n        convert (item (item (counter) of [rows v]) of [mitdk's list platformer v]) to list\n        repeat ([abs v] of (item (counter) of [spaces v]) )\n            delete (1) of [str v]\n        end\n        convert (str) to string\n        replace item (item (counter) of [rows v]) of [mitdk's list platformer v] with (str return)\n    end\n    set [space v] to []\n    repeat ((65) - (length of (item (item (counter) of [rows v]) of [mitdk's list platformer v])))\n        set [space v] to (join (space) [_])\n    end\n    replace item (item (counter) of [rows v]) of [mitdk's list platformer v] with (join (item (item (counter) of [rows v]) of [mitdk's list platformer v]) (space))\n    if <[65] < (item (item (counter) of [rows v]) of [mitdk's list platformer v])> then\n        convert (item (item (counter) of [rows v]) of [mitdk's list platformer v]) to list\n        repeat ((length of (item (item (counter) of [rows v]) of [mitdk's list platformer v])) - (<(item (counter) of [rows v]) < [10]> + (64)))\n            delete (join [last] []) of [str v]\n        end\n        convert (str) to string\n        replace item (item (counter) of [rows v]) of [mitdk's list platformer v] with (str return)\n    end\n    if <([floor v] of (item (counter) of [rows v]) ) = [6]> then\n        convert (item (item (counter) of [rows v]) of [mitdk's list platformer v]) to list\n        replace item (33) of [str v] with [🙂]\n        convert (str) to string\n        replace item (item (counter) of [rows v]) of [mitdk's list platformer v] with (str return)\n    end\n    change [counter v] by (1)\nend\n\n
Hi, after making my list platformer, i set my mind on making a scrolling version of it. So, here it is, my list scrolling platformer! use the arrow keys to move. Since i am using characters, the platformer can be a bit confusing so here is a quick explanation:\n\n'~' = ground\n'∆' = spikes\n'=' = trampoline\n'_' = empty space\n'>' / '<' = does nothing, telling you to go that way\n\nThat's all! Enjoy!