Page 3 of 4

Posted: Sun Mar 20, 2005 12:08 pm
by blender81
enjay: thanks for the heads-up, I didn't know about that distance glitch. I'm guessing the problem might lie with a sqrt error earlier pointed out in this thread; still haven't looked at it yet.

And yes, the code definitely can be tidier!

Posted: Mon Mar 21, 2005 1:41 am
by Linguica
Here is the code I hacked in for my gravgun.wad, it is extremely stupid looking but I tried to do it as fast as I could and with as little thought as possible.

Code: Select all

function int stupidcos(int angle){
	if(angle>32767){
		angle*=-1;
		angle+=65536;
	}
	return cos(angle);
}

function int stupidsin(int angle){
	if(angle>49152){
		angle*=-1;
		angle+=32768;
	}
	angle+=16384;
	return -stupidcos(angle);
}

Posted: Mon Mar 21, 2005 5:12 pm
by DoomRater
Ling, your code suggests that the sine function didn't return the correct results, but the cosine did. Maybe there's something wrong with the code for sine?

Also... a quick reminder, we need to convert the angles into binary angle measurements before we pass them to these routines, NOT RADIANS.

Posted: Mon Mar 21, 2005 7:32 pm
by Linguica
DoomRater wrote:Ling, your code suggests that the sine function didn't return the correct results, but the cosine did.
It was bizarre, like half of the cos function wouldn't work and 3/4 of the range of the sin function wouldn't work, or something like that.

So I just used the half of the cos function that worked, then flipped it upside down for the other half, then shifted it over by pi/2 for the sin function.

Posted: Tue Mar 22, 2005 9:28 am
by DoomRater
I think someone should print out test data of the sine function and the cosine functions and compare it to the real answers, then submit it to Randy or something. This really is holding back some cool tools.

Posted: Tue Mar 22, 2005 6:38 pm
by Your Name Is
I am so sorry, but I have not figured out any improvements yet. I am still sorting out the script code.

Posted: Tue Mar 22, 2005 11:27 pm
by Cptschrodinger
Just whats in that package anyway? Pie?

Posted: Thu Mar 24, 2005 10:05 pm
by blender81
sniper joe:
The wad package contains a first pass at making a compass/radar hud display with a hint of lemon meringue. If anyone can improve the recipe feel free to share.

Image

My intention for doing this is to accomodate giant maps, a la Operation Flashpoint or Far Cry. I thought it would be neat to simply give the player an objective at the far end of a map, tell the player "there's a taco stand three miles away, go blow it up", and let the map play itself out.

Another idea bounced around these forums are the on-screen objective markers (ie halo) that directly draw an overlay on your viewpoint. This would be fantastic, but I don't know of any ACS provisions that would make this possible (some sort of thing coordinate -> screen coordinate conversion). I suppose you could do some really fancy coding with the player angle & objective distance & FOV, but that sounds fairly headache-inducing.

This is further going off on a tangent, but this floating overlay draw could also be applied to a crosshair system similar to the Smartgun in the Aliens vs Predator games. It would be pretty cool to have some uber handcannon that automatically tracks monsters, its crosshair locking on and turning green when it has a successful lock.

Posted: Thu Mar 24, 2005 11:10 pm
by Cptschrodinger
*Eating box* What? It's a wad? *notices the pagage has glass in it* ACK! Glass in gums!! AAAAUUUUGGGG!!!!!! *Falls over* My mouths a river of blood!!! *Passes out*

Posted: Thu Mar 24, 2005 11:13 pm
by Xaser
"ACK! GLAFF IN TEEFH!"

Heh, this radar thing looks incredibly awesome! I didn't even know something like this was possible in Zdoom... heh. :P

Posted: Thu Mar 24, 2005 11:23 pm
by Cptschrodinger
With my last breath I curse Xaser!!! *Dies*

Posted: Tue Mar 29, 2005 7:01 am
by Grubber
My contribution:

Posted: Tue Mar 29, 2005 7:21 am
by Nmn
^ PRAISE :rock: :rock: :rock:

Posted: Tue Mar 29, 2005 11:39 am
by Your Name Is
Holy jesus thank you Grubber!

Posted: Wed Mar 30, 2005 1:42 am
by jallamann
:surprise: