Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd Aug 2010 17:39
There is a C# port of Box2D here:

http://code.google.com/p/box2dx/

You should be able to use this from any .net language

[b]
Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 27th Aug 2010 23:09
Hi Diggsey,

I have an issue with bodies that are created from edges (re: pinball demo). When I assign the body as dynamic, it does fall to the bottom of the screen reacting to gravity as it should but it just impales itself into the static floor body. It does not rotate left or right or fall away as I expect it to.

thanks.

Intel Core Duo2 E6850 3.0 GHz - 2x Geforce 8800 GTS SLI - 6GB RAM - Creative X-FI - Windows 7 64-bit.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 28th Aug 2010 15:44
Can you give me some code which will reproduce the problem?

[b]
Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 29th Aug 2010 23:32 Edited at: 29th Aug 2010 23:33
Sure..



media is attached.
Thanks.

Intel Core Duo2 E6850 3.0 GHz - 2x Geforce 8800 GTS SLI - 6GB RAM - Creative X-FI - Windows 7 64-bit.

Attachments

Login to view attachments
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th Aug 2010 02:19
The problem is that since you are only using line shapes in the construction of your body, your body has no area.

Box2D calculates the mass and inertia of bodies automatically based on their area and the density you specify for each shape. However, since there is zero area in a body made up of only lines, the mass and inertia are also zero. (The mass is then set to a default value internally, since dynamic bodies cannot have a mass of zero!)

This is not too much of a problem, it just means that you have to set the inertia and mass manually, using 'b2SetBodyMassData'.
Example code:

This sets the inertia to be the same as the mass, which seems to give a stable simulation.

Alternatively, you could add a circle shape to each body of the desired size, and set it to be a sensor so that it doesn't affect collision. This would not give accurate values for mass and inertia however.

Another alternative is to build your dynamic bodies from convex shapes instead. (Your example shape could be made from two triangles easily enough). You would then have accurate mass and inertia, but it is slightly complicated to decompose arbitrary concave shapes into a number of convex ones.

[b]
Igglepud
13
Years of Service
User Offline
Joined: 14th Aug 2010
Location:
Posted: 30th Aug 2010 05:54
I see the youtube vids, but I don't get this. Is that the final product or is that the world editor? This seems like it'd be really neat, but if it is just more commands I can use and not a WYSIWYG world maker, then I don't need it right now.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th Aug 2010 10:41
It does not contain a WYSIWYG editor, although it's perfectly possible to make one using the new commands.

[b]
The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 14th Oct 2010 02:16
@Diggsey

I was wondering something. I'm planning to make a horizontal shooter. Is it possible to use this plugin to make the collision boundaries of my game? Can I make the collision lines that define the collision boundaries of the walls or objects that the player or weapons (lasers, bombs, etc...) collides with? And, is it fast enough to handle this?

Cheers

Slayer rules!!! Yeaaah, man!
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 16th Oct 2010 13:23
Yes, that should be fine. If you only want to detect collisions and not have collision response, you can mark your moving objects as sensors

[b]
The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 16th Oct 2010 14:09
@Diggsey

Aah, that's great! I'm actually considering of buying this great plugin.
Yeah, I would use the plugin for collision detection in this game (and for many other things too, ya know ). Because, I saw the vid with the car, and that looked amazing, and the collision detection is very precise and fast too, by the looks of it! How is it done? I mean, the ground, are those like just lines connected to each other and set to sensor too? Is there an example of this type of collision with it?

Cheers

Slayer rules!!! Yeaaah, man!
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th Oct 2010 13:18
That car demo is one of the examples that comes with the plugin. It uses a number of line segments connected together, with some clever code to get it to wrap around.

That demo doesn't use sensors because it doesn't just detect collision, it uses the plugin to simulate the car as it collides.

[b]
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 18th Oct 2010 02:47
Hey guys,

