• Content count

  • Joined

  • Last visited

About Nodragem

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hello! That is great, but I don't see any multi-player thing happening when I go on the live demo... I was expecting something like that: Where you can open several tabs and control several capsules.
  2. Nodragem

    Webpacket + Typescript + Phaser 3 = Error with # ???

    Note, with Webpack 4.0 I get the error: Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
  3. Nodragem

    Webpacket + Typescript + Phaser 3 = Error with # ???

    The tutorial stops to work when we call the webpack server after we ran the line: yarn add phaser@^3.0.0 (You can see the error that is thrown in my first post). In my case, the above yarn command was installing phaser 3.0.0. After I read the github issue you mentioned, I tried to update phaser to the last version using: yarn add phaser Now, the project is using phaser 3.11.0 and webpack bundles it successfully . Problem solved! Hence, the solution I provided above (which I got from someone in the comment of the blogpost) is not recommended; instead, just make sure that you are using the last version of phaser (3.11.0)
  4. So, after some effort, I (the admin player) run successfully the client-side of the tic-tac-toe game in localhost with SSL, while running the server-side in localhost, and communicating with an online postgresql server. When doing so, the player I selected (i.e. a tester who accepted to be a tester) can open the game on their phone/messenger, but obviously they cannot play because the server-side is running on my PC in localhost. Interestingly, the tester's console prints the error "Error loading from backend invalid signature". Now, when I run the server-side on heroku, I get the error "Error loading from backend invalid signature" on my client-side (admin player). So basically, I am back to the same issue as before, but with the assurance that the game does run correctly when the server-side is running on localhost. Hence, there probably a problem with my connection to heroku server... I will update this post if I solve this last bit. EDIT: I succeeded to get everything up and running! turns out that I was not using the right URL to my heroku backend ! As simple as that ^^
  5. I started to go through the official "getting started" tutorial where you're going to push a tic-tac-toe game including multiplayer and messenger bot on the Instant Game servers. Here the page: Here the tic-tac-toe project: Following the tuto and, I created the App Page, put the server-side (i.e. the bot) on Heroku, tested it with cURL and attached the Bot to the App Page, as it can be seen in the attached screenshot. Now the server-side tells me to run the following command in the server project: node index This runs the bot on a local server, so I am not sure why I needed to do the above steps that set up my bot online... But anyway, now, when I run the client project with: yarn test I get an error: Error loading from backend invalid signature I am not sure what is going wrong here ... but it seems to come from the line `this.displayError(error);` in the file `game.js`. Here an extract, if that can help: function gameplayScene(FBInstant, backendClient, html2canvas) { this._cells = [[],[],[]]; this._matchData = {}; this.SPRITES = ['love', 'like']; this.start = function() { this.makeGrid(); var contextId = FBInstant.context.getID(); FBInstant.player.getSignedPlayerInfoAsync(contextId) .then(function(signedPlayerInfo){ console.log(signedPlayerInfo.getSignature()); return backendClient.load(signedPlayerInfo.getSignature()); }) .then(function(result){ console.log(result); if (result.empty) { return this.createNewGameAsync(); } else { return Promise.resolve(; } }.bind(this)) .then(function(backendData){ this.populateFromBackend(backendData); }.bind(this)) .catch(function(error){ this.displayError(error); }.bind(this)); }; ... I have few ideas / paths of investigations: 1) when I invite a friend for a tic-tac-toe game, maybe this friend needs to be registered as a tester for my app, meaning they have to accept the invitation as a tester (which they didn't yet) 2) the bot seems to need the pages_messaging permission to work properly, which I don't have (need to write a Privacy Policy etc..., that is a bit involved for completing a getting started tuto ) 3) one thing that puzzles me is how the client knows whether to use the local bot on localhost:5000 or the online bot linked to the App Page... EDIT: 4) Postgresql is not well configured Any suggestion is welcome ! EDIT: concerning 1) I registered my girlfriend, and yes indeed, you need your tester to accept the invite for the game to start in their messenger. However again, I've got a Invalid Signature error. concerning 3), this is controlled by the line `const BACKEND_URL = 'http://localhost:5000';` in `index.html`. concerning 4), now that I am connecting to my game server on localhost:5000, I don't have the invalid signature issue any more. However, from then, the problem was that my game server would not connect correctly to the Postgresql server and the table 'matches' requested by the game server did not exist in the Postgresql database anyway. Hence I found out how to connect to the Postgresql server. In the file .env, set the DATABASE_URL like so, replacing 'username', 'password' and 'database_name' with the relevant information: DATABASE_URL=postgres://username:password@localhost:5432/database_name Note 1: your username is probably postgres, and if you follow the below instructions, the database_name will also be postgres. The password is the one you were asked when installing postgresql. Note 2: localhost:5432 is the default local server, use a service such as heroku ( to set up an online server, the DATABASE_URL will be available in the setting page of the postgres server. Then open 'pgAdmin4', unfold the graph tree until you see "Tables", right-click on it, Create>Table..., name it 'matches', then unfold the tree to see 'Columns', right-click on it and Create>Column, name it "context", select type "text". Now create a column "data" the same way.
  6. Nodragem

    Webpacket + Typescript + Phaser 3 = Error with # ???

    Thank you for your answer @phaserlover. Do you mean that webpack is working well out-of-the-box with phaser 3? Someone trying the tuto ran into the same problem and answered to my comments under the blogpost: I take the liberty to copy paste their solution here: Hope that will help some people getting the same issue
  7. Yep, I see what you mean. That would definitely be nice to have! I just need to find some time to start program it
  8. Hello, This morning I tried to follow the following tutorial which explains how to use webpack with phaser 3: The only point where I diverge from the tutorial is that I tried to used Typescript instead of ES6. When I run `yarn run webpack-dev-server`, I get a lot of errors that looks like that: ERROR in ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask.frag 1:0 Module parse failed: Unexpected character '#' (1:0) You may need an appropriate loader to handle this file type. > #define SHADER_NAME PHASER_BITMAP_MASK_FS | | precision mediump float; @ ./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js 8:21-58 @ ./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js @ ./node_modules/phaser/src/boot/CreateRenderer.js @ ./node_modules/phaser/src/boot/Game.js @ ./node_modules/phaser/src/phaser.js @ ./src/app.ts @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/app.ts Hence it seems that tsc or webpack do not like the # characters in phaser 3's source code. Any idea of what I am doing wrong? You can find a zip of the project attached (I deleted the node_modules folder to keep it light).
  9. Thank you! I did find some multiplayer games on FB instant game, but they all seems to be slow paced puzzle/word games as opposed to fast paced action games. Any reason for that? I will try to use the link you give me, and try to find some tutorials. If there are no tutorials I may end up making one
  10. Nodragem

    Global Illumination Baking support?

    @NasimiAsl, that's quite cool to know! although I believe this is not computing any Global Illumination, right? @Pryme8, that is very impressive! something to dream of, @Deltakosh? I personally don't have the skills to implement this method into BabylonJS 😕
  11. Hello, For now, I am using Blender for baking a Global Illumination lightmaps, however, in my next projects, I may play with procedurally generated meshes. In particular, I want to generate 3d mazes. In that case, I won't be able to use Blender to generate the GI lightmaps because the mesh will be created in BabylonJS at runtime. So I was wondering if there is something existing or on the roadmap for GI baking at runtime? NOTE: I found the SSAO (Screen Space Ambient Occlusion) which is cool, but does not seem to illuminate the scene that much.
  12. Thank you JohnK, however, if gamepads has the right to have their own BABYLON.GamepadManager(), wouldn't be more consistent to move the keyboard observable to a BABYLON.KeyboardManager()? Why not do the same for the pointer and make a PointerManager()? Thank you Deltakosh, I am happy to try where do I start (and what about the above?)? Next to that, do you think it could be nice to have events/observables that aren't specific to keyboard/gamepad/mouse? We could have an InputManager creating a layer of abstraction with the input sources. The InputManager could be just a relay that would registers to many Observables and be itself an Observable. For instance, BabylonJS's users would register: - "Keyboard KeyDown Space" as "Jump" - "TouchScreen PointerDown" as "Jump" - "Gamepad ButtonDown A" as "Jump" Then, when the users are writing their jump mechanics, they wouldn't need to check for all these input sources, they could just test: if inputManager.wasJustTriggered("Jump") { doJump() } or: inputManager.onEvent.add((event_name, state)=>{ //event was triggered if(event_name === "Jump") doJump() }) (Note that there could even be a Json import/export to store the input settings) We could also have a common interface for directional input (controlling up/down with gamepads' analog stick vs keyboards' keys) I am happy to try doing a PR
  13. If I understand, you would manage the keyboard with the ActionManager and the gamepad with the GamepadManager/Observable? The documention says: It seems to me that: - there is no actions in the ActionManager related to the gamepad, - there is no observable related to the Keyboard - there are actions in the ActionManager related to the keyboard, - there is an observable related to the Gamepad Maybe it could make sense to have actions/observables for both? Furthermore, it could be nice to have actions/observables that do not care from where the event is trigger. For instance: I would attach an event "Jump" to the Button A of my Gamepad and to the space key of my keyboard. Then, I would either use an Observable or the ActionManager to trigger some code when the "Jump" event is triggered. That way you could easily change your input settings by changing which inputs (e.g. key press, button press, click) triggers the "Jump" event.
  14. Hello, I was thinking that it would be nice to have multiplayer (coop and/or competitive) games on FB Instant Games as it is likely that you are at least two persons when you are having a conversation through FB Messenger! The main issue I am facing is that I don't find any information on Facebook website to tell me if it is possible to have mutiplayer games on FB Instant Games. Could you give me more information about this? Thank you very much.
  15. Hello, I am starting to use BabylonJS and can't find an input manager in the documentation 😕 Let's say I have a main character that can jump and I want my game to be playable on PC, mobile without/with a controller. I would like the main character to jump whenever the player presses the xbox controller's button "A" or the keyboard's key "space" or tap on the screen. Is it possible to register these events under the same name "Jump" and write something like the following? if inputManager.GetButtonJustPressed("Jump"){ mainCharacter.jump() } Thank you very much for the help