GWater2 - Starting From Scratch! (See Desc.)

Опубликовано: 05 Июнь 2023
на канале: Meetric
15,833
577

Ive decided to start rewriting GWater! yay!

In these videos I will probably use the description to give update info (or maybe talk depending on how I feel) so make sure to read the description for technical updates! :)

I will post updates in this discord server! Feel free to join it:
discord:   / discord  

GWater 2 will continue to use Nvidia FleX for the particle physics. I realize PhysX 5 exists, but it lacks in features when compared to FleX. Things like collision feedback, D3D support, and native 32 bit just doesn't exist with PhysX 5. It also doesn't work on older GPU architecture (the average gmod player does not have grade A specs) so for now I'll just stick to FleX.

Now lets get on with the code improvements!
In GWater2 I am using a new system for holding particle data allowing for easier (and less crashy!) manipulation of FleX. Creating a FleX particle environment is now as simple as making a struct. (Look how easy it is!-

MaxNumberOfParticles = 1000
flex = FlexSolver(MaxNumberOfParticles)

Now doesn't that look simple? :D
You can make multiple simulations with their own separate parameters and even make your own custom rendering function! (shown in video when I edit the code)
The new GWater API will have more features and be much more user friendly than before, so any developers out there should look out for those improvements! :)
And btw! the code that is shown in the video is it just the 1 file! Thats all you need for the particle physics shown onscreen. Everything is handled by the module, its super simple!

In terms of features I plan to add, I do eventually want to render these particles externally. Right now I am still rendering them in-game with lua (slow), but eventually I do want to try and run the rendering on the GPU and overlay it onto the game (Like reshade?). It should boost performance (I mean the data is already on the gpu right??) and also it should look better
Another huge thing I plan to add is a built in BSP parser. In GWater 1 map data was networked from the server (since the client had messed up surface data for some reason) and it took forever and used a lot of overhead. In GWater 2 I want to try and implement a BSP parser so that we have improved map loading times and collisions with things like displacement.
Other than that, there have been significant code improvements in terms of performance and readability, good practices such as commenting, spacing, proper includes, folder management, OOP, and other factors just generally make the codebase a little easier to understand and work with. (Thank you for your support, I wouldn't have improved my skill without it :D)

Thats about it for now, hopefully there will be more videos like this in the future, thanks for reading :)