As part of the move to HTML5, I needed to replace the physics engine with something much better performing in order to run acceptably in Javascript. This update contains that new engine. In addition to significantly better performance, there are a few improvements and new features as well:
improved performance
scaled collision shapes: Now collision shapes are scaled along with sprite when an object is resized using a Scale block
removed 100% limit on scale: Scale block can scale objects up as well as down
fixed capsule: Capsule collision shape is now a proper capsule instead of two circles. It fits and works much better than the previous version, but be aware that the size (and therefore mass) is slightly different, so objects currently using a capsule shape may need a bit of tweaking
polygon collisions: a new collision shape option. This generates an arbitrary polygon that is the shape of your sprite. Any shape you want! (finally!)
density setting: often requested feature - adjust the density of your object to increase/decrease its mass
Also, some bugfixes:
spawned objects reset correctly when returning to editor
fix class names getting extra numbers appended when not needed
gravity settings update without reloading game
updating physics settings of one object updates all of its clones
[EDIT]:
There is no more Drag setting for objects. I may end up adding a global drag setting, but the new engine does not support this feature on a per-object basis.
I did my very best to make the new physics calculations to align as closely as possible to the previous ones, but it’s entirely possible that I either missed something or messed something up. Let me know in the thread if I broke something in your game and I’ll try to fix ASAP.
@CrimsonBlackGames - You’re right, the motor was acting weird. I’ve fixed it, let me know if you see any more issues with it.
@PixelStudios - I can’t guarantee that the move to HTML5 will be 100% flawless, but I think that the most intrusive and riskiest changes (new renderer and new physics engine) are already complete and in place. The switch to HTML5 will now be mostly changes to the build process and website, hopefully.
Ooh neat! I’ve suggested all of these things before and you finally did it.
Thanks a lot for removing the 100% limit on scaling objects too.
Some small things I want to say:
Polygon objects are always movable for some reason, even if you set it to non-movable.
Why are the physics settings (density, bounce, friction) still those blue wheels? A number box with + and - buttons would be so much better, and is the max limit in density needed too?
This is very exciting. Thanks @grazer !! Im especially interested to check out the density adjustments and polygon collisions. Thank you for updating and improving the engine!
@Latif - yeah, some of these updates were way overdue
I can’t reproduce the Polygon issue you mention. Do you have an example with a polygon set to non-movable, but is moving?
& 3. I didn’t make any changes that required significant updates to the interface, because that would delay this already big update even farther. I have even more features that I want to add (e.g. object collision groups), and changes I want to make, but the engine update itself already took longer than I wanted. I decided I’d rather get the new engine in the hands of game developers instead of taking more time to design and implement ui changes first.
I think he’s talking about between levels, when one unloads but the next one hasn’t loaded. This will just display a blank space (currently white). I’ll look into this one.
Hi please help me!!! Ever since the update the music for my game is completely broken! (That might be because of my 43,743 blocks, though!) Thanks! https://flowlab.io/game/play/1031394
Hey @HumbleTumbler - I played it and don’t hear anything wrong with the music. This update shouldn’t have effected the music at all - what sort of issue are you hearing?
Also, there’s no way currently to update the density of an object while the game is running.
I know i’ve already asked for a lot, but is Alpha changeable in-game as well? I would like to make a Hardmode version of the Brain of Chtulu in Terraria, which turns invisible some times.
PS My glitch with the music is when you summon the bosses. It doesn’t stop the overworld music like it’s supposed to, and the Boss music doesn’t stop when it’s killed, either.