Jump to content


Photo

Changes to player movement


  • Please log in to reply
30 replies to this topic

#1 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 04:33 AM

I want to take a look at the code for player movement (leaning and mantling, but also speed or crouching etc.). Where would I best start if I wanted to change something?

Can someone who knows his/her way around the source code of the mod point me in the right direction?

 

Thanks.


  • Bikerdude likes this

#2 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18455 posts

Posted 28 May 2017 - 04:58 AM

Hey stranger

 

You would need to first download a copy of latest SVN version, I will go request access for you.

 

Grayman maybe the best person for that.



#3 duzenko

duzenko

    Member

  • Mission Beta Tester
  • PipPip
  • 377 posts

Posted 28 May 2017 - 04:59 AM

Link to source code svn is here: http://www.thedarkmod.com/downloads/

It's public.



#4 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1189 posts

Posted 28 May 2017 - 05:00 AM

Depending on what exactly you want to do (and if you want to cover some time until you get the SVN version), you could take a look at the file "tdm_player_thief.def". There are some of the basic values like speed, height, etc. Accordingly, they are also easier to manipulate than working on the soure code.



#5 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 05:26 AM

Thanks. I need SVN access, because the 2.05 source archive doesn't compile on linux, but SVN might have the necessary changes. I already have access, but I forgot my login data. Taaaki will hopefully tell me.



#6 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18455 posts

Posted 28 May 2017 - 06:41 AM

Taaaki will hopefully tell me.

If you dont hear from him let me know.



#7 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11682 posts

Posted 28 May 2017 - 07:18 AM

@Baal,

 

What changes did you have in mind?



#8 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11682 posts

Posted 28 May 2017 - 07:20 AM

Thanks. I need SVN access, because the 2.05 source archive doesn't compile on linux...

 

How does it complain, and what version of linux are you using?



#9 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11682 posts

Posted 28 May 2017 - 07:27 AM

If you're thinking of mantling changes, coordinate them with stgatilov. He corrected some mantling problems back in April.



#10 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11682 posts

Posted 28 May 2017 - 07:32 AM

As for where to look for these things, most are probably in Physics_Player.cpp.

 

Just search for 'crouch', 'mantle', 'speed', 'lean', etc.



#11 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 12:11 PM

 

How does it complain, and what version of linux are you using?

Archlinux with a very recent version of GCC. I think someone already encountered the same problems and commited some changes to SVN. I'm going to try it now.



#12 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 01:11 PM

Trunk doesn't compile at all. The scons build files seem to not be set up correctly. I get a lot of missing headers while building.



#13 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 03:31 PM

In file included from game/../idlib/precompiled.h:132:0,
                 from game/precompiled_game.h:28,
                 from game/AF.cpp:20:
game/../idlib/../renderer/qgl.h: Im globalen Gültigkeitsbereich:
game/../idlib/../renderer/qgl.h:211:8: Fehler: »PFNGLBLENDEQUATIONPROC« bezeichnet keinen Typ
 extern PFNGLBLENDEQUATIONPROC    qglBlendEquation;

Glext.h is included in qgl.h. I think the correct one is found (renderer/glext.h), but another one seems to be already inlcuded at this point. The part that defines PFNGLBLENDEQUATIONPROC (inside the GL_VERSION_1_2 guard) is not executed.



#14 duzenko

duzenko

    Member

  • Mission Beta Tester
  • PipPip
  • 377 posts

Posted 28 May 2017 - 03:39 PM

qglBlendEquation sounds like one of the recent Nbohr's commits towards the soft shadow implementation.



#15 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7578 posts

Posted 28 May 2017 - 04:00 PM

Hmm.

 

I'll take a look, it's probably a redundancy somewhere unless your vendor doesn't support the function?

https://www.khronos....dEquation.xhtml

 

glBlendEquation shipped with Vanilla Doom 3 but wasn't made "external" in qgl.h


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#16 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 04:17 PM

Shouldn't that result in a runtime error? Or am I misunderstanding how that works?



#17 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 04:32 PM

Maybe we should use Glew (GL extension wrapper) to manage OpenGl?



#18 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7578 posts

Posted 28 May 2017 - 04:36 PM

That might be a good idea. I don't know why that was rolled-back during 2.03 but perhaps there was some contention about having

to maintain glew revisions for different Linux distros.

 

Try adding:

 

extern  void ( APIENTRY * qglBlendEquation )(GLenum mode);

 

to qgl.h


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#19 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 28 May 2017 - 04:48 PM

Not necessary. I just had to comment the declaration out. On to the next error!


  • nbohr1more likes this

#20 stgatilov

stgatilov

    Member

  • Development Role
  • PipPip
  • 340 posts

Posted 28 May 2017 - 09:56 PM

I think no one really looked into linux build after x64 branch merge.

Some files were added, some were removed, and linux make files remained the same.
I have had a feeling that they do not work for all the time from that moment...
 
I'm afraid they "need some love" now.
 
Here is at least the file changes since the time I joined back in April:

Spoiler
 
EDIT: as for the player movement, you should start at idPhysics_Player::MovePlayer in Physics_Player.cpp, just as grayman said.
It seems to be the main function for all the movement, you can reach all the other code from there.


#21 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 11682 posts

Posted 28 May 2017 - 10:12 PM

So who's going to work on getting the SVN version of linux to compile?



#22 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 29 May 2017 - 11:53 AM

I'll try.
  • stgatilov and nbohr1more like this

#23 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 30 May 2017 - 09:57 AM

Which (free) version of Visual Studio could I use to take a look at the windows build and compile the code? Would be nice if it ran on Wine.



#24 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7578 posts

Posted 30 May 2017 - 10:00 AM

We use MSVC 2013 Community Edition. (Free)

 

http://wiki.thedarkm...mpilation_Guide


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#25 Baal

Baal

    Hero Mapper

  • Development Role
  • PipPipPip
  • 1014 posts

Posted 02 June 2017 - 02:15 AM

Still compiling. I'm thinking about trying to adapt dhewms cmake files. I don't like Scons.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users