Raised This Month: $7 Target: $400
 1% 

Module: BMOD - Extended Physics Module


Post New Thread Reply   
 
Thread Tools Display Modes
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 02-12-2012 , 14:31   Re: Module: BMOD - Extended Physics Module
Reply With Quote #11

Wicked Work.
You are insane dude good job.
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
Kiske
Veteran Member
Join Date: May 2009
Old 02-13-2012 , 02:05   Re: Module: BMOD - Extended Physics Module
Reply With Quote #12

Quote:
Originally Posted by Backup View Post
Code:
#include <amxmodx>
#include <engine>
#include <bmod>

public plugin_init() {
    register_plugin("bmod_test","0","asdf")
    register_concmd("bmod_test","_bmod_test")
}

new i=0

public _bmod_test(id){
    new entity = create_entity("func_wall")
    switch(i%5){
        case 0:{
            entity_set_model(entity,"models/fyzsph.mdl")
        }
        case 1:{
            entity_set_model(entity,"models/fyzbox.mdl")
        }
        case 2:{
            entity_set_model(entity,"models/fyzcyl.mdl")
        }
        case 3:{
            entity_set_model(entity,"models/fyzcap.mdl")
        }
        case 4:{
            entity_set_model(entity,"models/fyzcon.mdl")
        }
    }
    new Float:origin[3]
    entity_get_vector(id,EV_VEC_origin,origin)
    origin[2]+=128
    entity_set_origin(entity,origin)
    entity_set_float(entity,EV_FL_nextthink,86400.0)
    entity_set_int(entity,EV_INT_movetype,8)
    bmod_object_add(entity,i%5,1.0,24.0,24.0,24.0)
    i++
}

public plugin_precache(){
    precache_model("models/fyzsph.mdl")
    precache_model("models/fyzbox.mdl")
    precache_model("models/fyzcyl.mdl")
    precache_model("models/fyzcap.mdl")
    precache_model("models/fyzcon.mdl")
}
Very very thanks!
Kiske is offline
Send a message via Skype™ to Kiske
iBuX
New Member
Join Date: Dec 2009
Old 02-13-2012 , 16:45   Re: Module: BMOD - Extended Physics Module
Reply With Quote #13

Very nice!

Good job.
iBuX is offline
Backup
Senior Member
Join Date: Jul 2010
Location: Česká Republika
Old 02-13-2012 , 17:15   Re: Module: BMOD - Extended Physics Module
Reply With Quote #14

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?
__________________
Sorry for my english.

Last edited by Backup; 02-13-2012 at 17:15.
Backup is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-13-2012 , 19:33   Re: Module: BMOD - Extended Physics Module
Reply With Quote #15

Quote:
Originally Posted by Backup View Post
Or should i try to implement player collision?
I think that would be one of the best goals you could accomplish with this, along with the entity handling.

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)
1 - box (x, y and z are half of box dimensions)
2 - cylinder (same as box, x is radius; cylinder is situated along Z axis)
3 - capsule (x is radius, y is distance between half spheres; capsule is situated along Z axis)
4 - cone (x is radius, y is height; cone is situated along Z axis)
Using an enumeration would be easier to distinguish what is being created, instead of trying to remember the numeric values.

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"):
  1. Are entities' and objects' velocities tied both ways? Meaning if I set an entity's velocity, will it correctly alter the object's velocity?
  2. Does an entity's movetype also affect its movement? I.e. would an entity with MOVETYPE_FLY float in the air?
  3. Does the entity's gravity affect anything?

A feature that I think would be interesting, would be able to do something like Weapon Physics for the entities.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Backup
Senior Member
Join Date: Jul 2010
Location: Česká Republika
Old 02-14-2012 , 10:09   Re: Module: BMOD - Extended Physics Module
Reply With Quote #16

Quote:
Originally Posted by Emp` View Post
One thing that I saw immediately that I would prefer you do is convert the following into an enumeration.
Code:
...
Using an enumeration would be easier to distinguish what is being created, instead of trying to remember the numeric values.
Whatever, that was the most easy thing to do.
Quote:
Originally Posted by Emp` View Post
Are entities' and objects' velocities tied both ways? Meaning if I set an entity's velocity, will it correctly alter the object's velocity?
Nope, bmod ingores and overwrites all your changes of velocity. I would have to store last frame velocity and that is wasting of memory, because i am able (*will be able in next version) to set velocity and forces directly using internal bullet functions.
Quote:
Originally Posted by Emp` View Post
Does an entity's movetype also affect its movement? I.e. would an entity with MOVETYPE_FLY float in the air?
Nope, why would you hook an entity you want to be floating to an physics engine anyway?
Quote:
Originally Posted by Emp` View Post
Does the entity's gravity affect anything?
Nope. I'm going to use origin, angles, velocity, avelocity and gravity to create bullet objects. (In current version only origin of entity is used)
Quote:
Originally Posted by Emp` View Post
A feature that I think would be interesting, would be able to do something like Weapon Physics for the entities.
I don't get it, could you be more specific? What feature would be interesting?
__________________
Sorry for my english.
Backup is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 02-14-2012 , 10:32   Re: Module: BMOD - Extended Physics Module
Reply With Quote #17

Player push will be great when collision occurs. It should be done taking into consideration the objects and players weight.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-14-2012 , 10:49   Re: Module: BMOD - Extended Physics Module
Reply With Quote #18

Quote:
Originally Posted by Backup View Post
Nope, why would you hook an entity you want to be floating to an physics engine anyway?
So, you're saying that if an entity doesn't have gravity, it shouldn't need better physics?
What about something like ricochet where discs fly around and push players? I think that would be a good purpose for such feature.

Quote:
Originally Posted by Backup View Post
I don't get it, could you be more specific? What feature would be interesting?
Grenade explosions and bullets pushing entities, since it seems you have the bounce feature already made.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TheSpectator
New Member
Join Date: May 2011
Old 02-15-2012 , 02:14   Re: Module: BMOD - Extended Physics Module
Reply With Quote #19

Just awesome!
TheSpectator is offline
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 02-15-2012 , 17:48   Re: Module: BMOD - Extended Physics Module
Reply With Quote #20

Quote:
Originally Posted by joropito View Post
Player push will be great when collision occurs. It should be done taking into consideration the objects and players weight.
There could be a function called set_object_weight that would change the weight of an object. Then Bmod would calculate the acceleration using the formula: Force = mass x acceleration
__________________
mabaclu is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode