JAPhys Mod - Physics in JKA -1 reply

Please wait...

Xycaleth

Resident programmer guy

50 XP

3rd May 2016

1 Uploads

86 Posts

0 Threads

#1 11 years ago

Hi everyone :)

Since August 2009 I've been working on a mod for JKA which attempts to include a physics engine into the game. As all of you will know, JKA lacks a proper physics engine, and personally I think physics can add an extra depth to gameplay if it's used in the right way.

Some of you might have already seen the demo videos I've uploaded on to YouTube. I've not publicly mentioned this until now, because I felt I wouldn't be showing anything new - Stalax has already shown some attempt at incorporating a physics engine into JKA, but development on this has stopped. I've recently got a working version of something that Stalax (to my knowledge) didn't have implemented. JAPhys uses the same physics engine as the one that Stalax used, which is Newton Game Dynamics.

Here's three videos of what is somewhat completed, but bear in mind everything is still WIP so these are likely to change their behaviour (for the better).

And finally, here is the new feature which Stalax did not have: buoyancy in water. Sorry about the lighting, but I didn't have a lot of time to make the map look better like the one in the first two videos :P

If you're wondering, the numbers on the boxes show the mass of the boxes. I will be adding support to spawn models as physics objects instead of plane boxes, but for testing purposes, boxes are the easiest to get working, and once I've completed a fair few things I have planned, then I'll think about adding models as physics objects.

Stay tuned for (likely to be slow but stunning) updates!

For the developers: This mod is currently open source. You can find my project page here: japhys - Project Hosting on Google Code. Currently (25th January 2010), the code is really quite out of date but what's in there is working. Please note that I will not answer any questions regarding the source code. The code is there for people who know how to use it, and/or can solve the problems themselves. I will, however, explain how the physics engine is used by the game.

Questions I know people will ask: Will you be adding cloth physics? Possibly, possibly not. If I can work out a reasonable way of adding it, and without too much hassle to modelers, then maybe.

Will you be adding ragdoll physics? This is something I want to add, so hopefully it will make it into the mod. If I do add it, it will more likely to be later rather than sooner.

Where can I download it? Nowhere as of yet. It's not finished yet.

When will it be released? As with all good things, "When it's done".

Will it support Mac? Question is, "will it support Linux and Mac?" :P Hopefully, yes. The physics engine I'm using has implementations for Windows, Linux, and Mac so as long as I have access to all three OSs then I can. Unfortunately, I don't have access to a Mac! So I'm hoping someone will be able to help me out there.

Why haven't JKGalaxies added physics if it's so easy to do it? First of all, doing this is no easy task. I've spent the past few months implementing what I consider a small portion of a full physics implementation. Having spoken to BobaFett of the JKG team, he's told me that the team doesn't feel it's worth the time and effort to implement something which they don't think will add to the gameplay they are after. My 2 cents on to the end of this, is, adding a physics engine is only worthwhile if it's fully implemented. Not doing so will create inconsistencies and this is bad for any mod I think.

Will this be for single player too? No. This modification is entirely code-based, which is impossible for single player mode. It is available for multiplayer only.




katanamaru

Fencer, Lifter, & Dancer

50 XP

3rd February 2006

0 Uploads

1,454 Posts

0 Threads

#2 11 years ago

Great to see the unveil here. Good luck to you.




Erstok

Anonymous

50 XP

18th September 2008

0 Uploads

255 Posts

0 Threads

#3 11 years ago

People wanted physics would have added years ago honestly. 2010 and the Jedi Knight series loses people just about every year. How would physics help an aging community.

Think getting the SP source and 64 player slots would be better honestly. :deal:




jk3editor

Retard Hungarian Modder

50 XP

21st August 2008

0 Uploads

1,520 Posts

0 Threads

#4 11 years ago

[COLOR="Navy"]You know something, good luck:D[/COLOR]




Guest

I didn't make it!

0 XP

 
#5 11 years ago

the last video is blackness :o




eezstreet

Lord of the .DCC files

50 XP

16th June 2008

0 Uploads

2,662 Posts

0 Threads

#6 11 years ago

Erstok;5221295People wanted physics would have added years ago honestly. 2010 and the Jedi Knight series loses people just about every year. How would physics help an aging community.

Think getting the SP source and 64 player slots would be better honestly. :deal:

Moan and groan, that's all I hear. It's better than nothing, and it is certainly better than a lot of things created from the JA community (we don't need more bad skins, especially paintbucketed stormtroopers or REBORN skins of all things). SP source would be better, but who would actually manipulate it to their advantage? Every modding community loses members each year. People lose interest, they grow up, things change, yada yada yada. Unless you have something better made, I really can't see your position on this. Nevertheless, physics are a challenging feat to accomplish codewise, especially without engine source. I applaud you, Xycaleth, for creating something the entire community could use. I might just be using your code ;)




Authuran

