Share the most challenging problem you solved recently! What made you feel proud?
I just got a nice wrapper for GLSL shader programs working. Now, with just a single line of code, I can create a shader program.
I wrote a simple query language for my super tiny database engine.
I guess the only reason Im proud is because writing parsers is the one thing I detest more than anything.
Not sure if that counts as a problem or not.
Hmmm, with the "recently" qualifier... I'm most proud of finally figuring out how to write and use shaders in XNA and selectively apply those to what I wanted. Downloading the bloom tutorial was easy-peasy. But understanding it along with the XNA SpriteBatch nuances took quite a bit longer. When it finally came together I was quite excited. :)
https://db4sgowjqfwig.cloudfront.net/assets/301809/GlowEffect2.jpg
I'm also pretty proud of my "Effects queue" for a turn-based combat system I'm working on. You piece-meal different effects together like a visual laser effect with a sound effect and random particles at the destination. The laser effect is drawn until the sound effect finishes playing while random particle effects are emited at the target end of the beam. When I first ran into the issue of "hey now there's sound in my game" the duration I was showing the laser blast, was completely off. :) I had to take a step back and think about the problem to come up with a decent design. Then it came together pretty quickly.
- Eck
EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG
So for instance, you can write:
template <typename Real>
Real compound_interest(Real x, Real y, int n_periods) {
for (int i = 0; i < n_periods; ++i)
x *= y;
return x;
}
When you instantiate this function with Real set to my class (I call it `Variable'), you can do this (actual code): Variable x{30000.0};
Variable y{1.06};
Variable z = compound_interest(x, y, 20);
std::cout << "The value of the function is: " << z.get_value() << '\n';
z.set_derivative(1.0);
compute_gradient(); // This actually re-runs the computation in reverse, using a generalized form of backpropagation
std::cout << x.get_derivative() << ' ' << y.get_derivative() << '\n';
A coworker mentioned an old paper that supposedly proved this was possible (just the algorithmic part, not the wrapping it nicely in a class). The paper wasn't easy to read, but my coworker did a great job at coming up with increasingly simplified explanations, until I understood it. My proof that I understood it was the class I wrote.The catch is that it uses an amount of memory that is linear in the number of operations that describe the function (because it needs to be able to run the computation in reverse after it's done computing the function), which is a bit too large in the particular case we are interested in. Still, it was a neat challenge and we were quite pleased with the solution.
Figured out how to give my enemies random movement and pattern movement "AI".
Guys. Guys, listen...
I finally figured out how to write a proper CakePHP code. And it only cost me my soul!
What a bargain!
Self rolled animation controller. Though the harder part wasn't the controller but to get the data import right. And still is
@Álvaro: Interesting: Is that paper available online ?