Repository navigation
FPS with enemies: navmesh pathfinding, and theme slots for both submitted starters - #1097
Open
4ian wants to merge 30 commits into
Conversation
…lop versions (#1074) * Update the 3D lights extension and retune lights for the Three.js r185 falloff
…malist 3D GTA" (#1081) * Make the map of the 3D Grand Theft Auto starter a 3D terrain - A town with streets, lane markings, sidewalks, buildings, a park and a construction site, a country road going through farms and climbing a hill, and mountains around the map. The terrain is described by its Edits (raise, flatten, smooth and paint strokes) and uses the 3D physics behavior, so cars and the player drive and walk on it. - CC0 assets: Kenney's City Kits (buildings, houses, street lights, cones, barriers, trees), Quaternius' pine trees and bushes, and ambientCG's textures for grass, asphalt, rock and concrete. - Gameplay tests check that the player and the cars rest on the terrain and that a car climbs the road of the hill. Tests hide the grass and render small and without shadows, as they run in a software renderer. - The new objects are mapped to theme slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Make the GTA with a map a new example, and keep the starter minimalist The starter is back to its version on main, renamed "Minimalist 3D GTA". The map made with a 3D terrain is the new "3D GTA with a map" example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Use height blending and texture variation in the 3D GTA with a map Roads now have crisp borders with the ground around them. Also adds a preview image. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR --------- Co-authored-by: Claude <noreply@anthropic.com>
* Replace the trees of the 3D GTA with a map by scattered models 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 * Add screenshots for the pull request description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT * Remove the screenshots of the pull request description 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 --------- Co-authored-by: Claude <noreply@anthropic.com>
* Add a tunnel through the hill of the 3D GTA with a map The entrances are holes in the terrain (hole edits), and the tunnel is a 3D model under the ground with a mesh collision shape. Concrete portals fill the space between the tunnel and the ground, so that only the tunnel is seen through the holes. In the tunnel, the camera following the car comes closer to stay inside. Gameplay tests: a car drives through the tunnel and comes out on its wheels; holes are seen through, and a box falls through a hole until it's filled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT * Add screenshots for the pull request description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT * Remove the screenshots of the pull request description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT --------- Co-authored-by: Claude <noreply@anthropic.com>
* Add a 3D island example made with the 3D terrain, water and grass extensions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D island example with the new versions of its extensions The terrain tools use the toolbar of the in-game editor, the terrain has an "Edits" property for strokes written in JSON, and the water has ripples from a CC0 normal map made from zookeeper's waves heightmaps (OpenGameArt). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the extensions of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D water extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D island example for Three.js 0.185, with textured terrain layers The terrain layers use CC0 textures from ambientCG (with normal maps made from them), and the grass is the terrain grass of the 3D terrain extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain and water extensions of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Make the 3D island example look more realistic - ambientCG textures with normal maps for the grass, dirt, rock and sand. - A mountain, a ridge and a cliff sculpted with the Edits of the terrain. - Palm trees, pine trees and bushes put on the ground. - A low sun with a sky light, light fog, ambient occlusion, a light depth of field and a light bloom. - A flat terrain painted with sand as the sea floor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Use a stronger normal map strength in the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the terrain extension of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D water extension of the 3D island example Rays hit the plane of the water instead of all its wave triangles, which makes finding surfaces in the editor much faster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the terrain extension of the 3D island example and give unique ids to its instances The grass grows on the highest terrain at each point. The terrain, the water and the grass had ids written by hand, sharing their 10 first characters (what the AI tools show of an id): they have random ids now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the icons of the terrain and water extensions of the 3D island example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Test the 3D terrain and water extensions in the island example Gameplay tests moved from the extensions repository: the terrain data encoding, brushes and edits, the surface given to physics and navigation meshes, older GDevelop versions (including the physics body set by the terrain itself), the world scale, and painting after a relief change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Check that terrain brushes aren't applied while the view is moved Also updates the Terrain3D extension of the island example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Shorten the comment about older GDevelop versions in Terrain3D Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR * Update the 3D terrain extension of the island example Layers now blend by height and textures repeat less visibly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156q1ijXegCexbGspqriikR --------- Co-authored-by: Claude <noreply@anthropic.com>
* Add wet sand and dry patches to the 3D island The terrain uses the new tint and wetness of the 3D terrain extension: - "Wet shore" below Z -31 (fading over 22 pixels): the sand just above the water (at Z -38) is darker and shiny. - Three dry patches in the meadow and a puddle on the path, as "tint" and "wetness" strokes of the Edits property. The grass takes the tint. Two gameplay tests are added: - The tint and wetness are saved and loaded without loss (including data saved in format 1, before they existed). - The ground is tinted and made wet by the beach, events and brushes. The 3D terrain extension is updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT * Add screenshots for the pull request description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJr8NHQoc1VdQ5fSM9TPzT * Remove the screenshots of the pull request description 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 --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixing issues in several games 1. The 3D bunny platformer was still using a barrel object as the round collision mask for the bridge. This was changed so the bridge is now using its mesh for its shape type, and the barrel was removed. 2. The 3D sokoban game was using tab to switch between cameras, which didn't work properly in the web version preview, and a change in how tweens work, caused the camera to not tween properly anymore. Both issues were fixed. 3. The farming and survival crafting starter projects all used the same events for scrolling through the inventory with a scroll wheel, but the scroll was happening in reverse. So those actions were switched in all 4 of the starters.
* Updated textures Updated the tile scale of all 3D boxes in the starter projects to 0.2, with upscaled textures that fit those new sizes. * Adding "3d" to the name of a starter Updating the name of the FNAF starter, so it's grouped with the other 3D games.
…objects (#1082) * Let themes fill the properties of custom objects, like the 3D terrain - New slot kinds: "material" (a texture with its normal map) and "color". - A starter maps the properties of a custom object in theme-slots.json: an image to a texture slot, a color to a color slot, or a layer texture to a material slot along with the property taking its normal map. A theme without a normal map for it empties that property. - New slots for the terrain of the starters with a map: terrain.ground, terrain.dirt, terrain.road, terrain.rock, terrain.sand, terrain.pavement, and the colors of the grass blades. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj * Let themes replace the 3D model of custom objects, like scattered models A custom object property holding a 3D model (like the model of the "Scattered models" object of the 3D terrain extension) can be mapped to a model slot: the theme model replaces it, and the other properties (like the size of the copies) are kept. Custom objects drawing a 3D model must be mapped or ignored in theme-slots.json, like 3D model objects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj --------- Co-authored-by: Claude <noreply@anthropic.com>
* Make the 3D GTA with a map a themeable starter Move it to starting-3d-grand-theft-auto-with-a-map and map its objects to theme slots: its buildings, town trees, cones and barriers, the models of its scattered forests and bushes, the four layers of its terrain (ground, road, rock and pavement, with their normal maps) and the colors of its grass. The tunnel is kept as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj * Update the extensions of the themeable 3D GTA with a map Terrain3D gets the empty collision surface of scattered models without trunk collisions (GDevelopApp/GDevelop-extensions#2310), and ThirdPersonCamera its latest version (1.9.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj --------- Co-authored-by: Claude <noreply@anthropic.com>
…xamples (#1093) Don't show in changelog
Don't show in changelog
…vaoj1s-fps-enemies
Like the other starters (#1069), and give the starter its own project UUID (it had the one of the FPS horror starter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
The enemies used the grid pathfinding, with invisible obstacles along the platform. They now walk with navmesh pathfinding (NavMeshPathfinding), on a navmesh built from the ground, the platform and its ramps (walkable), and the pushable boxes (obstacles only, it follows them when they are pushed): - patrolling, they walk to the player, or around, on the navmesh; - chasing, they run to the player on the navmesh too (instead of being pushed toward the player with forces), so they go up a ramp to reach the player on the platform. The path is updated when the player moves away from its end (both ramps being about as far, a new path could take the other one every time); - their 3D physics body is kinematic (moved by the navmesh, it still collides with the player); - a shot enemy falls over before disappearing (it was pushed by an impulse, which a kinematic body doesn't take). The invisible obstacles are removed. Tests are added: a patrolling enemy walks toward the player, an enemy that sees the player catches them, and an enemy goes up a ramp to catch the player on the platform. The tests of the submission get a 60 s timeout (they render at 1280x720). The extensions are updated to their latest versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
…theme slots FPS with enemies: like the FPS starter, with the enemies as enemy characters. Camera monitoring: the walls, the tiled floor and the furniture (textured like the pushable boxes of the other starters); the security cameras, the glass, the room areas and the light placeholders are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
Contributor
They render at 1280x720 with a spot light casting shadows and the CRT and glow effects of the camera view: in the software renderer of the CI, their 170 frames take 35 to 50 s, more than the default 30 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
While an enemy walks, the navmesh moves it: its physics body (dynamic, as in the submission) is deactivated, and it is activated when the enemy is shot, to take the impulse at the impact of the submission. A shot enemy is thrown back and tumbles again, instead of falling over. Touching the player, which was a collision of the physics bodies, is checked with the distance between the player and the enemy. A test checks a shot enemy is thrown back and tumbles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
4ian
force-pushed
the
claude/awesome-knuth-vaoj1s-fps-enemies
branch
from
October 19, 2026 15:47
919b18b to
8593eb3
Compare
The previous change deactivated the physics body of a walking enemy, so that the player could walk into it, and touching the player was checked with a distance. The body now stays: while the navmesh moves it, it has no gravity, doesn't collide with the static objects (mask 1: the ground, the walls), which the navmesh keeps it on and away from, and is 100 times heavier, so that the player bumps into it without pushing it. Touching the player is the collision of the physics bodies again, as in the starter. When it is shot, it gets its density, the gravity and the collisions back (deactivating and activating the behavior creates the body again with them), and takes the impulse at the impact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
…ples using it The 3D physics "Body type" action is not known by GDevelop 5.6.284 and before, which would skip it. An example using it asks for GDevelop 5.6.285 or later, instead of 5.5.220 or later for the other 3D physics examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
The FPS with enemies uses the new "Body type" action of the 3D physics: an enemy moved by the navmesh is kinematic (the player bumps into it without pushing it), and becomes dynamic when it is shot, to be thrown by the impulse at the impact. It replaces the dynamic body without gravity, without the collisions with the static objects and 100 times heavier, whose settings were restored, and the behavior deactivated and activated again, before the impulse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
They render at 1280x720, which takes about a minute in the software renderer: 60 s was just too short on a slower machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj
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.
Changes to the starters of #1076, to merge into its branch. The branch starts at the head of #1076 (
8c58260f), merges the latestmain, and adds the commits below.The enemies of the FPS with enemies walk with a navmesh
The enemies used the grid pathfinding, with invisible obstacles (
PathfindingObstacle) along the platform. They now walk with navmesh pathfinding (NavMeshPathfinding). The navmesh is built from:The state machine is unchanged, and so are the vision raycast and the restart when an enemy collides with the player:
The invisible obstacles and their texture are removed.
The "Body type" action needs GDevelop 5.6.285 (the release after 5.6.284): an older GDevelop doesn't know it and would skip it, and a shot enemy wouldn't be thrown. So the database now asks for GDevelop 5.6.285 or later for the examples using it (
scripts/lib/ExampleGDevelopVersion.js, instead of 5.5.220 or later for the other 3D physics examples): an older GDevelop shows "Download the latest version of GDevelop to check out this example!". The gameplay tests of the CI use the latest build of GDevelop'smaster, which has the action (built at 14:52 UTC on 2026-10-20).Before the action was available, the enemies used a dynamic body without gravity, without the collisions with the static objects and 100 times heavier, whose settings were restored, and the behavior deactivated and activated again, before the impulse: this is replaced by the action.
Screenshots: an enemy chasing the player up the right ramp:
Theme slots
Both starters get a
theme-slots.json, and every theme applies to both (checked withcheckStarterThemeSlotsandapplyThemeToStarter):character.enemy.env.wall), the tiled floor (env.ground.tiled) and the furniture (env.crate, as it uses the texture of the pushable boxes of the other starters). The security cameras, the glass, the room areas and the light placeholders keep their look.Also
mainis merged in."top": "Z+".Tests
Four tests are added to the FPS with enemies:
The two tests of the submission get a 120 s timeout: they render at 1280×720, which takes about a minute in the software renderer (60 s was just too short on a slower machine). All 6 tests pass with
node scripts/run-gameplay-tests.jsand GDevelop 5.6.284 with the Physics3D files of 4ian/GDevelop#9270; with themasterbuild of GDevelop that the CI uses, the 4 added tests pass (the 2 of the submission were then over 60 s, hence the 120 s). Checked apart: walking into a standing enemy, the player is stopped.ExampleGDevelopVersion.spec.jschecks the version asked for an example using the action (in a scene or in an extension), and for the other examples;jest,tscandprettierpass.The two tests of the camera monitoring starter get a 120 s timeout: they timed out on CircleCI (35 to 50 s for their 170 frames, against the default 30 s). They render at 1280×720 with a spot light casting shadows and the CRT and glow effects of the camera view, which are slow in the software renderer of the CI. Both pass.
The "3D FPS with enemies with a map" of #1087 is built from this version of the starter.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Wa8uKpYuQrYqGYnqGCsquj