Product Chat / For my next trick, or who says physics is broken?

Author
Message
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Feb 2018 18:01


Just added a Lua command, PushObject.

And before anyone says it, throwing is next on my todo list, just need to figure out an elegant way of implementing it 'P' key plus mouse click maybe? Maybe R key as you can't reload when carrying something with the pickuppables script.

Been there, done that, got all the T-Shirts!
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 17th Feb 2018 18:41
Very cool AmenMoses ,another great addition to GG thank you.

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 17th Feb 2018 19:03
Pushing the boundaries again, amazing AmenMoses
Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 17th Feb 2018 19:32
That can be a very useful gameplay mechanic
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 17th Feb 2018 23:17
Throwing stuff works but the math required is driving me bonkers, something with the default weight of '100' (100 what one wonders?) barely moves when the force applied is '200' (200 what one wonders) but an object with a weight of '5' (you get the gist) will fly off the map instantly when the force applied is '5'!

I wish I knew what units all the ruddy parameters are in but I can't find an 'idiots guide to the Bullet engine' to assist so I'm just making up equations on the fly to try and get the behaviour I want.

Maybe after a good nights sleep I'll figure it all out.

I'll post a video tomorrow if I get it working the way I want, decided on a simple 'Hold E key down whilst pressing LMB' to throw and it feels surprisingly intuitive. Not sure whether to allow throwing of a stack of objects or not, I also need to turn of 'run' ability when carrying objects or add a check in the engine to stop the player climbing on the object being carried which results in a strange ability to fly, well at least until you plummet out of the sky and die!



Been there, done that, got all the T-Shirts!
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 18th Feb 2018 09:37
I think the weight is % of gravity, so 100 would be normal, 200 would be heavy, and 5 would be almost no gravity.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 11:53 Edited at: 18th Feb 2018 13:31
Well I figured out that the 'weight' entered in the parameters doesn't seem to get down to the Physics engine properly, what the Physics appears to be using is a default 'mass' calculation based on the objects size, which explains why big 'heavy' objects and big 'light' objects are being thrown the same distance.

Back to the engine code to see where the disconnect is.
Been there, done that, got all the T-Shirts!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 18th Feb 2018 11:56
Excellent stuff here AmenMoses, keep it up.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Bluedio Vicotry V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 13:30
The 'weight' value is a modifier, the 'mass' is calculated from the volume of the entity then modified by the weight factor.

So that makes it rather difficult to figure out a 'force' value to apply to any particular entity to get a realistic looking 'throw' or 'push'.

I think what I'll have to do is do the same calculation in Lua that the engine is doing to come up with a 'mass' value for each object then use that as a starting point point for the 'force' calculation, I should be able to figure out an upper bound value for each object so you can't say pick up a small brick and throw it clean off the edge of the map! (actually I can use a similar trick that I did to stop objects being punched through the terrain to stop them being thrown off the edge, nothing worse than the player not being able to complete your game because he has thrown some important piece of a puzzle into oblivion).

This sort of problem is why I need feedback from you game creator types, I don't know how these things I create will get used so I can't figure out all by myself how they should function in all cases.
Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 14:04
This is my latest attempt:



The numbers are the 'Physics weight' value for each object in the properties but as you can see the effect of the throw depends more on the volume of the object than the 'weight'. If I set the 'weight' to anything less than 10 you can throw the smaller objects clean off the map.

Does anyone use the R key for anything other than 'reload'? i.e. can I use E for Push/Throw and R for Pull (hold the key and press LMB iow).

I can make the keys modifiable in the script but I want to choose decent defaults for a shippable script.

