*READ ALL* Feel free to use this as an engine or a tutorial for a platformer. I will explain the code and everything in the notes, so check, its best to learn why the code works, so that if you ever have to change it, you can patch it up properly. If you use, I ask that you credit me and all of these names: - @-Blueprints- (@Bilingual_Dude5) - @unhappiable - @DH7896 - @PercyJackson153 - @LOmishraS67 - @Miraclaw (me) it is partially their code, so please credit them. I also used griffpatch tutorials, but he doesnt require credit, I guess just credit him if you want? ---------------------------------------------------------------- thank you to those who have helped, I have given credit in my main game, right now there arent any glitches OK! I have everything figured out now, thank you to everyone who helped, I have already given credit! I got everything working, anyone who comes here feel free to use the code, I might actually make it a tutorial. the reason I did all of this was because griffpatches uses a different scroll style then what Im used to... and because I wanted to add a different camera logic (even while it scrolls, the player is capable of free walking) Im keeping this up to help anyone who wants to use it, however this is code I used in a game of my own. so to everyone who helped, no this wasnt what I would be using your code for. I just decided to keep this up so everyone could see what I learned about platforming
Code explanation!! Everything in this and its quality and definition Code contains: bottom- invisible wall to stand on; perfect endless pit- invisible wall that kills you; perfect walking- left and right, first movement layer; perfect portals- level end; depends on user ability water logic- movement changes in water; medium jumping- its a platformer; medium standing- cant fall through floor; perfect slope detection- cant go through walls; poor ceiling detection- cant go through ceiling; medium caps- player stays on screen at all times; depends on scratch scroll- open world, second movement layer; perfect death- increases difficulty; perfect cut-scene- activates a cut scene; depends on user ability momentum- speeds up as you move; depends on scratch off screen hiding- doesn't appear on screen edge; depends on user ability gravity- you can fall; perfect -------------------------------------------- rating meaning: perfect: best form of this code for this code style, works perfectly medium: works fine but either glitches sometimes or looks sloppy depends on scratch: Works here but will sometimes stop working in other projects for no reason depends on user ability: contains some things that will very for different sprites/projects, may not work for everyone poor: functions but has glitches and is worst version of this mechanic