KABOOM in 180 lines of bare C++
github.com
KABOOM in 180 lines of bare C++
1–10 of 68 posts
Re: KABOOM in 180 lines of bare C++
#2I didn't realize openmp was so easy to use. It isn't realtime but you could bake up some cool effects with this.
AMD FX8320 3.5GHz
$ time ./tinykaboom
real 0m4.176s user 0m28.631 sys 0m0.012s
Re: KABOOM in 180 lines of bare C++
#3Impressive effect. I didn't realize openmp was so easy to use. It isn't realtime but you could bake up some cool effects with this. AMD FX8320 3.5GHz $ time ./tinykaboom real 0m4.176s user 0m28.631 sys 0m0.012s
2x e5-2667 v2: real 0m2.217s user 0m56.088s sys 0m0.016s
Seems like it's pretty inefficient with the dual CPU setup.
Re: KABOOM in 180 lines of bare C++
#4Re: KABOOM in 180 lines of bare C++
#5Impressive effect. I didn't realize openmp was so easy to use. It isn't realtime but you could bake up some cool effects with this. AMD FX8320 3.5GHz $ time ./tinykaboom real 0m4.176s user 0m28.631 sys 0m0.012s
This technique is used a lot in demoscene demos, which certainly do run in realtime.
Re: KABOOM in 180 lines of bare C++
#6Impressive effect. I didn't realize openmp was so easy to use. It isn't realtime but you could bake up some cool effects with this. AMD FX8320 3.5GHz $ time ./tinykaboom real 0m4.176s user 0m28.631 sys 0m0.012s
i7-3770: real 0m6.800s user 0m6.695s sys 0m0.034s 2x e5-2667 v2: real 0m2.217s user 0m56.088s sys 0m0.016s Seems like it's pretty inefficient with the dual CPU setup.
I wonder how many shaders this would keep busy. There is probably a class of GPUs and above that this could work on rather well alongside an already large workload.
Re: KABOOM in 180 lines of bare C++
#7Re: KABOOM in 180 lines of bare C++
#8Really well written. The other articles in the series on computer graphics are excellent too. The use of GitHub to show diffs of each step is quite effective.
Little off-topic, but that's one of the reasons I like to use Magit on Emacs, you can see the diff of each commit interactively and intuitively.
Re: KABOOM in 180 lines of bare C++
#9Example:
https://www.friendlyskies.net/images/266.jpg
So much of 3D graphics is "hmm, this random thing I just made slightly resembles an $X". "OK, so let's say I just created a method for modeling $X." :-) Really fun stuff.
Re: KABOOM in 180 lines of bare C++
#10I was willing to criticize the line count if it had a bunch of dependencies, but 180 lines seems accurate and I'll give a pass to the obligatory core C++ include statements
Way to go!