Queef Richards

50 XP

2nd October 2005

0 Uploads

4,671 Posts

0 Threads

#7 11 years ago

First of all, I am a big fan of physics in video games, so kudos to you man for finally deciding to finish this, and not dropping everything so you can make JK4. Second, I noticed how you said JKA (or, Ravensoft's version of Id tech 3) lacked a proper physics engine? It does have a physics engine in it. I'm not sure what you mean by 'proper' though. Proper as in objects rotate around in the air and spin realisticly, or proper as in something hits something at this speed so it bounces back at this height? JKA features the second.

Also, CLOTH PHYSICS ARE POSSIBLE?!11 Sorry for the cap text there, but that just might inspire me to try out modeling and many other people if you can find out how to make your erected cloth flow beautifully and realisticly.




eezstreet

Lord of the .DCC files

50 XP

16th June 2008

0 Uploads

2,662 Posts

0 Threads

#8 11 years ago

Authuran;5221424First of all, I am a big fan of physics in video games, so kudos to you man for finally deciding to finish this, and not dropping everything so you can make JK4. Second, I noticed how you said JKA (or, Ravensoft's version of Id tech 3) lacked a proper physics engine? It does have a physics engine in it. I'm not sure what you mean by 'proper' though. Proper as in objects rotate around in the air and spin realisticly, or proper as in something hits something at this speed so it bounces back at this height? JKA features the second.

Also, CLOTH PHYSICS ARE POSSIBLE?!11 Sorry for the cap text there, but that just might inspire me to try out modeling and many other people if you can find out how to make your erected cloth flow beautifully and realisticly.

Physics as in stuff other than guns/dead people can be thrown around. Cloth physics would require a lot of work to do, and it is probably close to impossible to do. Most games with even the highest end graphics from 2004 (a year after JA came out) didn't even have cloth physics, not to mention that I don't think the engine will let it work. However I'd like to see if raycasted shadows could be done. ;) (raycast = same quality shadows as what movies use today, and someone made raycasting possible for Q3 so it is possible, how is the question))




Guest

I didn't make it!

0 XP

 
#9 11 years ago

Very nice to see. The demos honestly didn't look very realistic (unusual bobbing on water, one of the boxes in the force-push flies faster from bouncing off the wall than it does when it hits the wall), but hey, this is JKA, not a current-gen, state-of-the-art game, so I'll take what I can get. Keep up the good work.




Xycaleth

Resident programmer guy

50 XP

3rd May 2016

1 Uploads

86 Posts

0 Threads

#10 11 years ago

Erstok;5221295People wanted physics would have added years ago honestly. 2010 and the Jedi Knight series loses people just about every year. How would physics help an aging community.

Think getting the SP source and 64 player slots would be better honestly. :deal:[/QUOTE] I see this mod is mainly a tech demo to show what others what they could have in their mod (the source code is available, so they can add it to their mod). If the mod becomes more than that, then obviously I'll be thrilled but that's not my main goal. Anyway, people have been asking for the SP source code for years now, but we still haven't got it. And if you say something like this won't help an aging community, how will adding extra slots on a server help it? :P

Ghosh Lorz Geptun;5221407the last video is blackness :o

Sorry about that :rolleyes: I'll try and redo it in the near future.

[QUOTE=Authuran;5221424]Second, I noticed how you said JKA (or, Ravensoft's version of Id tech 3) lacked a proper physics engine? It does have a physics engine in it. I'm not sure what you mean by 'proper' though. Proper as in objects rotate around in the air and spin realisticly, or proper as in something hits something at this speed so it bounces back at this height? JKA features the second.

Q3's 'physics engine' is pretty crude. It basically has collision (which every game has had since the dawn of gaming), and a few predetermined 'trajectories' as the game calls them, and JKA introduced some 'expensive physics' which allows realistic bouncing. Other than that, it has no physics :P The ones I mean are ones where forces can be applied to other objects so that they accelerate in the correct way. Rotations as well are something JKA does not do. So JKA lacks a lot of things the real world has.

However I'd like to see if raycasted shadows could be done. ;) (raycast = same quality shadows as what movies use today, and someone made raycasting possible for Q3 so it is possible, how is the question))

Raycasting is extremely expensive, and for movies, each FRAME is drawn over a few minutes. The quality you can get in real-time games is not as good, but real-time raycasting will drop the FPS a lot. Most games nowadays use a shadow mapping technique (or variations of it).

Very nice to see. The demos honestly didn't look very realistic (unusual bobbing on water, one of the boxes in the force-push flies faster from bouncing off the wall than it does when it hits the wall), but hey, this is JKA, not a current-gen, state-of-the-art game, so I'll take what I can get. Keep up the good work.

Thanks :) There still needs to be work done on material types. At the moment everything is of the same 'material'. So metal doesn't behave like metal, rock doesn't behave like rock, and so on. That's something for later!