Tileset Engine V2.0

Finally! I come out with another version of the Tileset Engine! This is the 2nd version of my Tileset Engine.

I'm planning on helping @earthrulerr with his-I mean, his team's 2.5D game about war or something. I don't know. And how do I intend to do that?

I'm planning on using this engine to make the game. But the problem is that @earthrulerr is using Scratch which is less advanced than Snap!. So some blocks in my Engine don't exist in Scratch.

Okay maybe I won't be but...

All I need to add now to complete the engine, or make it functional for games, is basically adding collisions.

When making a game (Example: Platformer Test), I have to clear out the blocks every one frame, which is about 0.001 seconds (I'm rounding up 1/60), there are flicker issues with rendering. So I'd turn on turbo mode. But then collisions are not programmable.

I need help.

I found your issue, and how to fix it.

The big part is that you're using multiple loops to render the tiles. One of them has the clear block. This can desynchronize very easily. For example, it's clearing the screen while one script is rendering. And another issue is that you're clearing the screen at the end of the loop. The end of the loop is when the screen refreshes, so it'll always be cleared when the screen refreshes.

To fix these issues, just put all the rendering in one loop (and I've found that if you put it all in a block, it runs faster), then put the clear at the beginning of the loop. That way it clears the screen every loop, renders, then when the screen refreshes, the pen is still on the screen.

Here's my fixed project. Snap! Build Your Own Blocks

Well I kind of figured that out during my school's lunch time (12:15 to 12:54).

But I still need help in making a block that detects if a tile is touching another specific tile.

Since it's a tile based engine, it would probably be better to store the tiles in a table, then you can use that to then have math to detect collision. I'd suggest watching though griffpatch's tile scrolling platformer series for the collision, and other stuff. Yes it is for scratch, but you can use ideas from his tutorials and use them in snap (with a bit more modification).

The whole point of making my own TileSet Engine is to avoid tutorials and learn engines. I didn't want to copy someone's code and put it in my engine because, well, plagiarism and stuff. If I can copy part of said someone's code why not the entire engine?

And that's what I didn't want to do.

well, griffpatch's tutorial is meant for scratch, and that's why I said you can watch though it and incorporate the ideas. They are obviously going to be different in snap, so you would just be learning from it. Also, a lot of platformer engines use similar detection systems, not the same code, but the same idea.

I'm not forcing you to watch it, you can come up with your own code. I'm just saying, it can help to see what other people have done. The only reason I suggested griffpatch's tile scrolling platformer series, is because it's easy to understand, and he explains the concepts really well.