Skip to content

lazy game.AddParticle experiment - #1464

Merged
Techbot121 merged 0 commit into
CapsAdmin:developfrom
Metastruct:patch-pcf
Sep 21, 2026
Merged

Techbot121 merged 0 commit into
CapsAdmin:developfrom
Metastruct:patch-pcf

Conversation

@Python1320

@Python1320 Python1320 commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

game.AddParticle loads all textures into memory from TF2 which is around 700MB VRAM wasted.
This is AI coded experiment to see how well lazy loading would function.

I have really only checked that some sort of particle spawns ingame when I add a effect particle part.
Additional fixes to code required before hopes of merging:

  • fix lint errors
  • add more error checking to sqlite (full disk will cause lots of error spam)
  • pac code conventions?
  • what if cl.db is completely broken as it is for many users
  • error handling for unknown particle effect parsing
  • maybe try improving particle selector so you can see
  • Check if serverside particle precaching is required anymore? It seems not as this worked: https://wiki.facepunch.com/gmod/Global.ParticleEffect#example

@Python1320

Copy link
Copy Markdown
Collaborator Author

It seems we can maybe get rid of serverside precaching with CreateParticleSystemNoEntity ( Facepunch/garrysmod-requests#3308 (comment) )

@Python1320

Copy link
Copy Markdown
Collaborator Author

Vibe-rewrote with CreateParticleSystemNoEntity with minimal testing (no more serverside components). Will review later, sorry.

@Techbot121
Techbot121 merged commit 423c99c into CapsAdmin:develop Sep 21, 2026
1 check failed
@Techbot121

Techbot121 commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

oops didn't mean to do that I reverted that, so this is technically not merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants