View unanswered posts | View active topics It is currently Thu Sep 09, 2010 2:06 am



Post new topic Reply to topic  [ 184 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next
 The Go-Off-Topic Topic 
Author Message
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Here's some more for ya:

Code:
/* this code is a little old :/ */
void shoot( double ox, double oy, double angle )
{
  int c;
  double cosang, sinang; /* cos and sin of ang */
  double d, dend; /* distance variable and max distance */
  double posx=floor(ox); double posy=floor(oy); /* integer coordinates */
  double fracx=ox-posx; double fracy=oy-posy; /* fraction coordinates */
  int inx = 0, iny = 0;
  double arx, ary;
  double dincx, dincy, dval0, dval1;
 
  /* ray vector */
  cosang = cos(angle * pi / 180);
  sinang = sin(angle * pi / 180);

  d = 1/hz; cosang = cosang*d; sinang = sinang*d; /* ray increments */

  inx = posx; iny = posy;

  arx=0; if(cosang != 0) { arx = 1/fabs(cosang); } /* distance increments */
  ary=0; if(sinang != 0) { ary = 1/fabs(sinang); }

  /* "dval"s are there to prevent infinite loops when ray is parallel to axis */
  dincx = 0; dval0=1e32; dincy = 0; dval1=1e32;

  /* calculate integer coordinate increments */
  if (cosang<0) {dincx=-1; dval0=fracx*arx;} if (cosang>0) {dincx=1; dval0=(1-fracx)*arx;}
  if (sinang<0) {dincy=-1; dval1=fracy*ary;} if (sinang>0) {dincy=1; dval1=(1-fracy)*ary;}

  d=0; dend=5120; /* d = current distance, dend = max distance */

  while( d<dend )
  {
    /* move the ray one square forward */
    if (dval1>dval0) {inx+=dincx; d=dval0; dval0+=arx;}
      else {iny+=dincy; d=dval1; dval1+=ary;}

   if( map[iny][inx] > 0 ) /* ray hit a wall */
   {
     return; /* stop here */
   }
    
  /* I recently created an array that holds sprite indices, thus nullifying the need to perform this loop */
    for( c=0; c<numspri; c++ ) /* check collision with sprites */
    {
     if( sprites[c].dead == 0 && sprites[c].type == 1 )
     {
       if( inx == floor(sprites[c].bx) && iny == floor(sprites[c].by) ) /* ray hit a sprite */
       {
        sprites[c].health -= 10;
        if( sprites[c].health <= 0 )
        {
           sprites[c].active = 4;
          sprites[c].type = 4;
          sprites[c].move = stopped;
         numenemy--;
          beep( 30000, 1 );
        }
        return; /* only hit one sprite at a time */
       }
     }
    }
  }
}

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Tue Feb 16, 2010 9:47 pm
Profile WWW
Killed the first Ettin!
User avatar

Joined: Sun Sep 06, 2009 11:21 pm
Posts: 25
Location: Resting inside the Hypostyle...
Post Re: The Go-Off-Topic Topic
Wow, this site has heated up from the last time I was here... (Didn't have a pc and internet for some months :P) Btw this go-off-topic topic reminded me of the Game (which I now lost btw, thank you :evil: , but hey you lost too :lol: )

_________________
Those who do not move, do not notice their chains
-Rosa Luxemburg

I take my desires for reality because I believe in the reality of my desires
-Situationist graffiti from a may 1968 wall


Sun Mar 07, 2010 11:08 pm
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
:P :P :P

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Tue Mar 09, 2010 4:33 pm
Profile WWW
Picked up the Serpent Staff
User avatar

Joined: Fri Aug 21, 2009 3:23 pm
Posts: 70
Post Re: The Go-Off-Topic Topic
Is 9/11 an inside job?

_________________
Free your Mind ......

http://the-coolinator-lounge.blogspot.com/


Thu Mar 11, 2010 7:37 pm
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
I am coming very close to surpassing everyone in terms of how many posts I've written since I originally joined this board a few months ago.

:D :D :) :| :(

My feeling of accomplishment is short lived.

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Fri Mar 12, 2010 2:56 am
Profile WWW
Picked up the Serpent Staff
User avatar

Joined: Fri Aug 21, 2009 3:23 pm
Posts: 70
Post Re: The Go-Off-Topic Topic
Omg,

It's friday and it's 9am in the morning and I don't want to be here today. I have a meeting at 11 thats going to be useless. I really hope this day goes quick.

_________________
Free your Mind ......

http://the-coolinator-lounge.blogspot.com/


Fri Mar 12, 2010 2:05 pm
Profile
Team Member
User avatar

Joined: Fri Aug 07, 2009 1:49 pm
Posts: 247
Location: Netherlands
Post Re: The Go-Off-Topic Topic
Saturday morning, another great day for some Hexen modding today.

_________________
Half Life 2: The longest Acme Crowbar commercial ever made.


Sun Mar 14, 2010 8:38 am
Profile WWW
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
I'm on spring break, so I get to work on my 3D engine and waste time playing Mount&Blade for a week. :)

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Wed Mar 17, 2010 6:24 pm
Profile WWW
Killed the first Ettin!
User avatar

Joined: Sun Sep 06, 2009 11:21 pm
Posts: 25
Location: Resting inside the Hypostyle...
Post Re: The Go-Off-Topic Topic
I'm quite far from being able to take a break and I study a lot this period Q_Q.On the other hand I managed to reclaim my heroes of might and magic 3 so nights are woot-ing time! :) Anyone else here playing similar games?Oh and btw,

Quote:
Is 9/11 an inside job?

It doesn't really matter, does it?Whether it was or not, the US still used it as an excuse to invade Iraq and fuck shit up.There are motives and excuses for every thing that happens in human history.To be honest, I don't believe that nine eleven was an inside job, it seems just as a lunatic conspiracy theory but I haven't bothered to search it that much.However I have no doubt that a government would use it's citizens as expendable to further it's own interests since they basically....well already do it daily
Attachment:
thats-not-funny-excellent-iraq-sarcasm.gif
thats-not-funny-excellent-iraq-sarcasm.gif [ 56.58 KiB | Viewed 450 times ]

_________________
Those who do not move, do not notice their chains
-Rosa Luxemburg

I take my desires for reality because I believe in the reality of my desires
-Situationist graffiti from a may 1968 wall


Wed Mar 17, 2010 10:06 pm
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Let's not turn this thread into a discussion of politics, war, and the nature of man, please.

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Thu Mar 18, 2010 10:24 pm
Profile WWW
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Guess what!

This is my 108th post.

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Thu Mar 25, 2010 1:58 pm
Profile WWW
Picked up the Serpent Staff
User avatar

Joined: Tue Aug 18, 2009 11:10 am
Posts: 84
Post Re: The Go-Off-Topic Topic
At last it looks pretty:

Image

_________________
http://www.moddb.com/games/arilienta


Sat Mar 27, 2010 11:24 pm
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Looks pretty good, Lichenvale. :geek:

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Sun Mar 28, 2010 4:17 am
Profile WWW
Killed the first Ettin!
User avatar

Joined: Sun Sep 06, 2009 11:21 pm
Posts: 25
Location: Resting inside the Hypostyle...
Post Re: The Go-Off-Topic Topic
Quote:
Let's not turn this thread into a discussion of politics, war, and the nature of man, please.

Aww, you always ruin it for me :( Isn't it off topic enough? :P Btw what's so special about the 108th post?Lucky number?

@Lichenvale:That looks certainly interesting mate :) , where is it from?


Sun Mar 28, 2010 8:55 pm
Profile
Picked up the Serpent Staff
User avatar

Joined: Tue Aug 18, 2009 11:10 am
Posts: 84
Post Re: The Go-Off-Topic Topic
^Its from the game i'm working on ;) See my signature for more info.

_________________
http://www.moddb.com/games/arilienta


Mon Mar 29, 2010 11:03 am
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Quote:
Btw what's so special about the 108th post?Lucky number?

A bout of randomness, is all. :)

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Mon Mar 29, 2010 2:02 pm
Profile WWW
Killed the first Ettin!
User avatar

Joined: Sun Sep 06, 2009 11:21 pm
Posts: 25
Location: Resting inside the Hypostyle...
Post Re: The Go-Off-Topic Topic
Quote:
A bout of randomness, is all.

Aw snap, I didn't realise and failed to stay off-topic.And now I've lost the game :P
Quote:
^Its from the game i'm working on See my signature for more info.

I don't have much time now so I just gave the page a quick glance, but it looks sweet ;) .You are not doing this alone, are you?By the way, talking about signatures, mine did not appear in my last post.That's weird. :?

_________________
Those who do not move, do not notice their chains
-Rosa Luxemburg

I take my desires for reality because I believe in the reality of my desires
-Situationist graffiti from a may 1968 wall


Mon Mar 29, 2010 3:04 pm
Profile
Picked up the Serpent Staff
User avatar

Joined: Tue Aug 18, 2009 11:10 am
Posts: 84
Post Re: The Go-Off-Topic Topic
Me as programmer and my lazy mate as modeler.

_________________
http://www.moddb.com/games/arilienta


Mon Mar 29, 2010 5:11 pm
Profile
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Lichenvale, your avvy is awesome. 8-)

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Mon Mar 29, 2010 8:34 pm
Profile WWW
Fried a bunch of Afrit
User avatar

Joined: Sun Oct 11, 2009 4:10 pm
Posts: 227
Location: your head.
Post Re: The Go-Off-Topic Topic
Someone's been going on a posting spree...

_________________
In any human endeavor, once you have exhausted all possibilities and failed, there will be one solution, simple, obvious, and highly visible to everyone else.


Mon Apr 05, 2010 4:27 am
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 184 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 10  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.