Hi everyone! For all who's looking for a basic platformer setup with gravity and stuff. Here it is! Hope this helps, and let me know if you find any bugs.
Nice little demo! I like how you have contained the code entirely within the player script.
A couple of minor bugs on collecting items:
If you press up you can collect items from the tile underneath
Jumping into items won't collect them
I think the second should be solved by making sure to call collect on a tile whenever you "goto" it. The first might require overriding collect on items or something.
It would be cool if you could make gravity accelerative, rather than falling one tile per interval the interval could decrease for every tile you have fallen and then reset on landing maybe. It would also be nice if the player actually jumped up through the tile directly above them too rather than warping immediately two tiles upwards. I imagine the code could get complex fast!
Thanks! I kept it as simple as possible so that it's readable and adjustable to peoples needs. So I didnt wanna add the complexity but people can ofcourse add that themselves if they use this! Hope it helps some
As for the bugs. I Will have a look at home. Thanks for trying it out!