.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Offtopic (http://forums.bots-united.com/forumdisplay.php?f=23)
-   -   Show off your finest piece of code! (http://forums.bots-united.com/showthread.php?t=3292)

Rifleman 31-12-2004 04:37

Re: Show off your finest piece of code!
 
hey , its quite easy to understand the code , but I se many "STEAM" phrase inside :D Perhaps I could do something :)

[EDIT]
Now player can fire , but no bullet appear , no sound :(

sfx1999 31-12-2004 06:35

Re: Show off your finest piece of code!
 
I forgot to show the output of the full program. Here it is:

Quote:

Creating first vector (3, 5, 2)
Creating second vector (1, 9, 7)
The first vector is 6.16441 units long.
The second vector is 11.4455 units long.
Normalizing first vector. It is now (0.486664, 0.811107, 0.324443) and 1 units long.
Normalizing second vector. It is now (0.0873704, 0.786334, 0.611593) and 1 units
long.
vector1 + vector2 = (0.574035, 1.59744, 0.936036)
vector1 - vector2 = (0.399294, 0.0247735, -0.28715)
vector1 cross product vector2 = (0.240947, -0.269294, 0.311814)
vector1 dot product vector2 = 0.878748
Press any key to continue . . .
Does anyone know if the data is accurate?

@$3.1415rin 31-12-2004 09:56

Re: Show off your finest piece of code!
 
just check it for yourself. normalized vectors have the length 1 when using the appropriate norm and addition and mutliplication shouldnt be a problem neither. if you have problems with your code, maybe you should start another thread for itself, or start a general "misc coding questions" thread

FrostyCoolSlug 31-12-2004 10:05

Re: Show off your finest piece of code!
 
Some random crap i dug up from one of my webservers :p

PHP Code:

function mt_diff($a$b)
{
    
// Function designed to confuse the FUCK outta anyone.
    
list($am$ai) = explode(' '$a);
    list(
$bm$bi) = explode(' '$b);
    if (
$ai $bi) {
        return (
$ai $bi) + ($am $bm);
    } elseif (
$ai == $bi) {
        if (
$am $bm) {
            return (
$ai $bi) + ($am $bm);
        } elseif (
$am $bm) {
            return (
$bi $ai) + ($bm $am);
        } else {
            return 
0;
        } 
    } else {
        return (
$bi $ai) + ($bm $am);
    } 


And theres always this one..

PHP Code:

// kthx..
die(); // !!!! 


biohazerd87 31-12-2004 11:22

Re: Show off your finest piece of code!
 
not really a code... but it is the first thing i have ever made in flash and it took awhile to make.....
www.crazymonkeycomputers.com


All times are GMT +2. The time now is 17:57.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.