Hello - I'm attempting to write a simple Xonix/Qix type game. It's my first try at Godot (Version 3.0.2). I am developing on Ubuntu 64-bit.
Here is my project source:- -
https://drive.google.com/file/d/1znAoO3NSjDY97NXqkCEqqGuATaOahJxR/view?usp=sharing
The code takes the design-time filled in rectangles (Polygon2D's) and generates a grid from them of filled in cells (160 x 100). There is then a routine that regenerates the rectangles to render from the cells in the grid.
The player can move around and fill sections by moving into the unfilled area and back into the filled area.
When he reaches the filled area again, his yellow "trail" finishes and the code executes to work out what area to "fill". This then generates more filled "cells" that are added to the grid... then the rects are regenerated from the grid again.
That's it...
It seems to slow down each time I fill an area and finish_trail() is called - and I can't figure out why! finish_trail() is not called excessively (where all the work happens) and the number of rects it is rendering is going up as I expect it to.
After only a few areas are filled, FPS goes down from 200+ to an unbearable 15. The more areas you fill, the slower it gets. :(
Any help much appreciated - Thanks!
PS. Incidentally - this does the same in Godot 2.1.4, but it is MUCH quicker in that, it seems much slower in 3.0.2 (so that's another issue I will need to solve). It still slows down over time, in both versions though.