PixEngineForRPG_gamer_boi.wick (3.9 KB)
Alright… @gamer_boi, You might not understand the code, but here is some info about it…
This approach creates a huge table to store the green walls in memory. In this example, every table cell is 10px. See line 221 on the picture below… if the Whole screen/stage is 1920px,1080px, and if every table cell is 10px, then the table has 192 columns and 180 rows.
You can choose numbers less than 10, like 5 or 1, but the lower the number, the more PC memory requires… and also, more calculations are required if you choose a number like 1. I think 10 or 20 is better if your Map is 1920x1080 or more…
Now, why this number is important? If you choose 10, your minimum resolution to place your walls is 10px. This means that you shall place (x,y) your walls in multiple of tens… Also, the size of your wall shall be a multiple of that number… example:
As you noticed, these 4 numbers are multiples of 10… This is the only caveat.
What are the benefits? The player will only check every frame the table to see if he can move… so it doesn’t matter if you have 50 platforms or walls, he will only check if the desired position has data or not…
How to use it?
just place these green walls (remember the info above) in the screen at the COLS layer, and it will automatically register them into the Map table.