Is this worth buying? I'm thinking of getting it. Also, can you simulate 2D vehicles? I want to make a game like the flash game Bike Mania on Ice. I've played it and won it about 15 times.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Oct 2010 10:28
Quote: "Is this worth buying? I'm thinking of getting it. Also, can you simulate 2D vehicles? I want to make a game like the flash game Bike Mania on Ice. I've played it and won it about 15 times."

I bought it. It's complicated to use but I think once I've got my head around it I think it will be extremely useful.

Just took a look at bike mania on ice and yes you could. There's a great demo of a "mini" driving game very similar to bike mania you could edit the code and have something similar. It might take a little while to learn but if those are the sorts of games you want to make then it's well worth it. You could add stacks of boxes to crash through and stuff too!

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 25th Oct 2010 05:14 Edited at: 25th Oct 2010 05:18
Quote: "You could add stacks of boxes to crash through and stuff too!"


Yeah, that's what I was thinking!

I have gone and bought it yesterday, but because TGC is a UK company and I'm in Australia they'd all be asleep right now, plus I bought it on a weekend and it says about 24 hours before it's approved normally, and max of 72 on weekends. I should have it tomorrow morning.

EDIT: Because I don't know how this forum displays the time a post was posted (whether it says it in your time or the poster's time), I will put the time I posted this so you see what I mean: 1:19 pm, Monday.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 27th Oct 2010 05:28
Well, I have Box2D now. I like it, but like you said, it's hard to use. I think the worst part is it's not well documented.

Anyway, I am going to start trying to make a Bike Mania on Ice kind of game. Or maybe I will try a Free Rider 2 type thing....

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Oct 2010 21:19
Quote: "I think the worst part is it's not well documented."


Have you read the HTML tutorial on making a pinball game? If you read it all (takes about an hour) you'll understand most of what you need to know. You can then refer back to the tutorial code to help you implement your own 2D physics.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 28th Oct 2010 11:20
Yes, I did, but it's still not very helpful. I can't remember the exact problems I had but they were not fixed by the docs, only by experimenting. Oh yes, like it doesn't explain what every command does very well. In the DBPro docs it even has examples for the commands but in the Box2D help it doesn't even give some basic info on it. It usually just says a re-write of basically what you can gather from the name of the command.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 28th Oct 2010 13:26
Quote: "I can't remember the exact problems I had but they were not fixed by the docs, only by experimenting."


I can only fix problems I know about

Quote: "It usually just says a re-write of basically what you can gather from the name of the command."


The help files are only intended to be a reference, not a tutorial, which is why the pinball tutorial exists.

[b]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Oct 2010 13:51
Hi Diggsey, can I point you in the direction of this... http://forum.thegamecreators.com/?m=forum_view&t=177176&b=1

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 1st Nov 2010 00:31
Yes, but the Pinball tutorial does not explain every command. In DBPro, each command is explained in detail and most have examples. In Box2D, each command is explained in a way that does nothing to increase your understanding of the command from what you can read from the name.

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Dec 2010 23:52
Diggsey, just got an error and wasn't sure what it meant. "Attempted to implicitely delete an implicit object"?

Loving the plugin BTW! New WIP "Ker-Bang!" going very well!

Jammy
21
Years of Service
User Offline
Joined: 15th Jan 2003
Location: Scotland
Posted: 3rd Dec 2010 10:56
Love box2d, you might be interested to know that I won 2nd place in the Santa competition and it was the first program I made using Box 2d.

forum link

http://forum.thegamecreators.com/?m=forum_view&t=177468&b=36

and announced in the newsletter

http://www.thegamecreators.com/pages/newsletters/newsletter_issue_95.html

Just click the download button.

Attachments

Login to view attachments
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Dec 2010 15:50
Nice to know that Box2D is being put to good use

@baxslash
The error "Attempted to explicitely delete an implicit object" means that you tried to delete an object (such as a shape) which you didn't create. Only ever delete objects which you created.

Box2D gives you access to certain objects which were automatically created by the engine (and will eventually be deleted by it). To make sure you don't delete one of them by accident, it keeps a list of these 'protected' objects and shows this error in case you do try to delete it.

