Module: BMOD - Extended Physics Module
2 Attachment(s)
https://github.com/jonatan1024/bgmod..._logo/bmod.png
What is BMOD? BMOD allows amxx developers to use physics engine (Bullet) inside their plugin. There are few videos, so you can get the idea, what kind of things can be achieve with this: http://www.youtube.com/watch?v=WxbXrLsKFGQ http://www.youtube.com/watch?v=Nn26KkoIGNY http://www.youtube.com/watch?v=pAocm7bZszs http://www.youtube.com/watch?v=CUmNRsVro1U http://www.youtube.com/watch?v=vUCIKGlyDBQ http://www.youtube.com/watch?v=fAJlHJehlI8 How does it work? There is an API which gives you the ability to create dynamic, static or kinematic objects inside the "bullet world". After creating an dynamic object, you connect it to some entity and this entity now copies the object's movement. Dynamic objects can be used as anything that moves freely, for example pink rubber balls boucing all across the map. In case of static object, no movement is copied, but you can still work with the object, set its properties, etc. These can be used for building the world, making walls or triggers. Kinematic objects are exact opposite of dynamic objects - they copy their entity's movement. That is useful for player collision box or for moving brush entities like doors, trains, etc. Documentation? For documentation just grab latest inc file, everything should be written in there. Hello world? Here is a simple example where you can learn how to create static world, dynamic spheres, kinematic player collision box and modify behaviour of some objects (bounciness). Code:
#include <amxmodx> More? Download bmod_test.zip form the attached files. It contains more complicated example and also that fyzsph.mdl you might be looking for. You can also check out CrateNade plugin. Latest binaries/source Download latest binaries from GitHub (windows,linux). Download latest amxx include file from Github. View latest source at GitHub. Additional info Your feedback, wishes and english mistakes corrections are appreciated! Current linux release requires Bullet shared libraries to be put into hlds root directory. If there is anyone who can recompile this module for linux without the need for bullet shared libs, your help is very welcome. Attached zip file might be several years old and contain some serious bugs. If you're looking for old-api bmod, see legacy branch. It's full of bugs and has been discontinued. Thanks joropito for helping me with GitHub and other support. |
Re: Module: BMOD - Extended Physics Module
Finally released! Good job!
|
Re: Module: BMOD - Extended Physics Module
I just cant belive it,
this is better than hl2 Physics omg. Good job! |
Re: Module: BMOD - Extended Physics Module
Sweet!
|
Re: Module: BMOD - Extended Physics Module
|
Re: Module: BMOD - Extended Physics Module
Quote:
|
Re: Module: BMOD - Extended Physics Module
Quote:
And i take back my words :):):):):):) But this module here, is so fucking awsome. That bounce balls and spike physics is so nice. I think it is impossible on hl2 physics :) that way i said that is better than hl2 physics. HL2 physics are too real :) but better player touch... |
Re: Module: BMOD - Extended Physics Module
Awesome! Wery NICE! GJ ;)
|
Re: Module: BMOD - Extended Physics Module
EXCELENT!
You upload the plugin that samples in the video: http://www.youtube.com/watch?v=Nn26KkoIGNY ? You upload the models/fyzsph.mdl ? |
Re: Module: BMOD - Extended Physics Module
1 Attachment(s)
Quote:
Code:
#include <amxmodx> |
Re: Module: BMOD - Extended Physics Module
Wicked Work.
You are insane dude good job. |
Re: Module: BMOD - Extended Physics Module
Quote:
|
Re: Module: BMOD - Extended Physics Module
Very nice!
Good job. |
Re: Module: BMOD - Extended Physics Module
I'm very glad you like it, but i would also appreciate some feedback like: Is it working? Are there any functions you miss (like applying forces, setting gravity, callbacks)? Or should i work on entity handling (proper collision with walls, doors, breakables)? Or should i try to implement player collision?
|
Re: Module: BMOD - Extended Physics Module
Quote:
One thing that I saw immediately that I would prefer you do is convert the following into an enumeration. Code:
0 - sphere (x is radius) Also, I have not had any time to actually test anything with this, but could you answer these questions (they all have to do with how much entity data is used between "worlds"):
A feature that I think would be interesting, would be able to do something like Weapon Physics for the entities. |
Re: Module: BMOD - Extended Physics Module
Quote:
Quote:
Quote:
Quote:
Quote:
|
Re: Module: BMOD - Extended Physics Module
Player push will be great when collision occurs. It should be done taking into consideration the objects and players weight.
|
Re: Module: BMOD - Extended Physics Module
Quote:
What about something like ricochet where discs fly around and push players? I think that would be a good purpose for such feature. Quote:
|
Re: Module: BMOD - Extended Physics Module
Just awesome!
|
Re: Module: BMOD - Extended Physics Module
Quote:
|
Re: Module: BMOD - Extended Physics Module
The only thing that I would suggest with this module is to make it an interface to all the possible functions of the Bullet physics.
Also it would be a good idea to add get natives. For example: bmod_get_friction and is_bmod_registered. And forwards if the bmod library can offer. Also request for the mods of the forums. Sticky PLEASEEE!!! |
Re: Module: BMOD - Extended Physics Module
Ok, added more natives, look at the include file for complete list.
In this video i'm using last bullet hit for traceline end point because i'm too lazy to get it from player angles. I set gravity (or apply force at hit point) of traced object by console bind. http://www.youtube.com/watch?v=fAJlHJehlI8 So if you want objects reacting to bullets or explosions, use bmod_traceline and bmod_object_apply_force_at (this takes relative position, so substract it from entity origin). |
Re: Module: BMOD - Extended Physics Module
What about joining objects? It would allow coders to make more complex objects by joining cylinders, cones, boxes, etc.
|
Re: Module: BMOD - Extended Physics Module
Quote:
Things that I like to request: 1. Module autoloading 2. Some forwards, don't know if the bmod library has something like that. 3. Also I think that it would be a good idea to make the object properties set function just like engine this is good when this module will provide more and more functions that we can play with. bmod_set_float(ent, BM_gravity/BM_restitution, gravity). Quote:
|
Re: Module: BMOD - Extended Physics Module
Quote:
Anyway i've done everything else: engine-like variables handling and one simple callback called when body contact is made. You can use it for sound effects, as i tried to in this video: http://www.youtube.com/watch?v=0tpyPSHG96s Quote:
|
Re: Module: BMOD - Extended Physics Module
Module autoloading means when a plugin is using the module it will autoload even if it is not enabled from modules.ini ( i guess ) :D
|
Re: Module: BMOD - Extended Physics Module
The "callback when body contact is made" is not working, can you give me an example script please?
|
Re: Module: BMOD - Extended Physics Module
You have to call bmod_object_set_callback(entity,1) on objects you want to get callback from.
Code:
public whatever(){ Is this bad 'feature'? Should every object call this callback automaticly? |
Re: Module: BMOD - Extended Physics Module
Look at my code, it's not working. Nothing happens when 2 balls collide:
Code:
#include <amxmodx> Quote:
I've looked at the source code and i don't see bmod_forward_contact. Did you forget it? |
Re: Module: BMOD - Extended Physics Module
Can i add bmod physics for other in game ents? Not creating new ent.
(example. granades with bmod physics) |
Re: Module: BMOD - Extended Physics Module
@mabaclu: Works for me.
[IMG]http://img403.**************/img403/7026/bmodmabaclu.png[/IMG] Have you re-downloaded binaries and include file? I always re-upload them when i release a new version. Quote:
|
Re: Module: BMOD - Extended Physics Module
Can you show an example with bmod_traceline
|
Re: Module: BMOD - Extended Physics Module
Quote:
Code:
public _bmod_test2(id){ |
Re: Module: BMOD - Extended Physics Module
Thanks :D
|
Re: Module: BMOD - Extended Physics Module
My binaries and include file are updated but nothing appears in the chat when two balls collide. Here's my test server: 188.93.232.121:37841
|
Re: Module: BMOD - Extended Physics Module
@mabaclu: Please re-download the linux binary once again (from git or from first post). I've made a stupid mistake, i've compiled it with old moduleconfig.h instead of the freshly updated one. I work mainly on windows, so i don't check if there are any bugs in linux release, i just check if it compiles fine and if it loads fine.
|
Re: Module: BMOD - Extended Physics Module
very good :D
|
Re: Module: BMOD - Extended Physics Module
It's working now.
Is it possible to make players act like boxes? |
Re: Module: BMOD - Extended Physics Module
Nice
|
Re: Module: BMOD - Extended Physics Module
GHW is back!
|
All times are GMT -4. The time now is 03:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.