| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 1 month |
| seen | Jan 18 '12 at 4:04 | |
| stats | profile views | 53 |
|
Apr 13 |
awarded | Yearling |
|
Oct 14 |
awarded | Nice Answer |
|
Apr 13 |
awarded | Yearling |
|
Oct 13 |
answered | What are the pros and cons of incorporating Lua into a C++ game? |
|
Jun 3 |
answered | Rotating a vector by another vector in shader |
|
Jun 3 |
comment |
Determine animation frame from interval @gajet Ahh, in that case your function is effectively random access, which means you'll have to search for your frame. Best thing to do is convert your time deltas in the source array into timestamps (by summing the lengths of all the keys before it), and then conduct a binary search to find the key at the given time. To deal with the time format, you can either multiply up the incoming 0-1 by the animation duration on the way into the function, or normalize the timestamps ahead of time. |
|
May 22 |
comment |
Determine animation frame from interval To expand on what Gajet wrote there, what he's proposing is that you keep track of two values: the current frame index and the time remaining until the next frame should be displayed. Each frame, you need to decrement the time remaining, and should that drop beneath zero, you increment your frame index by one and append the new time to next frame. The only thing missing is handling the case where enough time has passed to advance more than one frame. if(nextframe<0) should be while(nextframe<0) to deal with that. |
|
May 19 |
answered | How does one optimize an HTML5 Canvas and JavaScript web application for Mobile Safari? |
|
May 19 |
comment |
When to roll your own game engine? Agreed. As tldr: If you have to ask the question, you're much likely better off going with an existing engine. |
|
Apr 20 |
awarded | Supporter |
|
Apr 20 |
comment |
How do I replicate the warp effect from Geometry Wars? Nope, I didn't describe how it would vary over time, so not a spring. I just described how to get the distortion shape you're after. Animating it in the GW style would require adding another factor up there, modulating i over time. Try implementing the whole thing and it should become clear to you that you can scale i to relax or intensify your effect. Pass a sine wave through that modulating value, or bounce it like a 1D spring and you'll effectively bounce the whole thing. Again, once you have a harness with a bunch of variables floating around, experimentation will be your friend. |
|
Apr 19 |
answered | How to model irregular boundary of a 2D map in Game? |
|
Apr 19 |
answered | How do I replicate the warp effect from Geometry Wars? |
|
Apr 19 |
answered | Designing for multiple screen resolutions and aspect ratios, target one resolution then scale to meet others or use normalized values? |
|
Apr 15 |
answered | Surface of Revolution with vertex shader |
|
Apr 15 |
comment |
Clarification on the “game engine” notion needed @Rushyo good point. I didn't notice that I'd sloppily dropped to just "engine" when I meant to say "game engine". I've fixed the two offending locations and added a clarification note. |
|
Apr 15 |
awarded | Editor |
|
Apr 15 |
revised |
Clarification on the “game engine” notion needed Clarified usage of Game Engine vs Engine alone |
|
Apr 14 |
comment |
Competing with C++ for games programming Ah, but it's a fallacy that coding in assembly is faster: current chips are complex enough that it's difficult for a programmer to outperform a compiler consistently. Only in more constrained domains like SPUs on the PS3, inner physics loops and shaders on GPUs are there still clear advantages. C++ is indeed currently the sweet spot, with the caveat that OOP isn't always the best choice: the ongoing Struct of Arrays vs Array of Structs discussion isn't exactly a language discussion, but C++ clearly leads you to AoS naturally; Sometimes... you really just want C. |
|
Apr 14 |
answered | Clarification on the “game engine” notion needed |