Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

game help

Name: Anonymous 2007-11-28 7:14

Right if yu can help me you are legends.

The problem:
I'm making a game in java atm and I need the enemy objects to move towards the players ship as it is moved around.
Does anyone know an algorithm for this?
Cheers

Name: Anonymous 2007-11-28 7:16

MoveShitTowardsShit2d(),
and similarly,
MoveShitTowardsShit3d().

I think there is a complete analysis in Knuth.

Name: Anonymous 2007-11-28 7:18

what. the. fuck?

Name: Anonymous 2007-11-28 7:26

>>1
It's very simple. Just take the dot product to determine the distance between the two points, then reduce that distance by an amount determined from the speed of the object (i.e. bringing the objects closer together), then calculate the new position based on the previous angle(s) and new distance.

Name: Anonymous 2007-11-28 7:47

Forget it. It's NP-complete.

Name: Anonymous 2007-11-28 10:25

Fatal error! Message could not be posted.

Please post threads less often!

Name: Anonymous 2007-11-28 11:25

will that allow you to tune a fish?

Name: Anonymous 2007-11-28 11:39

/prog/ is for programmers, not for non-programmers trying to become such.

Name: Anonymous 2007-11-28 12:18

>>1
Uhh... find slope of line between enemy and player, move enemy by slope * speed?

Name: Anonymous 2007-11-28 12:40

>>9
That's what >>4 said

Name: Anonymous 2007-11-28 15:02

>>1
Read SICP.

Name: Anonymous 2009-03-06 12:00

Line Learn to Haskell Code here includes.

Name: Anonymous 2009-03-06 13:28


76 Fuck you I when I realised   that at least   give some fucking   html handbook PS.

Name: Anonymous 2013-01-19 23:40

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List