12p Posted October 30, 2011 Share Posted October 30, 2011 To recreate Source (Half Life 2 and Counter Strike:Source)'s physics engine on MTA? I just want to know that. No how to do it; just if is that possible. Link to comment
Faw[Ful] Posted October 31, 2011 Share Posted October 31, 2011 I d'ont think so , to do that MTA need a new game engine and ... it need it alot Link to comment
12p Posted October 31, 2011 Author Share Posted October 31, 2011 Only MTA Team will know (in this forum, I guess). They have made the awesome MOD, they should know whether this is possible. BTW C++ can do almost anything, I think it IS possible Link to comment
Wojak Posted October 31, 2011 Share Posted October 31, 2011 In theory it is possible using the current MTA functions, lua and maths. We have the element matrix (3D coordinates and 3 rotation vectors) We have the element bounding box – more or less the shape of the element and with is surface and volume we have the moveObject function, that allows us to change the element matrix in any way within given time interval (minimum 50ms) so we can make relatively smooth acceleration simulation we also can assign any abstraction data (such as mas) to the element using setElementData and of course using the above data we can calculate collisions between the elements and active forces unfortunately there would be lag with large number of the elements and maybe some sync problems... Link to comment
karlis Posted October 31, 2011 Share Posted October 31, 2011 we have the moveObject function, that allows us to change the element matrix in any way within given time interval (minimum 50ms) so we can make relatively smooth acceleration simulation moveobj is not the way, i have made it as smooth while keeping the flexebility to change the velocity and etc each frame way i made some throwing stuff(its secret atm) just store velocity and grav velocity, and onclientrender get time elapsed since last frame, add gravity velocity, multiply it with time, add up current pos with velocity, check line of sight, and if its clear set new pos, if its not, use the hit pos and normal do collide, etc. you can change rotation similarly as well. all you need is mayor physics formula knowledge. this works well and synced, but there is very slight desync possibility if the fps varies much, but tis basically tipical way how it all works in game. btw we also have getElementColShape(no idea how accurate it is) Link to comment
12p Posted October 31, 2011 Author Share Posted October 31, 2011 However. It is possible but extremely complicated and desynced in this engine by now. Link to comment
karlis Posted October 31, 2011 Share Posted October 31, 2011 it is extremely complicated, but sync can be maintained at original mta level. did you expect adding psyhics to be easy? Link to comment
12p Posted October 31, 2011 Author Share Posted October 31, 2011 (edited) did you expect adding psyhics to be easy? Of course not. Don't ask me such things. Edited November 4, 2011 by Guest Link to comment
x86 Posted November 4, 2011 Share Posted November 4, 2011 No, and please do not use badwords. Link to comment
Recommended Posts