Pixel to polygon

by Crazy Star


Posted on April 29, 2006 at 6:42 PM



This is my "pixel-to-polygon-converter" wip. It will hopefully be used for a platform hill engine sometime in the far future. Not much else to say.. check out the screen if you don't know what this is yet :)
Oh and by the way it's enlarged to 16x16 to show what's going on.
I'm aware of the "unknown variable intersectx" bug but just haven't done anything about it yet. (and wrong bouncing too..)


edit
controls:

pageup/pagedown - increase/decrease length of vector
left mouse&right mouse - increase/decrease angle of vector
enter - change room (slut is danish for the end btw ;))

<b>EDIT</b>
Improved the engine. It now handles several collisions per step and has less bugs. If you find a bug that isn't one of these
<img src="http://64digits.com/users/SpectreNectar/bug1.png">;
<img src="http://64digits.com/users/SpectreNectar/bug2.png">;

Then please inform me about it. For a further explanation as to what this does read the comments...
Yes, sadly this loses fps's fast when increasing the length but luckily it's not intended for very long lengths (maybe 5 or so if going really fast)

<b>EDIT</b>

Another update! Fixed the bug with negative speed, and got rid of straight surfaces as I call them (them being the sides of the walls).



Tasm commented April 29, 2006 at 7:07 PM
What's with the preview? Not very persuading.
Crazy Star commented April 29, 2006 at 7:21 PM
You're right. Now it's changed. What can I say my marketing skills and sense of humor isn't what they could be :)
firestormx commented April 29, 2006 at 7:46 PM
What's with the preview?
Quote
Heh heh, I love spectre's way of doing things. XD

That's a pretty nifty example.
Juju commented April 30, 2006 at 9:19 AM
What does it actually do though? I'm confused...
Crazy Star commented April 30, 2006 at 11:56 AM
What does it actually do though?
Quote
Oh yes.. Imagine the circle as the player position and the purple line as the motion of the player. The gray squares surrounding the line is the places to check for collision. When there is a collision (red square) the surrounding pixels are examined and lines are drawn to show how the pixel "curves". For each line shown a line intersection script is used and then the purple line bounces off the closest intersection point.
So basically it's a remake of the bounce against walls action in gamemaker.
The next step is gliding on walls.
Picture a ball rolling down a hill...
Juju commented July 22, 2006 at 9:06 AM
I want this. I want this is source code so much!
Crazy Star commented December 21, 2006 at 9:27 PM
Improved the engine.
Crazy Star commented December 28, 2006 at 4:05 PM
Another update! Fixed the bug with negative speed, and got rid of straight surfaces as I call them (them being the sides of the walls).
Grand-High Gamer commented December 28, 2006 at 7:22 PM
I heartly agree with theman!