Very simple physic wrapper :)
Blitz3D Forums/Blitz3D Userlibs/Very simple physic wrapper :)
| ||
It is a first attempt to create physic wrapper with minimum functions :) To introduce entity to physics use wdDynamic(entity) or wdStatic(entity). wdSetControl(entity,True) will make entity controllable through standart blitz functions (PositionEntity,RotateEntity,MoveEntity,TurnEntity) Example: ; Create graphics Graphics3D 600,600,32,2 cam = CreateCamera() PositionEntity cam,0,10,-20 light = CreateLight() SetFont LoadFont("Courier New",20) ; Load mesh Entity = CreateCube() ; Position and rotate PositionEntity entity,0,20,0 RotateEntity entity,60,60,60 ;==================================== ;== (wd) Physicalize this mesh as dynamic entity == ;==================================== wdDynamic(entity) ; Create plane plane = CreatePlane() EntityColor plane,150,170,255 EntityAlpha plane,.8 CreateMirror(plane) ;================================== ;== (wd) Physicalize the plane as static entity == ;================================== wdStatic(plane) ; Main loop While Not(KeyHit(1)) ;== (wd) Update physics by 0.01 seconds == wdUpdatePhysic(0.01) ; Render RenderWorld Flip Wend dll, decls and 3 samples is here: http://itmbin.nm.ru/newton/nwmini.zip Any comments and ideas are welcome :) |
| ||
very impressive man, wel done! It's defenitly very very simple to use. Keep it like that! Because I think THAT's were it's power lies (from a first impression)! There are several physics engine's out there, so why should we need a new one? Well, one reason could be because ANYONE can use this one in under a minute! No endless complex tweaks on 3 dozen simulator variables or having to store all kinds of handles and what not. Beware of 'the car freaks' though! I'm sure they'll be knocking on your door soon ;)p Is this based on an existing engine (newton perhaps) or something you made yourself? D. |
| ||
Beware of 'the car freaks' Yeah, I demand an inbuilt tyre physics and friction model, also a suspension joint and preferably up to the standard of Live For Speed / Gran Turismo etc... Oh yeah, by tomorrow please. :) |
| ||
Very nice demos and really nice simple commands. Nice work! Perhaps you could do easy joint creation using something like: wdLink(entity1%,entity2%,type) |
| ||
This really sounds good, looks like you can easily add it to an existing, complex game. Got to see how it interacts with Blitz Collision. Joints, agreed would be nice. |
| ||
Tried this with win 2000 pro and nothing happens. No physics going on. The larger newton wrapper works fine. I'll try it on win xp. |
| ||
Umm, would there be a reason that the physics don't seem to be working at all? There are no errors, but I seem to have the same problem as Wayne, nothing happens... just sits there as if waiting for something. Possibly the cows? :P |
| ||
I think the example in this thread is only to show how to set things up. You may have to add someting that will push the object, or drop it or so. |
| ||
Have you got the zip downloaded ? The samples from within the archive will run for a certain amount of cycles and then stop. Seems the same as with the big newton-wrapper demo. |
| ||
Seems to be questionable if it's for free or not... |
| ||
And it's tough designing games that may only last for 6 seconds! Hmm.. |
| ||
its just a static scene. no movement. |
| ||
No movement for me either. |
| ||
No movement for me too ? JP |
| ||
I'm trying to find this bug. The main trouble is that i can't repeat it on my computer. It works well. I will work on it |
| ||
Make sure you don't use a float for an entity handle somewhere. This is exactly one of those things that make it work on some machines, and fail on some others. |
| ||
Works fine here...up until the collision turns off after a little few minutes. I do like it though. |
| ||
i defined my own level (200 surfaces, 40000 tris) as wdstatic() - all i get is a MAV. Is there any polylimit? any other limit? i also did a few tests with flip false - very often your wrapper locks up. but i like the easy principle of this wrapper. exactly what i'am looking for. |
| ||
any news on this wrapper? |
| ||
I found that bug. But i don't know how to eliminate it. As you can see, i determine entity class within wrapper functions and that code didn't work properly on all computers. Now i'm trying to get entity class within wrapper, but maybe it will be necessary to add class parameter. |
| ||
@Itmbin: Are you still developing your Newton wrapper? |
| ||
@Barliesque, yes. It seems that bug has been found. The new version should run correctly on all computers ;) Try it :) http://itmbin.nm.ru/newton/nwmini.zip |
| ||
yes it works. cool ;) just the testing time is too short. |
| ||
There's an mav when you free the entities. After you add 5 or more entities and then free them it will give a MAV. Const count = 5 Dim cubes(count) For i = 1 To count cubes(i) = CreateCube() wdDynamic cubes(i) FreeEntity cubes(i) Next |
| ||
Wow! This is a brilliantly simple physics library. I love the "Magic Wand" approach of simply turning a regular mesh into an active member of the physics world. Soooo little coding! |
| ||
could you add wdFriction() & wdElastic()? and where can i get this wrapper (fullversion)? |
| ||
@Itmbin I was wondering if you're planning on implementing this super simple kind of support into your full Newton library--where you'd be able to instantly turn meshes into physics objects (magic wand style) and then customize whatever settings need to be adjusted with the full library of functions. [EDIT] What am I saying?! Your full library is already just about as simple to use as well. Excellent work! |
| ||
. Last edited 2012 |
| ||
. Last edited 2012 |
| ||
wdDynamic(entity) gives me a MAV.... :S |
| ||
Is your version of Blitz 1.98 ? Can you share or e-mail me the model caused such MAV? Or does it happens with samples? |
| ||
Blitz 1.96 And the MAV happens with all of the 3 samples - and only at wdDynamic |
| ||
static. Blitz 1.98, Amd 3400+, Win XP Pro sp2. Radeon 9600pro |
| ||
where can i get this wrapper? is it using the same key as the normal newton wrapper by itmbin? when i purchase the key for the newton wrapper, will it work with this one? |
| ||
There is no key. It appears to be free ...though it is extremely simple at this point. |
| ||
but why is there timelimit? |
| ||
ah, i redownloaded the file, and the limit seems gone (at least much longer). great! but i get a MAV on my level again ;( |
| ||
Do I get this right, this is now a free thing? (free as in free beer) And there's no limitation anymore. What means "at least much longer"? Do you mean it stops working after a few minutes due to a trial version limitation, or is it just instabile? |
| ||
theres still a limit. the number of UpdatePhysics calls... |
| ||
It works for ~5 minutes ... i'm not sure if it depends on the UpdatePhysics call. I don't think it will be free ... unfortunately |
| ||
Edit, uh, this was offtopic. so I removed it. |
| ||
On my system the demos run fine... but when I use it in one of my own projects... the object (a cube .b3d object) falls right through the ground plane (a height-mapped terrain)? But from what I've seen in the demo, this could be just what I've been looking for! |