I plan to have three versions of this btw, one will just do pickup/stack/drop and the script is attached to items you want to make 'pickuppable' (pretty much the one I've pushed to GitHub already). The second will be identical but also have Push/Pull & Throw.

The third version will be a module that can be switched on/off by a trigger script and will then apply to all dynamic objects on your map without having a special script attached.

The first two will be for games where you only want specific objects to be handled by the player and need to control which ones they are at runtime, so for example they can only pick an item up and do something with it once some pre-condition is met. The third will be for general use just to liven up an otherwise dull environment by allowing the player to have a bit of fun, for example in a Zombie game if you run out of ammo you could throw stuff at the zombies in a last stand situation.

Been there, done that, got all the T-Shirts!
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 18th Feb 2018 14:16
Very nice.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 18th Feb 2018 15:25
Quote: "Does anyone use the R key for anything other than 'reload'?"


Yes but don't let that stop you .. I re-map R to Enter for weapon reloads and use R to rotate vehicles (as want to rotate a vehicle whilst mouse-looking elsewhere whilst also holding a weapon that needs reloading).

Some nice improvements you're making ... like the lua compile for standalones too

Also - can confirm your quaternion switcheroo to the engine variant works.

Cheers.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 16:28
@cybernescence: Are you testing my stuff for Lee? Oh and you may find the NLERP I added particularly interesting.
Been there, done that, got all the T-Shirts!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 18th Feb 2018 18:00
Absolutely incredible AmenMoses. First class stuff.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Bluedio Vicotry V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 19:52
Getting there:



Pull/Push/Pick Up/Carry/Rotate/Stack/Throw all in one script.

I've left the numbers showing the 'weight' parameter setting so you can see the effect. The '100' box has 50% friction, for everything else it was set to 100%.
Been there, done that, got all the T-Shirts!
PM
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 18th Feb 2018 20:22 Edited at: 18th Feb 2018 21:37
I can confirm that the weight calculations in the physics wrapper are incorrect.
The user should just decide the weight of the object.
Then in GG it should be "modelDensity = modelWeight / modelVolume".
Then get the "mass = modelDensity * modelVolume".
Bullet only uses the mass.

If you look in the DBPRoRagDoll.cpp file you will see where I wrote the correct calculations.
The coffee is lovely dark and deep,and I have code to write before I sleep.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 21:29
Yep, that's what I figured (eventually ) not sure what the effect on other functionality would be if I 'fixed' it so I'm going to leave it as is for now and simply have a 'frig factor' in the Lua script. If it gets fixed then I can simply remove the 'frig factor' and all will be good.

Btw, I played around with damping and can get some neat effects, slow motion explosions for example, the engine currently just sets the default value but it isn't applied in the entity Physics loop, adding an body->applydamping() call fixes things. I'm guessing that gravity is not applied properly either.
Been there, done that, got all the T-Shirts!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 18th Feb 2018 22:01
So cool, loving this stuff.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Bluedio Vicotry V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 18th Feb 2018 22:13
Quote: "@cybernescence: Are you testing my stuff for Lee? "


Not explicitly, though I know your and Preben's code is likely flawless, I'm merging the Git branches into my local copy and running tests. As you know I'm dependant on quaternions now so was expecting your changes to work though needed to check .

I've made a few other fixes related to the game I'm making but am not a "collaborator" so will post them somehow in case useful.

Cheers.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 18th Feb 2018 22:34 Edited at: 18th Feb 2018 22:37
Flawless? Lol, hardly but I'll take that as a compliment anyway.

Last video for today, this time only one script attached to a single entity but works on all the other active entities on the map, this one is showing off pushing again but this time with rotational component. (i.e. this is the starting point for the module I mentioned earlier)



Here is the script to show what the new commands look like and how they are used ... This script will not work anywhere except on my machine as I haven't pushed the new comands yet, still testing them all! ...

Been there, done that, got all the T-Shirts!
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 19th Feb 2018 03:10
Absolutely stunning and a joy to watch what you achieve with your skills.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 19th Feb 2018 09:07
Lol, I respond to a post describing my code as 'likely flawless' with a post containing a snippet of script that has a glaring great flaw in it! Doh!

Tip: If you write any code for positioning anything in a 3d environment and that code doesn't have at least one vector rotation in it somewhere then you're doing something wrong, in fact usually you'll find 3 or 4 rotations in any piece of 3d positioning code. In the code snippet above I am failing to rotate the offsets vector to take account of the objects rotation, the code appears to work but only because the origin is through the y axis so the x,z offsets in this case are 0, 'pushing' the top or bottom of the object quickly showed up the mistake!


Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Feb 2018 21:14
So next up, a bit more subtle this time. Constraint commands: ConstrainObjMotion & ConstrainObjRotation.

These allow you to constrain (nah, really!) motion and rotation of a dynamic object, in the video the small breeze block thingy is unconstrained, the others are constrained to either x, z or x and z and either no rotation or only y rotation.


Been there, done that, got all the T-Shirts!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Feb 2018 22:29
And really quickly the first rough run of my CreateHinge command:

(as I told Lee in an email, Pandoras box!)

Been there, done that, got all the T-Shirts!
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 20th Feb 2018 22:43
Great things going on here .

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 20th Feb 2018 22:58
One thing to note is that all these new Lua commands work on individual objects,. they are not 'world' commands, and I haven't exhausted all the possibilities yet (not by a long shot).

What this means is that you can attach a really simple Lua script to a door which allows it to have Physics behaviour unique to that particular door. No special animation is required, no fancy collision modes or bones or whatever, just a simple, low poly door object.

My aim is to revisit the Mech scripts, that I did a while back, armed with these new commands to produce a 'proper' solution. (oh and I'll probably do the dune buggy things as well )

Btw, 'thrown' objects can now inflict damage on the objects they hit so if anyone would like to start modelling rotary saw blades to take out zombies ...
Been there, done that, got all the T-Shirts!
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 21st Feb 2018 00:37 Edited at: 21st Feb 2018 03:24
I think we also need some new sounds, like a slamming door.

I love Pandora's box!

Attachments

Login to view attachments
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 21st Feb 2018 00:41
As long as these new additions can be used by the avarage non coding joe (that would be me ) this stuff will be great .

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 21st Feb 2018 01:16
Oh i had no idea GG was using mass instead of weight. This might explain some things.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 21st Feb 2018 14:23 Edited at: 21st Feb 2018 14:24
saw blade.
Not very good, but you have something which you can throw at the zombies.

Attachments

Login to view attachments
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 21st Feb 2018 16:13
Here is my contribution to the zombie saw blades.
For use as you see fit.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Feb 2018 21:05
Cheers for those.



Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 21st Feb 2018 21:21
Just amazing ..
I envy your talent
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 21st Feb 2018 21:36
That is so cool .

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 21st Feb 2018 22:30
I'm taking a long hard look at the engine code as doing collision testing in Lua is far too clunky a way of doing things, I'm trying to figure out whether it is feasible to add a way for a script to register interest in a particular object (i.e. the one you've just thrown) and have the engine feedback the collision information to the script. If I can figure that out then I can knock up a Lua module (physlib.lua maybe) with easy to use functions similar to utillib but for physics related stuff.

Been there, done that, got all the T-Shirts!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 22nd Feb 2018 08:23
I think we need a new badge created for AmenMoses's work here, this is just amazing stuff. The new badge should be "Physics Champion"

+1
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Bluedio Vicotry V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 22nd Feb 2018 19:19
Looking good. Great stuff.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 22nd Feb 2018 19:32
I'm trying to recall how the gravity gun thing worked in HL2, did the saw blades stick into things, like walls and whatnot, or just bounce off? If it did stick I'd love to know how they did it.

Anywho, what I'm thinking, now I've had a play with the blades, is that the module I'm writing should have a function call that would identify names of objects that should be treated as 'weaponised' i.e. the saw blades you guys have created could be called 'saw blade' and if the player picked it up the module would know that it should inflict a great deal of hurt if lobbed at someone. The module would basically treat 'weaponised' objects differently in that when thrown they would be imparted with a lot more force than a 'standard' object would be, in addition they would be automatically tracked to detect collisions whereas a 'standard' object would not.

Does this sound like a workable approach?

If so I will probably need to create a config file or something that could be edited by the user to add objects by name and to specify how they should be treated in the game.
Been there, done that, got all the T-Shirts!
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 22nd Feb 2018 20:02
Quote: "Does this sound like a workable approach?
"


It sounds great if it can be done,it could be used for all sorts of weapons.

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Feb 2018 17:02 Edited at: 23rd Feb 2018 19:45
Hinges working better now, still some tweaking* to do though:



I just want to reiterate the point that the entities I'm using are not optimised for physics use, they don't even have the ';physics shapes' portion of the fpe (that's why there is a gap between the doors! ) although I'm not exactly sure what that bit of the fpe does to be honest.

Still they work reasonably well as they are and I think you can probably see the in-game possibilities.

(* need to add hinge factors, once I figure out what they should be for various uses, also might add motors at some point )

For those panicking at the thought that this might be complicated for users, here is the script for the very basic right-hand door hinge:



Is that too hard?

The ConstrainObjMotion specifies which axis the model can move in, in this case no movement in Y which makes the object stay where you put it when gravity takes effect (otherwise the object would try to rest on the terrain).

CreateHinge does what it says on the tin.
22 is the x offset of the hinge wrt to the entity centre (0, 0 are y and z offsets)
rad(270) the minimum angle for the hinge
rad(360) the maximum angle for the hinge.

There are more parameters to be added but I will be hiding it all behind simpler commands in a library anyhow so you don't have to worry about those.

(and having played around with those other parameters they don't seem to do an awful lot, or at least their effect is very subtle)
Been there, done that, got all the T-Shirts!
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 23rd Feb 2018 18:16
I just don't know what to say other than WOW, i guess we'll have to create a safe with a code board for behind the painting.
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 23rd Feb 2018 18:18
This is very impressive stuff. Great work AmenMoses.

I guess if you had a building with entities and the player inside, you could create an earthquake effect too, with entities falling down and sliding about, so cool.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Bluedio Vicotry V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 23rd Feb 2018 19:42 Edited at: 23rd Feb 2018 21:20
I was thinking at a rather smaller scale*, something like sliding block puzzles except the player is inside the puzzle moving blocks around to get through the puzzle. Earthquakes hadn't actually crossed my mind.

And yes not only do we need a safe but think bigger, imagine a large mansion house with secret doors and passages hidden behind book cases or paintings or wherever, the player would have to wander the house testing everything and wouldn't know whether to push pull or slide things.

Before getting too carried away though we need some work done to produce objects that behave well with physics, i.e. the physics shape needs to match the visible shape and thought needs to go into physics settings in the fpe to allow them to play nice, I'm not sure what those settings should be btw!

*summink like this:

Been there, done that, got all the T-Shirts!
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 24th Feb 2018 01:04
That is a question for Stab i think and if the new bullet engine integration means more options besides box and polygon.

I'm going to make a safe this Sunday and create a nice structure with several rooms and stairs in EBE.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 24th Feb 2018 08:17
Shouldn't need any major change in the engine, just like we have models reworked for PBR so they look good we need models (or rather the fpe settings) reworked to be able to use them well with Physics.

For example, there are several 'ball' models in the library but none of them will roll properly because of the settings they have. I created a simple ball shape in Blender and imported it and it worked quite well (apart from the quirks I've already commented on) so it is possible but not being a modeller or having any idea what the fpm settings mean I can't say what changes we would need to make to the existing models.

This shouldn't stop people using the Physics commands I've already added as long as they are using simple box shapes or things like the painting, although the 'sphere' collision mode doesn't appear to work (might look into that next, should be a reasonably easy thing to get working).
Been there, done that, got all the T-Shirts!
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 24th Feb 2018 17:04
I've added three collision boxes in order to get a roundish star shape for the blade and kept them smaller than the blade.
Collision mode is now 40 and the physics shape count is 3
collision box 2 and three are a duplicate from the first one and then rotated.
I don't think that there are any other possibilities, using polygon collision for the blade reduces my fps to below 10.

Attachments

Login to view attachments
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 24th Feb 2018 18:50
Didn't make any difference, mind you when they are spinning through the air that fast it probably wouldn't do.

Not sure why polygon collision should reduce your fps that badly, doesn't make any difference (that is collision mode 1 isn't it?) on my machine. I created a pile of about 40 blades with colision mode 1 set in the FPE and still got a solid 60 fps, good fun chucking them at zombies though.

That does make me wonder though how the pickuppables script will perform on other machines.

Been there, done that, got all the T-Shirts!
PM
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 24th Feb 2018 19:04 Edited at: 24th Feb 2018 19:09
Somebody is not reading my posts, objects with polygon collision shapes
can not be dynamic. The polygon collision shape is for static only. Making them
dynamic causes the Bullet engine solver to have a fit and causes a massive slow down.

P.S. GG is not making compound collision shapes correctly.
Also collision shapes can not intersect with each other in a
compound shape so using 3 rotated boxes for the blade will also cause a slow down.
The coffee is lovely dark and deep,and I have code to write before I sleep.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 24th Feb 2018 19:27 Edited at: 24th Feb 2018 20:21
Aha, light build moment. You sent me the dbo file for the saw blade so I reckon the fpe settings are probably being ignored!

@SitD: So if I set the fpe to 1 and also set dynamic does it override the fpe setting in the engine and revert to box collision?
Been there, done that, got all the T-Shirts!
PM
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 24th Feb 2018 20:02
Quote: "@SitD: So if I set the fpe to 1 and also set dynamic does it override the fpe setting in the engine and revert to box collision?"


I am sure you can study the code and find the answer or maybe ask Lee.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-04-25 13:40:15
Your offset time is: 2024-04-25 13:40:15