------------->>> Infinite Tile Scroller <<<---------------- I would appreciate it if you read everything before commenting. Thanks! ------------------------------------------------------------------- Alright so don't get excited--this is not a real game. I was just experimenting and in all honesty, I kinda need help. I had NO idea what I was doing or getting into when I started this project. -------------------->>> Instructions <<<------------------- - Arrow Keys to move - Click to place - 9 to erase all - A and D to change tiles --------------------->>> Storytime <<<------------------- (The part where I get way too familiar with my keyboard and the sounds it makes) ------------------------------------------------------------------ The story of this project began when I was playing one of @griffpatch's newest games, Appel. I was intrigued at how such tile scrolling could work so flawlessly, and my aim was to recreate something similar so I could perhaps rework previous engines to run smoother and more efficiently. So I asked @griffpatch how he was able to get this to work, and he assisted me in showing how you clone an initial amount of clones (depending on the size of the tile) and the tiles actually cycle round each other like a conveyer belt when you scroll. He went into further detail on how to accomplish this, but I had it down. -------------------->>> My Issue(s) <<<---------------- However, I reached another roadblock: collisions. My first idea was to have some tiles have the word "solid" or "collision" in their costume name so that this would indicate a collision tile. This worked. I then made a red test tile to function as my collision. You can see these scattered throughout the world. I created the variable "touchingSolid?" (which is actually displaying itself) which has the job of detecting when the player is touching a solid tile. This was tricky to do, as I had to create one mechanism with the tile--the receiving end--and one mechanism with the player--the sending end--so that any tile could report that it was being touched, but only the player could report it was *not* being touched. The issue I had was actually making the collision work. Usually, in platformers or RPGs, you have a separate tile sprite/clone group which the player distinguished solely based off the sprite properties. However, I had already created 151 clones in the initial cloning process and did not want to waste any more. With the previous variable I had made, I tried to use it to calculate when the player was touching the tile. What was meant to happen was when the player interacts with a tile, he is pushed out of the tile. But this is easier said then done. I created a simple custom block that said when you move to the right, immediately check afterwards if you are touching a solid, and if you are, push the player out via 1 pixel in the opposite direction until it is pushed out instantaneously. The detection worked. However, the pushing did not. The game froze and pushed the player out. Admittedly, I know why this happened, which is because the block was to do it instantaneously (because it would just be unethical to do it slowly in game) but instantaneous blocks only update once they are finished (or reach a segment that tells them to update). My issue was, the "touchingSolid?" variable did not update during the loop that pushed the player out, causing the player to be pushed out very far after a severe FPS drop. I have been racking my brain with a way to fix this. This is where I ask for help: so any ideas? ------------->>> Stuff Coming Soon <<<---------------- Sooo uhh I guess I've been gone for a while because I'm super busy now... sorry about that. I probably will be less infrequent. I also have an attention span of about a week, so I will work really really hard on something for a week and then get inspired by something else but dOn'T wOrRy because another part of my cycle is that I always come back to stuff, even if my way of doing that is by reworking my previous design completely. Anyways, just to reassure you, I am still working on stuff, so here's a list of stuff that I plan to or am working on in the future: - Paper Mario - Mario Voyager - Link's Awakening - Tile Engine Here's some stuff that I am thinking about doing but haven't fully committed to yet. - Ocarina of Time 2D, (Platformer-Esque) - Overtake (This game where you establish a civilization and fight with people and...) Yeah I get it, you want me to finish a dang game. I'll do that sometime--I'm just busy. Well until the next time, goodbye! :)