# pTymN

Member

445

464 Neutral

• Rank
Member
1. ## Neural networks fundamentally flawed?

Neural nets are flawed, if we define flawed to mean "does not follow the model the brain provides". Dendrites are seen as simple signal absorbers from the neurons they touch, but they actually perform filtering functions. This is probably a very crucial step, and it has an implication about the role and meaning of a neuron. Essentially, instead of weights and thresholds, the actual brain uses conditions and signals.
2. ## How to apply constant angular speed to quadratic linear speed?

I think that I have the basis for a solution. I needed to convert from my turn speed to the curvature, the curvature to a circle radius, and finally the circle radius to acceleration towards the center of that circle.
3. ## How to apply constant angular speed to quadratic linear speed?

If I have a Px(t) = At^3 + Bt^2 + Ct + 0 and Py(t) = 0 for my character's position while running and a constant radians/second that my character can turn, how can I transform that into an explicit formula for Px(t) and Py(t) after turning is applied? Is this related to fresnel and euler spirals or track transition curves? Much thanks to anyone who can give me a strong kick in the right direction. Edit: I figured out a piece, that I ought to be figuring out P''x(t) and P''y(t) instead of thinking about curves at all.
4. ## How do you check collision against 1000x1000 objects?

In situations where you need to actually update that many objects each and every frame, well tuned spatial hashing will handily beat all other broadphase methods for large amounts (1000s) of uniformly sized objects - where the largest are within 4-8 times the radius of the smallest objects. If you can get away with only updating a subrect of your game world, that's another optimization you should consider.
5. ## iPad 1 - OpenGL ES 2.0 batching mystery

I've written what amounts to a random access video codec for my texture assets. Whenever the same GL texture handle is used in consecutive draw calls, my renderer automatically batches quads. The original implementation calls glTexImage2D on textures from a pool for each loaded image. Images whose textures are not used by the end of the current frame are discarded for reuse. This was increasing my draw calls to ~70 per frame, mostly the fault of the drawn font strings (batched glyph quads). However, it does give me 29-34 fps according to the Instruments GL Driver profiler. The implementation that I tried yesterday uses glTexSubImage2D to update portions of dynamically created atlases. Even though the draw call count dropped to ~10, and even though Instruments shows that my atlas rectangle choosing is not the cause of the slowdown, I am seeing a drop from ~30fps to ~22fps. Is glTexImage faster than glTexSubImage? Does the iPad's tiled renderer hardware operate more efficiently with smaller textures? Would it be reasonable to expect that there are GPU caching issues in play and that the constant trimming down of in-memory GPU assets is making up the difference? Is there a possibility that if I queue up render calls in order to batch glTexSubImage calls, that my on-the-fly atlas approach could be faster? I appreciate help from anyone with insight on how the particulars of the PowerVR SGX affects performance in my situation. Thank you so much for taking time to help me understand. Except for situations with some crazy multitexturing or complicated shaders, I haven't seen less draw calls be slower than so many more draw calls before.
6. ## Tile ripper utility

Blog post with source and sample Check out the links to see what it does to an image. Whether you are writing a C++ or AS3 Box2D app that needs to manipulate images that are larger than you can fit in memory, you could use the utility to make your work easier. Also, if someone does compile the tile ripper utility for MSVC, please link me with the project and executable so that I can make it available to everyone.
7. ## Tile ripper utility

Just got a mac, don't have C# to help me out here :-P
8. ## Tile ripper utility

I am having difficulty finding any useful info on google for a tile ripper. I have a giant 20,000 x 5,000 png that I want to: 1. Break into tiles 2. Throw away duplicates 3. Output an atlas png of the tiles or multiple tile pngs. 4. Output an xml file with information on how to construct original image from unique tiles. It seems like a problem that would have been solved before. Any suggestions?
9. ## [web] Flash CS4 circular reference problems

Hello, My paranoia is pretty high now regarding the fact that the Flash GC seems to completely leak any object with a circular reference, including a MovieClip who has a child or maybe somehow SoundChannels, due to a very naive reference counting algorithm. Here's some questions that I can't find detailed answers for: 1. When is the code from a closure generated? 2. When is the code from a closure garbage collected? 3. When are objects that are referred to from a dead closure garbage collected? 4. It seems like a very big oversight that a basic type of object like a MovieClip has exactly the kind of circular reference problem that the garbage collector chokes on when it contains an also unused child (parent and presumably hidden field children cause parent and child DisplayObjects to point to each other circularly). Do all experienced Flash developers already know this, or am I doing something really stupid in my AS3 code? 5. Eventually my game starts getting null return values from anySoundInstance.play(), but the game is able to play way more than 32 sounds (I have to run it for a few hours in an autoplay mode before I see the problem when I come back to my PC). My sound playing function sets up a sound.complete event (which removes itself from the SoundChannel when triggered) and returns a function that takes a fade out time in milliseconds and adjusts the channel's volume very 50 milliseconds. I'm wondering if closures can cause memory leaks. 6. I can't find any reference to the parent SoundChannel in SoundTransform or SoundChannels in Sound, so I really cannot find any circular references in the class heirarchy. If you have any insight, please share. For SoundChannels that come from soundInstance.play() calls, it seems that even though I null all references to that soundchannel, they do seem to eventually accumulate over time until all 32 are used up.
10. ## Raknet vs OpenTNL vs ???

I was pretty frustrated with OpenTNL's documentation. RakNet is a good price, if you are willing to use non-free software.
11. ## Simplifying rotation calculations

Say that you have a "rotation vector" r that is (sin(30), cos(30)), that's the equivalent of your rotation angle = 30. If you wanted to rotate it by 10 degrees, you'd take r2 = (sin(10), cos(10)) and do an operation like this: r' = r.x * r2 + r.y * (-r2.y, r2.x) Occasionally, you'll need to renormalize r. You can cache the value of r2 and avoid using sin or cos at all. All the fmod(|r| + 360.0f, 360.0f) wraparound stuff that keeps |r| normalized for scalar rotation values can be avoided. Also, it is trivial to use that kind of rotation vector to accumulate linear velocity.
12. ## Simplifying rotation calculations

I recommend that you use 2d rotation vectors if at all possible. The occasional renormalization is cheaper than many sin/cos calls, and you can use simple dot product to rotate a rotation vector by another one.
13. ## Silverlight as UI overlay in DX9 application?

I'm trying to find a complete and decently performing UI solution to use in my application. Previously, I was using a Flash overlay, but there were a myriad of crashes that have stopped since I removed that. I prefer not to use something quite as obtuse as CEGUI, certainly a layout editor would be nice. Has anyone successfully used SilverLight in a C++ game? Is the C#->unmanaged C++ interop code a pain?
14. ## HDRPipeline DXSDK sample - why 3x3 instead of 4x4 downsampling?

Its more downsampling passes if the resolution was 1024x768 instead of 640x480. 3^6=729 4^5=1024. One less pass is required at a sane resolution if 4x4 downsampling is used.
15. ## HDRPipeline DXSDK sample - why 3x3 instead of 4x4 downsampling?

Can't a pixel shader do 16 texture lookups per pass? Why was 3x3 downsampling used for that sample?