Repository navigation
Conversation
The 43 pine trees and 4 bushes, each an object, become three "scattered models" objects of the 3D terrain extension (two pine forests and bushes): 247 trees and 152 bushes drawn with GPU instancing. They grow on the grass layer, away from roads, houses and slopes steeper than 28°, in areas given by their Edits property: around the hill, behind the town and in groves around the farms. Trees keep their cylinder collisions as trunk collisions of the 3D physics behavior. Three gameplay tests are added: - The forests grow on the ground, away from roads and cliffs (and the copies are the same after a restart, follow the raised ground, and stand at the object Z where there is no terrain). - Trees stop boxes pushed against them, and can be cut. - Trees are added and erased with the brushes of the scene editor. The 3D terrain extension is updated with the scattered models object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT
They stay available in the previous commit, for the description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT
Contributor
Preview the game(s) changed or added in this Pull RequestThis is an automatic message displaying links to the games in this PR - double check the JSON in case of doubt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the 43 pine trees and 4 bushes of 3D GTA with a map (#1081, on which this is stacked), each a 3D model object, by three scattered models objects of the 3D terrain extension (GDevelopApp/GDevelop-extensions#2306): two pine forests and bushes. That's 247 trees and 152 bushes, drawn with GPU instancing.
The forests
Before / after
Left: before (separate objects). Right: after (scattered models). Same cameras, 1280×720, full resolution screenshots of gameplay tests.
The forests are denser than the old scattered trees, so the hill and farms look wooded. Close up, a copy and the same model as an object have the same colors and shading. The screenshots were added and removed in two commits of this branch, so they don't stay in the example.
Draw calls (500 trees)
In a test spawning 500 pines as objects at the positions of 500 copies, with the same camera: 245 draw calls with scattered models vs 1525 with objects (shadows on), and 66 vs 1064 with shadows off. The average frame was 7.6 ms vs 22.1 ms with shadows, and 8.5 ms vs 14.9 ms without, in the software renderer of the tests.
Gameplay tests
Three new tests, added to the four of the example (all 7 pass locally with GDevelop master, in 0.3 to 15 s each):
Not checked
🤖 Generated with Claude Code
https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT
Generated by Claude Code