• Welcome to Dark Bit Factory & Gravity.
 

The algorithm that almost killed you to implement.

Started by Pixel_Outlaw, January 24, 2008

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Pixel_Outlaw

I was just wondering, what was your biggest hurdle or algorithm to create? Mine was probably creating my 3D primitives routines. The original forerunner to the library one I use now about killed me. Especially creating a torus with many parameters in 3D space after I passed Geometry with a D+ and failed Trigonometry in highschool. Also arrays were very hard for me to conceptualize when I started learning to program.

I can look back and concepts that were one hard are child's play. I would eventually like to start playing with constructive geometry such as the "Marching Cubes" and also Constructive Surface Geometry. Really lofty goals but some of the things I do now were unfathomable when I started.

What concepts or situations were especially hard for you or continue to be?
Challenge Trophies Won:

Jim

Collision detection/physics in the skateboarding game, and tieing that all in with the controls and the animations that the player could go through.  I'm still not sure I could do that again...

It bugs me that I can't work out why my 4d fractals don't work.  :)  Can I really not render them volumetrically?

Jim
Challenge Trophies Won:

relsoft

Challenge Trophies Won:

Stonemonkey


stormbringer

Find the perfect balance between development time and client's requests
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Shockwave

My first perspective correct texture mapping routine was a pain in the arse to make.

I remember it well, I wrote it in Blitz basic, it was shortly after I argued with Parabellum. He had written a really nice perspective correct routine and he was the first person to do it in software in Blitz Basic as far as we knew..

Anyway, I couldn't use his mapper any more so I had to write my own.

First of all I wrote a linear mapper which was ugly, it had textures sliding all over the faces, then I cheated by subdividing my large polygons into lots of smaller ones to counter attack the problem and finally I bit the bullet.

I had read a lot of articles about texture mapping and seen lots of source code by people like Jim and Stonemonkey, but none of it made much sense, they were well written but I couldn't understand how they worked.

Then one day I just sat down and did it, I really had to concentrate on those articles and even when my code worked, I still never understood for several days why it worked.

So there was that.

The other one that springs to mind was when I wrote a filled 3D version of the old atari classic "battlezone"  in yabasic on the playstation 2.

I would run into problems almost daily on that one.. The worst one was calculating rotation offsets for the enemy tanks because they had to rotate according to your viewpoint, think about it, hold your mobile phone to the side of your head and gradually turn to face it, you'll notice as it comes into view that first you can see the left side of it, then eventually the right side of it. That really pissed me off and took a long time for me to solve!

Shockwave ^ Codigos
Challenge Trophies Won:

Shockwave

Oh, and the one that I failed miserably at was a bsp routine.
Shockwave ^ Codigos
Challenge Trophies Won:

Stonemonkey

Another one for me that I still have a look at now and again is poolball collisions.

Shockwave

Quote from: Stonemonkey on January 24, 2008
Another one for me that I still have a look at now and again is poolball collisions.

Ouch!
Shockwave ^ Codigos
Challenge Trophies Won:

Rbz

For me it was this directX9 pixelshader framework,  and this 4k sound system

I have spent some months to make those things working.
Challenge Trophies Won:

rain_storm

Quote from: Stonemonkey on January 24, 2008
Another one for me that I still have a look at now and again is poolball collisions.

Tell me about it I have still to route out the bugs in my Circle / Line Segment Colision routines. It's a major headache

Challenge Trophies Won:

p01

Sound synthesis still remains black magic to me. I manage to generate some sounds but have no clue what I'm doing or supposed to do, yet alone generate something that sound good.  :P

Pixel_Outlaw

Quote from: p01 on January 25, 2008
Sound synthesis still remains black magic to me. I manage to generate some sounds but have no clue what I'm doing or supposed to do, yet alone generate something that sound good.  :P

Yes, I can understand that. It's odd because you have to use one sense (vision) to create a stimulous in another sense (audio). I too can't quite grasp the concept. You can see waves and numbers plotted on the screen but what do they mean as an audio signal?


Currently, the who arrays of arrays thing about drove me crazy to save and load. In my font program I have arrays full of wrapping objects that wrap a variable element array. It becomes kind of annoying.

Also when I begain programming I just couldn't get the concept of rotation of a point about a point. I got a migraine when trying to figure out why it worked. Now with a better understanding of trig I can visuallize it mentally and it breaks down to almost nothing. This little formula is essential. It lets me use movement vectors, rotations and orbits and some other usefull functions.
Challenge Trophies Won:

Tetra

I think one of the things I wrote where I actually lost some hair off my head!!! was the polyclip routine thats clipped a polygon in one run of the function. That was a right head scratcher for me atleast :)
Challenge Trophies Won:

Jim

I remember that - I'm dead pleased you solved the problem, but you are definitely the only person on the planet who can decipher what you wrote! ;)

Jim
Challenge Trophies Won: