Got some AVX practice in
So I made an incomplete 2d grid caster engine (as in, you can’t actually move around because I cannot be bothered relearning how to do events yet). My use of AVX (read: SSE but better) wasn’t particularly helpful, but being able to code with AVX compiler intrinsics might come in handy for if I make a ridiculously spammy bullet hell shooter.
So here it is: https://gist.github.com/2427184
Just look at the code for a bit and read the render_raycast_avx() function. Tell me if it makes any sense. Thanks.
If you would like to compile this: gcc -mavx -O2 -g sdlavx2cgridcast.c -o sdlavx2cgridcast `sdl-config –cflags –libs`
The -mavx is important because otherwise there are no compiler intrinsics available, and the -O2 is important because otherwise the AVX compilation is really piss-poor.
I highly recommend a 64-bit OS for this one.