Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Marathon-like 2d mixed with 3d?(DBPro)

Author
Message
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 25th May 2006 13:37 Edited at: 29th Oct 2007 21:02
Hi.

There's a game called Marathon, I'm not sure if you've heard of it, but in my book it's the best FPS I've ever played. The address to download the PC version (It was originally for the mac) is http://trilogyrelease.bungie.org/. The best pictures are here: http://www.bungie.net/Games/Marathon/.

Right. Now you know what I'm talking about, I can ask my question!

Marathon combines 2d with 3d. The maps are 3d, the NPCs and players are 2d. But the 2d NPCs have several pictures, so, if you were in front of one (Or maybe a little bit to the side) there would be a fron picture. If you were at 45 degrees, it would have a 45 degree picture. I'm wondering how I can do the same thing, it would be old looking, but it would use less polygons and less fps.

Help would be nice!

print rnd(20)/0

Attachments

Login to view attachments
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 25th May 2006 18:58
You need to find the angle between the monster, and the player, and then just switch the images by texturing a plain with a different angle. I don't know which of these 3 functions you would use, but you can try them out, you only need one of them.

function xang_between_objects(o1,o2)
y1#=object position y(o1)
z1#=object position z(o1)
y2#=object position y(o2)
z2#=object position z(o2)
ret#=wrapvalue(atanfull(y1#-y2,z1#-z2#))
endfunction ret#

function yang_between_objects(o1,o2)
x1#=object position y(o1)
z1#=object position z(o1)
x2#=object position y(o2)
z2#=object position z(o2)
ret#=wrapvalue(atanfull(x1#-x2,z1#-z2#))
endfunction ret#

function zang_between_objects(o1,o2)
x1#=object position y(o1)
y1#=object position z(o1)
x2#=object position y(o2)
y2#=object position z(o2)
ret#=wrapvalue(atanfull(x1#-x2,y1#-y2#))
endfunction ret#

Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 25th May 2006 23:10
Thanks! I needed the y rotation one, but it didn't quite work. It's given me an idea though!

Thanks again!

We were all new people once.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th May 2006 02:43
marathons anvil and forge were the most amazing editors I have ever played with, still today they compare with video footage of inhouse halflife tools

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself 
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 27th May 2006 11:54 Edited at: 27th May 2006 13:59
I haven't tried the editors yet, but I really want to!

I'm having trouble with the following code:


Hopefully someone can help!

EDIT: Sorry, I didn't make myself clear. I need to detect wether the colision object is facing forwards, left, right, or backwards, and enter a 1,2,3, or 4 depending on that.

We were all new people once.

Login to post a reply

Server time is: 2024-11-26 19:41:10
Your offset time is: 2024-11-26 19:41:10