Welcome back to the Figure Drawing Garden devlog. I had extra time this month and made a ton of progress. This is by far the largest and most important update so far. Once I've prepared a couple of sculptures, added a basic tutorial and a settings menu I hope to have a demo build up and running.

Since 2021 Figure Drawing Garden has had significant performance issues. These were caused by my lack of experience when first setting up the Sculpture Selection/Drawing Modes and the tile based Procedural Generation system. However with some time to really focus on the tool these last few weeks I worked on finally trying to fix these two issues. It became clear fairly quick that the simplest way to fix these was to simply rewrite them again from scratch.
I began with the tile generation system. The existing system generated a set amount of tiles defined in the inspector. For example 5x5 or 12x12. The problem with this was that it resulted in extremely long load times when the game first begins. It was also not infinite and I had no control over which tiles spawned next to one another.

I began working on a new system. This system would load quickly as it only needed 3x3 beginning tiles, be infinite and at least provide some control over conditional spawning (I haven't worked this out fully yet but am confident I can). To do this I simply created a base tile prefab with spawners surrounding it on all sides. When the player enters a collider inside the base tile, the spawners on all sides check if the tile is vacant and if so - spawn a new tile with more triggers and spawners inside it.

Everything contained within these new tiles along with the objects spawned at runtime (trees, grass, sculptures, fountains, etc..) are kept inside a 'contents' container within the tile. A script attached to the tile enables and disables this contents container as the player moves in and out of range. This means that only the couple tiles nearby the player are ever loaded at once, significantly improving performance. Below is a clip of the system spawning tiles as the player moves through the garden, unloading them when they're out of range.
Once the procedural generation was working I felt more familiar with C# and began tackling the Sculpture Selection and Drawing Modes system. The main issue with this was that I'd gone about checking if a sculpture was selected the wrong way. I had a script attached to each sculpture which checked if they were tagged as selected in an update function. This might have been passable with a couple sculptures in the scene but once I had a hundred sculptures loaded at once all running the update function it caused a ton of lag.

Again I decided to just rewrite the scripts from scratch. Now selection is done using a much more efficient raycast method. When the player clicks the script simply checks if the clicked object is a sculpture and if it is, it then sets that sculpture to selected. Then when Q and E are pressed to cycle through drawing modes, a single script attached to my script manager object simply tells the currently selected sculpture to swap drawing mode. 
With these two rewritten systems I tested a build of Figure Drawing Garden on a couple of machines and it seems to run reasonably well even on very low end hardware.

But that's not all! There's also a couple of smaller updates too. I changed the old sculpture plaques to a sleeker, more minimal design.  The old plaques generated text using a 3D mesh which definitely wasn't performance friendly. Artists can now click on a plaque for additional information about a sculpture. This prompts a UI panel which autofills based on the selected sculptures information. The plaque displays the sculpture's name, artist, year, a description, who provided the sculpture and also an image of the real life sculpture.
I also added two new tiles. The first is the 'Arched Circle' tile. This currently has two variants. One contains an archway to a small enclosed grass circle with sculptures along the inner walls. The second variant contains a stairs down to a similar enclosed circle. I plan to create two more variations of the tile. The second tile is the 'Walled Garden' tile. I designed this tile to feel like a lost and abandoned section of the garden. It has a single entrance on one side which will have a gate the player opens. Inside the grass is overgrown and the walls will be covered with ivy.
Other Additions:
• Added idle animation to the camera to simulate the feeling of drawing a figure in real life rather than the sculpture being entirely static. 
• Swapped out the sculpture material used for the Skeleton drawing mode for an improved one.
• Fixed a statue rotation bug that long statues had. Now these long statues will spawn to match the orientation of the stand they're spawning on.
• Added a moveable step ladder which the artist can find and carry around if they want to draw a statue from a higher perspective.
• Added bird flocks. These either spawn as small low flying fast moving birds which have the ability to land on top of monuments, or large high flying flocks.
Back to Top