* FAQ    * Search  * Register * Login 
Active topics
Unanswered topics

All times are UTC-06:00



Post new topic  Reply to topic  [ 9 posts ] 
Author Message
 Post subject: \"Duel\" mod code question
PostPosted: Thu Jan 04, 2007 4:49 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Does anyone have the source code and/or level-design specs for the \"Duel\" mod?

I'm working on a mod myself (see http://descentbb.net/viewtopic.php?t=10707), and the major sticking point I'm up against is forcing players to a certain location or spawnpoint. The Duel mod does this (when a particular \"arena\" is picked), so I know it's possible, but I'm not sure how it's being done.


Top
   
 Post subject:
PostPosted: Fri Jan 05, 2007 2:08 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Per the information I've been given, the original coder for \"Duel\" was Gwar. Anybody know how to contact him?


Top
   
 Post subject:
PostPosted: Fri Jan 05, 2007 5:34 pm 
Offline
DBB Ace
DBB Ace
User avatar

Joined: Mon Apr 17, 2006 2:13 pm
Posts: 197
Location: The Netherlands
Look in the dallasfuncs.cpp provided by the D3-SDK. There's a function
with which you can move objects, so you could get the code from there.


Top
   
 Post subject:
PostPosted: Sun Jan 07, 2007 7:17 am 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Wed Mar 15, 2000 3:01 am
Posts: 8826
Location: Seattle
You have to be careful when moving objects to specific places. Once should be fine (we did it in OG3 using whatever function was available, I lost the source a long time ago :( ) but if you try doing this frequently you get stuttering.

I remember how I originally implemented the hovering code for OG3... every frame the game would shoot a ray downwards from the ship, determine the distance between the ground and the ship, and move the ship accordingly. Led to jerky gameplay.


Top
   
 Post subject:
PostPosted: Sun Jan 07, 2007 2:13 pm 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
The Lion wrote:
Look in the dallasfuncs.cpp provided by the D3-SDK. There's a function
with which you can move objects...


Including playerobjects? I'll have to look into it.

DCrazy wrote:
...but if you try doing this frequently you get stuttering.


How often is "frequently"? I'll only have to do it once per player every few minutes or so... is this an issue?


Top
   
 Post subject:
PostPosted: Sun Jan 07, 2007 10:33 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Wed Mar 15, 2000 3:01 am
Posts: 8826
Location: Seattle
Foil:

That's fine. I was talking ~60 times per second. Though you might look into using waypoint objects if they suit your needs.

And come to think of it, we didn't actually use any functions to move the player; we set the player's position vector directly. It's part of the object struct, should be a Vec3 or Vector3 or whatever it's called.


Top
   
 Post subject:
PostPosted: Mon Jan 08, 2007 9:25 am 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Excellent, thank you!


Top
   
 Post subject:
PostPosted: Mon Jan 08, 2007 11:16 pm 
Offline
DBB Alumni
DBB Alumni
User avatar

Joined: Wed Mar 15, 2000 3:01 am
Posts: 8826
Location: Seattle
No problem; just be careful that your pointer to the player object is always valid, and remember that any changes you make won't be taken until the next frame.

Also, a lot of collision detection will be avoided if you directly set the object's position, and you might wind up not triggering the \"changed segment/room\" event that's normally raised when an object crosses from one room or terrain segment into another. Your best bet is to do a lot of debugging, and keep all the edge cases in mind.


Top
   
 Post subject:
PostPosted: Tue Jan 09, 2007 1:37 am 
Offline
DBB Material Defender
DBB Material Defender
User avatar

Joined: Tue Nov 23, 2004 3:31 pm
Posts: 4900
Location: Denver, Colorado, USA
Thanks for the advice.

I haven't yet dived back into the code, but I probably will here in the next couple of days.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 2 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:  
cron



Descent'rs have piloted these pages
 
The layout and contents contained within this site are © DescentBB.net 1997-2006.
Descent, Descent II are © Parallax Software Corporation.
Descent III is Outrage Entertainment.
Descent is a Trademark of Interplay Productions.

Miner Wars™ is trademark of Keen Software House s. r. o.
.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group