Commit Graph

417 Commits

Author SHA1 Message Date
Arthur Pacaud d8546c5547 Add doc and type annotations to gdjs.WebsocketDebuggerClient (#1637) 2020-04-11 18:37:28 +02:00
Garett Tok Ern Liang 348459481a Fix Left/Right Ctrl/Shift/Alt/Meta not recognised as separate keys (#1553) 2020-03-25 21:13:08 +01:00
Arthur Pacaud b77eb123e8 Move loadObject to registerObject method in gdjs.RuntimeScene (#1572) 2020-03-22 21:32:43 +01:00
Florian Rival 1193e1bbd0 Run Prettier autoformatting on some files 2020-03-19 23:17:38 +01:00
Quarkstar c6f21955a3 Add BulgePinch, Glitch, RadialBlur and Twist effects (#1531) 2020-03-18 15:20:01 +01:00
Florian Rival 89e3853296 Enforce TypeScript "strictNullChecks" and other strict compiler options 2020-02-25 21:06:04 +00:00
Arthur Pacaud df655f2269 Removed non-required use of Hashtable.items (#1458) 2020-02-25 20:51:55 +00:00
Arthur Pacaud e2f8f70d54 Improve JSDoc in gd.js (#1459) 2020-02-23 20:34:37 +00:00
Aurélien Vivet 5ed0c57e48 Improve pixel perfect rendering of games (#1432)
Can help with the issue of "bleeding" tiles.
2020-02-17 21:34:27 +01:00
Florian Rival 3955612e3b Run autoformatting on runtimegame-pixi-renderer.js 2020-02-17 20:27:58 +00:00
Florian Rival 0d60a54fa7 Add support for extension lifecycle events function 2020-02-14 16:58:05 +00:00
Florian Rival e95a336dd2 Add new GDJS callbacks: first scene loaded, pre/post events 2020-02-12 20:47:43 +00:00
Florian Rival b8ccf02f70 Refactor callbacks registration in GDJS 2020-02-11 23:33:30 +00:00
Arthur Pacaud 746b2f5480 Add more JSDoc/typing to gdjs.RuntimeObject and Hashtable (#1376) 2020-02-10 20:24:11 +00:00
Todor Imreorov 7becb0be4b Fix multiple issues in Dialogue Tree (Yarn) extension (#1418)
* Add protection against misusage of the extension
* Fix json loading resource reading at the beginning of scene (thanks @4ian)
* Fix getClippedLineText sometimes clips the last letter
2020-02-08 18:25:09 +00:00
Arthur Pacaud 574bdaaf41 Refactor SpriteRuntimeObject types to add prefix "Sprite" (#1378)
Also remove useless parseFloat
2020-01-27 22:54:28 +00:00
Florian Rival 47025329dd Remove remaining old functions to register objects/behaviors 2020-01-26 10:53:49 +00:00
Arthur Pacaud 054e48227c Make object and behavior registering more explicit (#1379) 2020-01-17 22:49:24 +00:00
Florian Rival dc976003b7 Add action to center the window on screen 2020-01-14 22:03:10 +00:00
Florian Rival 6655a949ec Fix GDJS doc generation (incompatible TypeScript/JSDoc notations) 2020-01-12 23:33:39 +00:00
Arthur Pacaud 99312c71e0 Improve overall type annotations (#1361)
* Add type annotation for ObjectData and related types.
* Add missing type annotations.
* Add // @ts-check to some files.
2020-01-12 20:14:00 +00:00
Florian Rival a0887a1982 Fix rendering of particles not using a texture 2020-01-06 23:41:15 +00:00
Florian Rival 64dbab1bce Fix layer center position after resolution update 2020-01-02 21:33:36 +00:00
Florian Rival dc4e68dd21 Add actions to change game resolution resize mode 2020-01-02 21:33:36 +00:00
Florian Rival 9d3cd9f110 Add option to automatically resize game resolution to window size
* Also refactor:
  * method names related to window/game resolution
  * runtime game renderer size handling

* Update ProjectPropertiesDialog
2020-01-02 21:33:36 +00:00
Florian Rival 4ac3516336 Improve type annotations for gdjs.Layer 2019-12-27 18:34:03 +01:00
Florian Rival e3aed61390 Add type annotations and auto-format gdjs.Layer 2019-12-27 18:21:31 +01:00
Florian Rival 50adbfaae9 Add support for booleans in effects parameters 2019-12-21 15:16:15 +01:00
Florian Rival 977dc27bd0 Add update for effects + colors and resources for effect parameters 2019-12-21 12:04:08 +01:00
Florian Rival 81aa68e69d Add back existing effects as an "Effect" extension
* Add tests for EnumerateEffects.
* Ensure fake effects are present for Storybook stories.
2019-12-17 09:04:00 +00:00
Florian Rival 8891c91d61 Add EffectMetadata and AddEffect to extensions
* Allow extensions to store EffectMetadata.
* Rework gdjs.PixiFiltersTools to allow new effects to be dynamically registered.
* Update EffectsList to read effects from extensions.
* Update GDJS ExporterHelper to export include files for effects
* Rename effectName to effectType to avoid confusions in gd::Effect
2019-12-17 09:04:00 +00:00
Florian Rival 721b021b0a Fix memory leak and warning about texture not found.
Replaced the invalid texture for the PIXI image manager by a valid, hardcoded image. This:
* avoids a warning about not being able to load bunny.png (finally!)
* when creating a new Sprite, the invalid texture being used while the sprite is being set up, this was making PIXI adding a new event listener on the bunny.png texture. As the texture was not loaded, the event listener would never be removed, creating a leak.

Verified that the memory consumption is now stable on "Collisions with creation and deletion benchmark.gdg.json" benchmark game.
2019-12-08 23:16:16 +00:00
Florian Rival 41a275ca8e Run Prettier on howler-sound-manager and update copyright 2019-12-01 21:28:33 +00:00
Florian Rival 2c9ec0d866 Fix sound/music restarted when play called with the sound/music not paused 2019-12-01 21:27:53 +00:00
Florian Rival cd32e51134 Fix status of sound/music considered as stopped after play() was just called 2019-12-01 21:18:05 +00:00
Florian Rival 3fa3e57b24 Fix Sprite getWidth/getHeight returning old values just after changing animation or frame.
Fix verified in the new test game: the width/height reported is always synced with the animation.
2019-11-29 21:00:23 +00:00
Florian Rival f4224c4322 Fix points position not valid immediately after changing animation/direction/frame of a Sprite.
This was because animation/direction/frame changes are not immediately applied. Instead, the current frame is marked as dirty. Verify if the frame is dirty and properly apply the changes when getting points position.

Example games in next commit.
2019-11-29 21:00:23 +00:00
Florian Rival af21bc5aea Add command in GDJS to run TypeScript to type check the game engine 2019-11-28 23:01:43 +00:00
Bouh 8d75a8373d Add "clamp" function (#1283) 2019-11-10 13:08:10 +00:00
Florian Rival be2892b759 Fix hitboxes after flipX/flipY is called and add tests for sprite hitboxes/center/points 2019-10-26 14:15:14 +01:00
Florian Rival 5aa32f0eca Fix movesTowardTest and turnedTowardTest to properly use object center (in case origin is not 0;0) 2019-10-26 11:04:23 +01:00
Florian Rival 23987f63c7 Change sprites flipping to use the center point as center for flipping
As flipping can be considered as a way to "rotate" things, it makes sense to have it used as a center for flipping too.i
This is useful for objects that are moving and can be flipped according to if they are going left or right: they can now
be rotated and flipped "properly" (properly means that the center will stay at the same position when flipped/rotated)

This means that the center point won't move when the sprite is rotated or flipped.
The origin is still used as the point not moving in case of scaling. (this make sense because scaling is about the size, and origin about positioning)
This remove some calculations in the renderers, but add others in getDrawableX/Y and getCenterX/Y in case of flipping.
2019-10-26 11:04:23 +01:00
Wend1go 52173ac07d Add "Scene just resumed" condition (#1262) 2019-10-21 17:47:36 +01:00
Florian Rival 7dc2565dde Update Cordova export to generate a package.json file 2019-09-22 23:04:42 +01:00
Wend1go 14cc48fa98 Add condition to check for WebGL support (#1230) 2019-09-22 16:31:32 +02:00
Wend1go 12c5df67fa Integrate experimental SkeletonObject into GD5 (#1138)
The object is looking for a maintainer! https://github.com/4ian/GDevelop/pull/1138

Flagged as experimental and added warning about this
2019-09-19 22:49:52 +01:00
Florian Rival f155ea0331 Update to Electron 3.0.9 games exported to Windows/macOS/Linux 2019-09-08 12:53:33 +01:00
Florian Rival 28a232d175 Enable multiple layers (Pixi.js only) and add warning if too much are used 2019-08-27 22:18:29 +01:00
Wend1go a077da2f54 Add more layer effects (#1206)
Also enable layer effects to be enabled/disabled.
2019-08-27 21:10:36 +01:00
Florian Rival 64c9033155 Add basic JSDoc to Hashtable 2019-08-21 14:17:57 -07:00