Hi !
I finally managed to make sure it didn’t stop with “out of memory”. Resolved by resizing the textures. Although I don't understand the connection, why would that be a problem?
Innovation:
-So far as I found images of texture on the net, I put them in their original form in the game folder. I had to figure out that what is 5 high on the screen should be 5x pixels. What is 10 high is 10x pixels, so the size of the image should be proportional to the size used in the game. The quality of the textures can be adjusted universally at the beginning of the creator, and he will scale the raw images accordingly, taking into account their size used in the game. It was a good idea, the “out of memory” was eliminated, and the size of all the images created in this way was 20% of the size of the original, so that there was no noticeable deterioration in quality.
-Old object perception proved to be slow. In vain I divided the space into cells to examine only those objects that are close, for example, at 2,000 butterflies the whole thing slowed down… believe then at 20 fps 20x2000 butterflies per second x pl 30 objects, then the multiplication of 18000 x6, sin, cos… sir god. i threw out this solution and as it is, the creator fills a high resolution 3d bit matrix so a lot of computation is saved because with a simple situation proportional reading I get whether there is YES or NO material. So the size of the array will be hundreds of Mb, but well… something for something!
-I also refined the controls to make it more ergonomic. For example, if you are going against the wall, do not stop, but look for the angle so that you can pass. This is how all fps games work, so it was mandatory for me to solve.
-I thoroughly reviewed what calculations could be used to save time and simplify. During filming, I found something that was unnecessary in the old versions. I saved resources.
The result is that I feel like the engine that works very efficiently on _maptriangle has finally been born. When you start the game, you can see that there is no need to limit the number of maptriangles. The main cycle is set to 20 –fps (_LIMIT), but if you press the L button, it will release (no limit) and you can really see that everything is visible, lots of snapshots, animated images, and lots of resources left. This will be important later. It finally runs fast, flexibly, doesn’t crash.
https://drive.google.com/file/d/1xGQeHCFSs7_XIpQ9pv2u3N_NR2jPn-W4/view?usp=sharing