Another proof that the limit is imposed by the dev, not the engine.
@AmirSina.RКүн бұрын
Is it worth to make 2D games with libGDX now? People say java is dead and LibGdx is going to die, but i really like java
@AntzGamesКүн бұрын
libGDX is perfectly fine for 2D. It is also strong for Android game development. See my first video of the series for more info: kzbin.info/www/bejne/qGqrn3h9fcd8h7M
@thejackimonster9689Күн бұрын
The numbers of Java are pretty impressive. But I guess that makes sense when you compare an algorithm which only deals with numbers and you utilize an ArrayList. So there's very little interaction with the heap doing allocations and utilizing the garbage collector. I would imagine the more complex your application gets (using many classes, objects and relations) the more Java will fall off in terms of performance in comparison to C++. However implementing the same thing in C++ will cause much more headache (choosing between references, smart-pointers, applying rule of 5 and such).
@AntzGamesКүн бұрын
In the context of Godot game development, a C++ call threw a GDExtension is not free, and there is an inherent cost to this. Therefore the more nodes that make C++ calls you have, the less a C++ solution performs, and the better GDScript performance gets relative to C++. The same for Java, the calls between the Godot engine and the JVM are not free.
@thejackimonster968920 сағат бұрын
@@AntzGames Very interesting. I have only used GDScript in Godot so far but wanted to develop a GDExtension in the future. I'll keep this in mind.
@Tech_Wes_2 күн бұрын
Very cool! Thanks for sharing
@aslkdjfzxcv97792 күн бұрын
excellent.
@YOLOCX2 күн бұрын
I wonder if this is achievable in WebGL in ThreeJS?
@user-iw1gy7ev6eКүн бұрын
no, WebGL has no compute shaders, geometry shaders or tessellation, you'll have to use WebGPU instead
@AntzGames23 сағат бұрын
This is correct. Compute shader are used in this project.
@extendedrealities2719 сағат бұрын
Thanks. I wonder when ThreeJS will support WebGPU in WebXR then.
@eobet2 күн бұрын
But the thing one wants to see is how do calm waters with reflections look? How does a ship placed in those waters look? Can you mask out the interior of the ship, etc etc…
@AntzGames23 сағат бұрын
So there is already a request on GitHub to add some of the features you mentioned here: github.com/2Retr0/GodotOceanWaves/issues/3
@pwhv2 күн бұрын
amazing test!
@leungleung-c5h3 күн бұрын
You should not use libGDX for game develop
@AntzGamesКүн бұрын
So I have close so 3 hours of content making my case that libGDX is not good for 3D games. Can you back your statement with some facts or experiences?
@everythingcouldbesimplify8183 күн бұрын
Release build in C# is always faster than Debug, godot particularly allow AOT compilations which makes C# closer to C++
@AntzGames3 күн бұрын
So you lose access to Performance data in release builds, and I needed debug to see differences in the amount of memory being used, which also provided some interesting results. I would not focus on the actual numbers too much. C# performs well, and even if it performs closer to C++ with release builds, it still cannot be used in HTML builds. C++ is the clear choice if you want speed in your HTML builds.
@everythingcouldbesimplify8183 күн бұрын
@@AntzGames Yeah, for html5 sure, if at least there was an 3d engine with a high level language like C# that support html5, that would be nice.
@AntzGames3 күн бұрын
I reran the all tests on release build: - C++ and Java had the same performance: 44ms and 54ms respectively - C# indeed improved: From 178ms to 68ms - GDScript improved: 4538ms to 3058ms
@everythingcouldbesimplify8182 күн бұрын
@@AntzGames Great, it looks like both C# and Java looking great, I wonder when is html for c# comming maybe in .net 9, There is also a Godot for Javascript/TypeScript but it's on 4.1version which is supposed to export to html.
@pwhv2 күн бұрын
@@everythingcouldbesimplify818 unity
3 күн бұрын
The GH repo link is 404. Did you forget to make it public? :) I would love to try it with Zig bindings.
@AntzGames3 күн бұрын
Indeed it was private. Set to public now. Thanks.
@gameprogramming65503 күн бұрын
Thanks for thee comparisons.
@guillaumemagniadas24723 күн бұрын
std::array should be faster than a vector in C++ if you know your maximum size
@AntzGames3 күн бұрын
Good to know. This algo needs to add values to the end of the array during the execution, and technically does not know the final size of the array, but does know the maximum possible size.
@guillaumemagniadas24722 күн бұрын
@@AntzGames yes, that’s what I meant, utilizing the knowledge of the maximum possible size (if it’s not a problem)
@thejackimonster9689Күн бұрын
@@guillaumemagniadas2472 Technically you can also call reserve() of std::vector which allows reducing the amounts of allocations to only one and forcing it to the beginning of the algorithm. That way the only difference between std::vector and std::array should be whether you access memory in heap or stack. So I guess it depends on the OS whether that makes a reasonable impact.
@AntzGames3 күн бұрын
Please see my updated video: kzbin.info/www/bejne/p3W7oKCMbLSdodE
@seth111yta14 күн бұрын
another great way to create turbulent waves with godot is questionable community managers
@igork13365 күн бұрын
I use GDScript to design and test the Architecture (or build a prototype). Once I'm satisfied with the result, I convert it to C++. GDScript performs well, and for most developers, it makes only sense to do a C++ conversion if you are creating something computationally heavy, for example, AI that will be used by over 1000 NPCs so they can interact with each other.
@AntzGames5 күн бұрын
That is where I am at. I plan to use it only for very expensive tasks. I went threw this exercise to learn how to do C++ GDExtensions. It is good to know I have options in Godot once you hit performance limitations.
@kairu_b5 күн бұрын
Awesome
@ruyzuki15 күн бұрын
wow, just impressive.
@arkhanyc2475 күн бұрын
Nice tech !
@Kry00006 күн бұрын
Thank you for sharing this resource, ocean simulation and water simulation are subjects that I find fascinating, pair that with my interest with the Godot Engine and what it's capable of and you have my attention.
@Snow_Crab6 күн бұрын
How was the performance?
@AntzGames6 күн бұрын
I list my hardware specs in the video description. This implementation makes it easy for you to change a few settings to increase your FPS by reducing some quality. There are some reports of some people with older 4GB graphics cards having some issues. Check out the issue list in the Github repository for more information.
@RichardLofty6 күн бұрын
This is just Acerola's code for for godot. The repo you are showing just implemented other guy's code, and put it in godot. Please do research before praising people and calling them scientists and PHDs...
@AntzGames6 күн бұрын
2Retr0's repo does list Acerola's video in one of his references. But, I think you should do more research before making a statement implying that he `just implemented other guy's code'. If you actually read 2Retr0 detailed explanation of the techniques used it is far more detailed than Acerola's and 2Retr0 clearly details when he combines techniques. In addition he has GPUParticles for sea spray that I don't see in Acerola's. Acerola's shaders are not optimized (Acerola says this in his github repo), yet 2Retro0 has implemented optimizations for increased FPS. Some of these optimizations include load balancing cascades, include a update rate parameter, and other techniques to reducing overhead between the CPU and GPU in the pipeline. Anyhow I personally think 2Retr0 implementation looks way better than Acerola's.
@MadsterV3 күн бұрын
@@AntzGames it's the same base idea, which is the hard bit.
@sauliusvincevicius86882 күн бұрын
It;s not Acerola's ocean, he did not even this nor came up with this idea. Most credits should go towards J.Tessendorf, Christopher J Horvath and others.
@AntzGames2 күн бұрын
@sauliusvincevicius8688 This is 2Retr0's references list: Flügge, Fynn-Jorin. Realtime GPGPU FFT Ocean Water Simulation. Hamburg University of Technology. (2017). Gunnell, Garrett. I Tried Simulating The Entire Ocean. (2023). Horvath, Christopher J. Empirical Directional Wave Spectra for Computer Graphics. DigiPro. (2015). Tessendorf, Jerry. Simulating Ocean Water. SIGGRAPH. (2004). Matusiak, Robert. Implementing Fast Fourier Transform Algorithms of Real-Valued Sequences. Texas Instruments. (2001). Mihelich, Mark. Wakes, Explosions and Lighting: Interactive Water Simulation in 'Atlas'. GDC. (2019). Pensionerov, Ivan. FFT-Ocean. GitHub. (2020).
@sauliusvincevicius86882 күн бұрын
@@AntzGames Should be more: [1] Franz Gerstner. Theorie der wellen. Annalen der Physik, 32(8):412-445, 1809. [2] Jean Baptiste Joseph Fourier. Théorie analytique de la chaleur, volume 1. Gauthier-Villars, 1822. [3] Jerry Tessendorf et al. Simulating ocean water. Simulating nature: realistic and interactive techniques. SIGGRAPH, 1(2):5, 2001. [4] Christopher J Horvath. Empirical directional wave spectra for computer graphics. In Proceedings of the 2015 Symposium on Digital Production, pages 29-39, 2015. [5] Klaus Hasselmann, Tim P Barnett, E Bouws, H Carlson, David E Cartwright, K Enke, JA Ewing, A Gienapp, DE Hasselmann, P Kruseman, et al. Measurements of wind-wave growth and swell decay during the joint north sea wave project (jonswap). Ergaenzungsheft zur Deutschen Hydrographischen Zeitschrift, Reihe A, 1973. [6] Willard J Pierson Jr and Lionel Moskowitz. A proposed spectral form for fully developed wind seas based on the similarity theory of sa kitaigorodskii. Journal of geophysical research, 69(24):5181-5190, 1964. [7] Steven A Hughes. The tma shallow-water spectrum description and applications. 1984. [8] Sergej A Kitaigordskii, VP Krasitskii, and MM Zaslavskii. On phillips’ theory of equilibrium range in the spectra of wind-generated gravity waves. Journal of Physical Oceanography, 5(3):410-420, 1975. [9] Edward F Thompson and Charles Linwood Vincent. Prediction of wave height in shallow water. In Coastal Structures’ 83, pages 1000-1007. ASCE, 1983. [10] Ian R Young. Wind generated ocean waves. Elsevier, 1999. [11] Carl Friedrich Gauss. Nachlass: Theoria interpolationis methodo nova tractata. Carl Friedrich Gauss Werke, 3:265-327, 1866. [12] James W Cooley and John W Tukey. An algorithm for the machine calculation of complex fourier series. Mathematics of computation, 19(90):297-301, 1965. [13] Bui Tuong Phong. Illumination for computer generated pictures. In Seminal graphics: pioneering efforts that shaped the field, pages 95-101. 1975. [14] Joe Wilson. Physically-based rendering, and you can too! 2017. marmoset.co/ posts/physically-based-rendering-and-you-can-too/. [15] Mark Mihelich and Tim Tcheblokov. Wakes, explosions and lighting: Interactive water simulation in atlas. 2021. kzbin.info/www/bejne/eqLPlWxsapKJrJIsi=Jy0_un81KjUsWmk6. [16] Stephen Hill and Stephen McAuley. 2012-2020. blog.selfshadow.com/ publications/. [17] Libo Huang, Ziyin Qu, Xun Tan, Xinxin Zhang, Dominik L. Michels, and Chenfanfu Jiang. Ships, splashes, and waves on a vast ocean. ACM Trans. Graph., 40(6), dec 2021. 31 REFERENCES 32 [18] Dmitrii Kochkov, Jamie A Smith, Ayya Alieva, Qing Wang, Michael P Brenner, and Stephan Hoyer. Machine learning-accelerated computational fluid dynamics. Proceedings of the National Academy of Sciences, 118(21):e2101784118, 2021. [19] Fynn-Jorin Flügge. Realtime gpgpu fft ocean water simulation. 2017. [20] Jerry Tessendorf. Interactive water surfaces. Game Programming Gems, 4(265-274):8, 2004. [21] Jerry Tessendorf. ewave: Using an exponential solver on the iwave problem. Technical Note, 2014. [22] Peter Kipfer, Mark Segal, and Rüdiger Westermann. Uberflow: a gpu-based particle engine. In Proceedings of the ACM SIGGRAPH/EUROGRAPHICS conference on Graphics hardware, pages 115-122, 2004 github.com/Biebras/Ocean-Simulation-Report/blob/main/finalReport.pdf
@ramsaybolton91516 күн бұрын
they look woke
@wirrexx7 күн бұрын
This is beautiful this is .. wow . I’d love to know where to begin with shaders
@UliTroyo7 күн бұрын
The foam is amazing! Most shaders implement the foam far less well.
@gigabit62267 күн бұрын
looks fantastic
@everythingcouldbesimplify8187 күн бұрын
I wonder if this test is comparing stack in C++ with heap in the C#, and C# in the editor without the released build, cause I tried it and got 3ms in the release build and around 12-16ms in the editor.
@AntzGames7 күн бұрын
To add some context to your original comment and also this edited comment. So this algorithm is very bad in terms of space, and yes, 2 million is very big stack, even for C++. Time Complexity: O(N*log(log(N))) Auxiliary Space: O(N) I may redo the test using the test using the Segmented-Sieve algorithm: www.geeksforgeeks.org/segmented-sieve/ Which reduces the space needed for the algo to the square root of 2million (which is only 1414), shown below: Time Complexity : O(n * ln(sqrt(n))) Auxiliary Space: O(sqrt(n)) Also, I should also redo the tests using the release build as you suggested. Also I may add both Rust and Java/Kotlin GDExtension times, as many people have requested it.
@okie90257 күн бұрын
🏳️🌈
@kira.herself7 күн бұрын
Awesome tech and video <3 🏳🌈🏳⚧
@JohnLogostini7 күн бұрын
Is that WaveWorks?
@esko9117 күн бұрын
GoWoke Engine
@kira.herself7 күн бұрын
that's why it's the best engine 🏳🌈🏳⚧
@esko9117 күн бұрын
@@kira.herself keep telling yourself that transmission.
@azaa21887 күн бұрын
How so? The engine is still the same as it was two days ago
@kira.herself7 күн бұрын
@@azaa2188 you can't reason with them, I also wish to know where all this random hate comes from, but I never get a real factual answer
@okie90257 күн бұрын
@@kira.herselfthey don't consider it hate, they think they're morally correct by hating on minorities.
@friedrichjunzt7 күн бұрын
I wish Godot would focus on their engine and less on activism and culture wars, like their Community Manager is doing 😢
@ahslanabanana7 күн бұрын
go cry about it
@throwplate7 күн бұрын
Agreed. They're not attracting prospective game devs by publically dehumanizing those who chose not to put 'gender justice' in their games
@throwplate7 күн бұрын
@@ahslanabananaHe is, and we are. That's the whole point of the comment. Odd choice of rhetort.
@ahslanabanana7 күн бұрын
@@throwplatethis is peak victim mentality. trans people get the tiniest bit of support from the community of a major game engine, and somehow you’re the victim here? stop making everything about yourself
@lachee30557 күн бұрын
god forbid a community manager tries to engage with its community. Go cry a river cultist.
@charles_kuperus7 күн бұрын
yes please do a rust version of this Video.
@Le_x_Lu7 күн бұрын
this is amazin... its looking great, never tough of using imGUI in Godot C++ extensions tho :0 love that combination..
@nathanielblairofkew10828 күн бұрын
great video, thanks!
@pwhv8 күн бұрын
can you tell your hardware specifications please?
@AntzGames8 күн бұрын
This is a good request, I will add this to the video description: CPU: Ryzen 5 5500 GPU: RTX 3050 8GB (original) Monitor Resolution: 3840 x 2160 (4K @ 60 Hz) RAM: 32 GB OS: Windows 11 Godot: 4.3
@notavail9 күн бұрын
This is really great, thank you.
@Ivorforce11 күн бұрын
Hiya, interesting comparison! I'm currently working on a numpy-like math API and came across this, so I wanted to have a go at this myself. My 2c, I'd be surprised if GDScript was actually 100x slower than c++, or 27x slower than C#, in the real world. C# may have some edge by being JIT'd and its the compiler having a better implementation than GDScript, but it's also possible the compilers even vectorized your calls automatically, elevating their speeds beyond what's expected from the benchmark designer. But it's hard to say what really happened without actually opening the guts of the binaries. Benchmarks are hard! Anyway, my gdscript implementation got comparable results to yours (about 160ms), while it took about 9ms with the vectorized calls (~16x decrease). That doesn't quite bring it to C# or C++ levels according to your test, but it brings it a lot closer! The library (NumDot) does use SIMD vectorization to speed up assignments, but it's somewhat handicapped in comparison to C++ plain because of the many abstraction layers between logic and assignment.
@AntzGames11 күн бұрын
In a real world game example with a complex scene graph, GDScript performs much better, and many C++ GDExtension calls becomes more expensive. However, a highly computational and/or any algo that requires loops severely impacts GDScript. Also I think you might want to edit your statement >>> I'd be surprised if C# was actually 100x slower than c++, or 27x slower than C# I know you meant GDScript at the beginning.
@Ivorforce11 күн бұрын
@@AntzGames you got it right, i meant GDscript there :) statement is edited.
@SebastienGuillemin12 күн бұрын
I'm guessing the performance difference between the benchmark you posted (which was one big computation, and where kotlin performs really well) and this game (which performs many frequent calls, and where kotlin is behind gdscript) is due to the cost of crossing the JNI boundary for each call, right?
@AntzGames11 күн бұрын
This is exactly correct. This project conducts benchmarks, and you can see the results here: github.com/utopia-rise/godot-kotlin-jvm/tree/master/harness/bunnymark They are working on batching the JNI calls and other performance goodies that will reduce the impact of the JNI calls. The interesting thing is with design changes to the BunnyMark code (they have 3 versions of it) you can make Godot Kotlin JVM 2.5x faster than GDScript all the way to 10% slower than GDScript. You can avoid the impact by making design changes in the node structure of your project.
@IRQ33312 күн бұрын
F java game dev dead
@Dgzt11 күн бұрын
There are several java based games on Steam and the most of android games are made in Java/Kotlin.
@ghorshy12 күн бұрын
What version of .NET were you using in these tests?
I thought GDExtension did not work with HTML5 target? How do you have c++/html5 results?
@AntzGames16 күн бұрын
C++ GDExtensions can be compiled using Emscription to produce a Web Assembly module (WASM) and run on the web, as I explain in the video. This is done automatically on export. Here is another example: www.reddit.com/r/godot/comments/1atvz4z/gdextensionc_game_on_the_web_with_wasm_sand_slide/
@AntzGames16 күн бұрын
So I added a GitHub repository so you can run the GDExtension on an HTML export yourself: github.com/antzGames/GDExtensions_VS_GDScript_Test
@ДмитрийЭдем18 күн бұрын
Good day, thanks for the video, why didn't you consider the option with JMonkeyEngine when migrating from libgdx? If the answer is in the previous videos about libgdx, then sorry, I haven't watched everything yet.
@fireball770818 күн бұрын
Rust + godot ?
@AntzGames18 күн бұрын
So this older Godot3 repo did some rust + GDNative (which is now GDExtensions): github.com/extrawurst/godot-rust-benchmark I would assume a rust shared library GDExtension to be relatively the same speed as a shared library C++ GDExtension.
@eyzake19 күн бұрын
bro 😭 make a course on libgdx not on !libgdx
@kewnst19 күн бұрын
gicven how much gd script borrows from python idl ike to see python vs godot test.
@AntzGames18 күн бұрын
So this prime number test is like the worst possible test for GDScript (and most likely Python). I used it specifically to expose the weakness of GDScript in code loops. I would take the results with a grain of salt. GDScript actually does pretty well in real world rendering examples. The official Godot benchmarks can be run here: github.com/godotengine/godot-benchmarks
@LuisFrontanilla19 күн бұрын
O_o
@eyzake20 күн бұрын
saw the comment on the previous video and i was like (idk man) but i guess it does work
@shoeoffhead369220 күн бұрын
I downloaded the Github godot-kotlin-3d-demo How do I start that thing? I can build the jars, but none is executable (no Main Class in Manifest). It would be really cool if you could make a video about writing a MINIMAL game in Java for Godot. Can you do it?
@AntzGames20 күн бұрын
The workflow is 2 steps. You build the jars in IntelliJ but you need to use the Godot Kotlin/JVM editor to run the game. I would start with the getting started template that is listed on the website and follow the instructions. I forgot about the 3D demo to try out. I will try to build it next weekend. So excited!
@shoeoffhead369219 күн бұрын
@@AntzGames Maybe possible to combine it with Graal Native for Demo performance tests?
@AntzGames19 күн бұрын
@@shoeoffhead3692 So a new version of Godot Kotlin/JVM is coming out in a few weeks (I heard sometime in October). So going to wait until this new release and I am going to make a video series just focusing on this amazing project.
@AntzGames17 күн бұрын
See my next video of the showing how to run the Kotlin 3D demo: kzbin.info/www/bejne/b3LNf618l7l5jNE I also show performance comparisons vs. the original GDScript version.
@shoeoffhead369220 күн бұрын
Will the Web (HTML) supported eventually? What is the technical limitation to not being able to use HTML? It's possible in GDScript. Why not Java?
@AntzGames20 күн бұрын
I was talking to one of the contributors to Godot Kotlin/JVM project today and they say that capability is on the roadmap. Most of them are ex-libGDX devs who still love using Kotlin/Java but want to use Godot. So stay tuned!