In this case, I suspect that you are deleting a shape which you found using the 'b2GetFixtureShape' command. Don't do this. When you create a fixture and pass in a shape to use, the fixture automatically makes its own copy of the shape so that you can reuse the original. When you delete the fixture, the shape it owns will also be deleted, but you shouldn't try to delete it yourself (or you'd end up with a fixture without a shape).

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Dec 2010 16:00
Quote: "you might be interested to know that I won 2nd place in the Santa competition and it was the first program I made using Box 2d."

Hey well done Jammy!

Quote: "The error "Attempted to explicitely delete an implicit object" means that you tried to delete an object (such as a shape) which you didn't create. Only ever delete objects which you created.

Box2D gives you access to certain objects which were automatically created by the engine (and will eventually be deleted by it). To make sure you don't delete one of them by accident, it keeps a list of these 'protected' objects and shows this error in case you do try to delete it.

In this case, I suspect that you are deleting a shape which you found using the 'b2GetFixtureShape' command. Don't do this. When you create a fixture and pass in a shape to use, the fixture automatically makes its own copy of the shape so that you can reuse the original. When you delete the fixture, the shape it owns will also be deleted, but you shouldn't try to delete it yourself (or you'd end up with a fixture without a shape)."

Thanks Diggsey, that could well have been it. I was trying to clear a level before loading a new one then I found it was easier to just delete the whole world and start again!

My WIP is an "angry birds" style game for AppUp based on weapons testing. I'll post a link soon when I have a demo version to share! So far I have Time-bombs, Cluster-bombs and Guided Missiles to play with and only one 'location' which so far has 4 Tutorial levels more or less complete. Still working on the main engine though.

Somewhere I'm calling a bad "Handle" at the moment, trying to track down where!!

This plugin is great for AppUp, it's so fast! Is this what TGC are putting into the AppGameKit for physics?

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Dec 2010 17:18
Quote: "Is this what TGC are putting into the AppGameKit for physics?"


Not this plugin, but maybe the box2d engine. I was wondering about that myself.

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Dec 2010 17:26
Any chance of a "bool = b2BodyExist(bodyID as integer)" command and similar for fixtures etc? Might make it easier to stop the user from selecting invalid handles...

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 3rd Dec 2010 17:31
Just use 'b2GetObjectType' on the ID. It will return the same as 'b2ObjectType_None()' if the object doesn't exist. Otherwise it will return a value indicating the type of object. (See the help for more info)

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Dec 2010 17:34
Quote: "'b2ObjectType_None()'"

Didn't spot that one! Thanks Diggsey

miso
13
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 4th Dec 2010 09:40
Hello All!

I'm using box2d to create a level editor for my future 2d games. It now works well, can build the collisions easily too, but I have no idea how to implement moving platforms or vertical lifts. Can someone push me to the right direction? (a very short simple example would be nice, if theres any chance for it)

Thanks in forward,

a humble coder

No place like 127.0.0.1 .
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Dec 2010 15:40
For moving platforms and things, your best bet is to use kinematic bodies. These will move according to the velocity you give them, and will collide with dynamic bodies, but won't be affected themselves by the collisions.

For example, to create a kinematic body:


Add fixtures just like you would a normal body.

To set its velocity:


You would create the platform and set its velocity to move to the right. When it reaches the right side of its path, you change the velocity so that it moves to the left. When it reaches the left side, you make it go back to the right again.

I look forward to seeing what you make

[b]
miso
13
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 4th Dec 2010 16:09 Edited at: 4th Dec 2010 18:17
Thanks Diggsey, I was sure I can count on you I give a try to it now.

The current source is available on svn, but still theres so much to do before it can be a useful tool.

Edit: it works it's alive

No place like 127.0.0.1 .
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 6th Dec 2010 02:05
@Jammy:

I will assume now that you also made the PhysX Softbody example?

It's weird, that's all I can say!

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
Jammy
21
Years of Service
User Offline
Joined: 15th Jan 2003
Location: Scotland
Posted: 6th Dec 2010 12:56 Edited at: 6th Dec 2010 12:58
Clonex thanks for giving me a chuckle and brightening by day just that little bit. Yes I made Jammy-Soft, which is only a demonstration of the properties of soft bodies, examples of some of their uses and how they differ from hard bodies. It is allowed to be weird. Did you get it in the Dark Game Studio Bonanza? I have never had it confirmed that it is part of the physx demos there.

I love PhysX, however Box 2d is great too and because you don’t need any special external drivers it becomes fantastic. As baxslash has found out, there are no problems with distribution, it is very fast, it will be also be useful in not so powerful computers(e.g. netbooks). Good job Diggsey

I have many Ideas how to use it in future projects, hopefully they will be weird too. Click my signature to see and download some of my past weird projects if you like.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Dec 2010 21:09
Hey Diggsey,

Any chance of a quick example of raycasting?

Specifically I'm looking to check whether a static body is between two dynamic bodies.

Thanks in advance! Don't worry if you don't have time though

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Dec 2010 18:40
I modified the box stacking demo to include raycasting.

I added comments to all the parts which are there to support the raycasting:


As you can see, the use of callbacks makes it slightly complicated, but it's necessary in order to keep both the functionality and the performance.

I tried to explain the use of 'f#' in the callback as best I could, but if you're confused I could draw a diagram or something.

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Dec 2010 10:04 Edited at: 8th Dec 2010 11:13
Thanks a lot Diggsey I'll take a look now and let you know how I get on.

Basically I'm making sure my explosions don't affect objects behind static scenery

EDIT: That's a nice simple way of getting the first object hit but it doesn't quite fit my problem. I'll give you an example. What if my ray hits a dynamic object but there's a static object behind that?

I'll give you a screenshot. Here is my "Heli-bomb" about to hit a dynamic object (wooden plank), when I hit it it explodes and does a ray cast to every object in the blast radius which includes the target. The static hatched beam is in the way but the raycast (using your method) will only detect a dynamic object in the way (the plank)...


Attachments

Login to view attachments
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Dec 2010 16:29 Edited at: 8th Dec 2010 16:30
Ah, to do that, simply modify the callback function like this:


It's exactly the same, but it ignores any dynamic bodies.

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Dec 2010 16:41
Of course! Thanks Diggsey!! I just put it in and it works perfectly.

That's a major help thanks

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Dec 2010 16:13
Just to add my support - all hail the Box2D!

It's all the fun of PhysX with less of the headaches. It makes game making a pleasure.

I made a game for our local christmas fair, played on a six foot screen. An hour after the fair finished, they were all still playing, I had to call time on the queue.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Dec 2010 16:31 Edited at: 12th Dec 2010 16:32
@BatVink
Glad to hear it!

I've got a small update in the works, fixing a couple of minor bugs which people have pointed out, and also adding some new functionality.

So far:
- Fixed bug where the current scale was not applied to parameters to callbacks.
- Added command to get number of vertices on a polygon shape which was missing.
- Added commands for altering a shape after it has been created, and some additional helper functions.
- Added the ability to store a piece of data with an object.
- Added some missing 'GetXXX' commands.
- Properly fixed help file file names for commands with an underscore.

If there's anything else you'd like to see added, now's the time to say

[b]
Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 14th Dec 2010 05:07
Buoyancy, wind generators, gravity zones, shape debug draw.

Intel Core Duo2 E6850 3.0 GHz - 2x Geforce 8800 GTS SLI - 6GB RAM - Creative X-FI - Windows 7 64-bit.
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Dec 2010 13:29 Edited at: 14th Dec 2010 13:29
- Buoyancy
Completely implementing buoyancy in the wrapper would be difficult to get flexible enough for everyone's needs. However, I will see about adding some helper functions (such as getting the fraction of a shape which is on one side of a line) and write some example code to show how to get it to work.

- Wind generators
There are already commands to apply forces to bodies in the world, and functions to find bodies in a particular area. Any additional features would have to be specific to the use.

- Gravity zones
Almost identical to wind generators

- Shape debug draw
This already exists. If you mean adding support for drawing edge shapes too, I'll see what I can do.

[b]
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Dec 2010 21:22
Rather than Gravity and Wind, if you describe it as "attractors" and "deflectors" it makes more sense and becomes very useful.

To have an entity that can alter forces on objects coming within its effective zone can be incredibly useful.

This is possible manually, but I'm not sure how manageable and efficient it could be in standard DBPro Code. It may need lower level stuff to make it feasible.

Imagine checking 20 objects against each other for attraction/deflection (the same thing, one is just a negative force rather than positive). 20 checks against all other objects is....lots of checks to the power of another big number.

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 14th Dec 2010 22:49
Are you planning on adding simple soft bodies in the future?


Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Dec 2010 00:31
I'll see what I can do about attractors and deflectors then. I have a couple of ideas:
- I'm fairly sure there is a way in Box2D to calculate the distance of a point from a shape. This way the user could use the existing shape commands to define regions with a particular force, and falloff of the force as the distance increases.
- If that's not possible, point gravity shouldn't be too hard, if people think that would be a useful feature.

As for "simple" soft bodies. Ropes and the like can be made by linking boxes together in a chain with revolute joints, but there is no direct support for soft bodies. The engine does not support them internally, and implementing them in the wrapper would be a fairly big task. Maybe this would be possible in the future, but it's unlikely for this update.

[b]
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th Dec 2010 20:57 Edited at: 18th Dec 2010 00:19
- Added attractor/deflector functionality to the plugin
- Fixed code to draw edge shapes correctly
- Added line number to error messages

Buoyancy is a difficult one. It's too big a task to implement fully into the wrapper when there is no support from the engine, as I'd have to write a proper implementation rather than just a rough approximation, but there are too many variables to make adding a few helper functions worth-while.

New commands:
b2CreateAttractor
b2DeleteAttractor
b2SetAttractorIsEnabled
b2GetAttractorIsEnabled
b2SetAttractorPosition
b2GetAttractorPositionX
b2GetAttractorPositionY
b2SetAttractorMask
b2GetAttractorMask
b2SetAttractorStrength
b2GetAttractorStrength
b2SetAttractorFalloff
b2GetAttractorLinearFalloff
b2GetAttractorQuadraticFalloff
b2GetAttractorCubicFalloff
b2GetAttractorWorld
b2GetNextAttractor
b2SetBodyAttractorMask
b2GetBodyAttractorMask
b2GetWorldFirstAttractor

This brings the plugin to a total of 301 commands, not including overloads.

I'm going to be away for a week, but I'll try to get the update sent off as soon as I get back if there are no more features I'd like to implement before then.

[b]
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Dec 2010 10:41
Quote: "- Added attractor/deflector functionality to the plugin
- Fixed code to draw edge shapes correctly
- Added line number to error messages"

Great work Diggsey!

I guess we could use deflectors for explosions? Might be somewhat faster than my current code...

Line numbers will help a lot too!! Can't wait to try these! I was thinking of adding something like this into my game anyway so these new commands will save me some fps and work!



BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Dec 2010 12:53
Requested 14th, implemented by 17th - that is service! Fantastic work, I look forward to looking at the new stuff.

Quote: "I guess we could use deflectors for explosions? Might be somewhat faster than my current code..."


That would be my approach, yes. Create a small point deflector, big number for strength, then switch it on and off again quite rapidly. Boom!

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st Dec 2010 21:47
Would it be possible to have a command to disable collisions between two objects?

Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 26th Dec 2010 11:05
Attractors and deflectors are a huge addition to the wrapper. It would be nice though to be able to define a starting and ending value in degrees to be able to setup an emission "cone" sort of like how particle emitters work.

Thanks Diggsey.

Intel Core Duo2 E6850 3.0 GHz - 2x Geforce 8800 GTS SLI - 6GB RAM - Creative X-FI - Windows 7 64-bit.

Login to post a reply

Server time is: 2024-04-20 10:09:42
Your offset time is: 2024-04-20 10:09:42