Jump to content

Force power's interactions with item objects and npcs.


Lockgo

Recommended Posts

look for the comment lines call //[japhys]

I never comment my code like that ;)

 

 

So I'm look through japhys, and I'm just wondering, where does your code begin. :P

I'm not sure exactly how much of it is working, but the main files to look at are trunk/code/game/bg_physics.cpp and trunk/code/game/g_physics.cpp. The handling of the physics itself is done by the Newton Game Dynamics physics engine which can be found in trunk/code/newton. I haven't changed any code in that directory, it's just the (probably now, very out of date) Newton physics engine out of the box.

Link to comment

hmm im sure you did comment you codes in w_force.c and some other places with this line, but then again its been years sense i look at it last time :D

 

and then again i was right 

//[JAPhys]
int strap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode );
void strap_FS_Read( void *buffer, int len, fileHandle_t f );
void strap_FS_FCloseFile( fileHandle_t f );
//[/JAPhys]
and lines like //[Physics] is also there :)
Link to comment

 

hmm im sure you did comment you codes in w_force.c and some other places with this line, but then again its been years sense i look at it last time :D

 

and then again i was right 

//[JAPhys]
int strap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode );
void strap_FS_Read( void *buffer, int len, fileHandle_t f );
void strap_FS_FCloseFile( fileHandle_t f );
//[/JAPhys]
and lines like //[Physics] is also there :)

 

Oh right. I must have still been doing that back then :P I wouldn't do it now though lol

 

Do you suggest that I should try using newton dynamics 3.11, as appose to what you had with 2.00?

I imagine the Newton API between version 2 and 3 changed quite a lot so it probably wouldn't work, but you could give it a try.

 

Anyhow, I stopped working on it partly because like I said, at the time I couldn't get the level of integration that I wanted. You can't just add a model and rotate it arbitrarily and have a correct bounding box because of limitations in the engine. It's doable now, but the networking issue is still there. The only objects that could be affected by physics were map objects. The cubes in all of my demo videos are part of the map itself, but turned into physics entities.

Link to comment
  • 3 weeks later...
  • 3 months later...

Newton had weird DLL problems. Not even the sample programs that came with the sdks would work. Decided to try my luck with Bullet.

 

Also, found out why the rotation of items seem random. Turns out, they are just random for some items, as the comment "// give weapon items zero pitch, a random yaw, and rolled onto their sides...but would be bad to do this for a bowcaster" stated.

Link to comment

Most of it was simple references. Having to add references in Visual Studios, having to delete pre-existing lib files so it could re-compile them, and even after a few, it would still say "does not exist" even if I typed out the exact folder paths for the #include statement.

 

After having to do that with Bullet though, I probably wouldn't have changed from newton. Had I know Bullet was going to make me do the same thing.....C'est la vie.

Link to comment

Most of it was simple references. Having to add references in Visual Studios, having to delete pre-existing lib files so it could re-compile them, and even after a few, it would still say "does not exist" even if I typed out the exact folder paths for the #include statement.

 

After having to do that with Bullet though, I probably wouldn't have changed from newton. Had I know Bullet was going to make me do the same thing.....C'est la vie.

Sounds like basic linking problems :) You're going to get those problems with any library unless you have a better understanding of what the linker does and how it searches for the .lib files.

Link to comment
  • 9 months later...

Its been a while. I decided to focus on my original objective. I was able to make force grip interact with items missiles and thermal detonator. I want to get back to trying to implement a physic engine into Jedi Academy. I learned a lot about gentity_t in getting grip to work. However, the import/convert-BSP that bullet includes, only really works with Quake-3 arena levels. From what I understand, you have to know how the BSP levels work for each individual Quake 3 powered game, since they all do it different.

 

I also found that force grip was a bit wonky. Even before I started editing it. Always has been from what I could tell. 

 

Here are the videos

http://www.dailymotion.com/lockgo 

 

I should also note that the rockets where put at 1/9 the speed, I actually think its next to impossible to catch a rocket at normal speed with the range force grip gives you. I was actually tempted to make an entire new force power as appose to editing grip. Sorry for the late update, though.

 

http://www.dailymotion.com/video/x373xly_2015-09-16-23-28-02-rep_videogames

Archangel35757 likes this
Link to comment
  • 2 weeks later...
  • 10 months later...

Felt kind of bad that I never "published my work", but I actually don't know what type of "file" I would need to make for my edits to the force powers. Mainly force grip. What would be needed to have my modifications something you could add to a post complied game.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...