Search the Community

Showing results for tags 'debug'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 46 results

  1. url:https://forreall.cn/3ds/app/debugcloud/ This is a simple and efficient material debugging tool that allows you to upload your own model, and then export the unique identification of the url, like "babylonjs - playground", some of the above function on existing tools, such as: https://github.com/ssatguru/BabylonJS-EditControl, and now, it supports the material properties of very little, but we will extend the content later. You can simply modify the properties below PBRSpecularGlossinessMaterial 、PBRMetallicRoughnessMaterial 、 StandardMaterial 、light Here's a video demonstration
  2. Phaser Plugin PocketDebug

    PocketDebug displays fps and timing graphs inside A HTML DOM Text element for maximum conciseness. Source & Docs Demo NPM pocketplot is the platform independent version . It can be used if you want to add a graph to A plain website. Looking forward to receive feedback (please do), ideas, contributions, optimizations so that the plugin can be enhanced for Phaser
  3. Hi, So, I've been following many tutorials but appear to be stuck at the first hurdle. I don't appear to be able to use the Debug Inspector if I'm using TypeScript and ES6 imports. I've setup my first scene using the initial tutorial (a sphere and a surface) on the website just fine using the TypeScript documentation (creating a Game class and so on). To do this in the ES6 way I import BabylonJS from node_modules by doing import * as BABYLON from 'babylonjs'; at the top of my .ts file and it works like a charm. Then I add this.scene.debugLayer.show(); to show the debug panel and I'm then faced with the following error in the Chrome debug console: babylon.inspector.bundle.js:408 Uncaught ReferenceError: BABYLON is not defined at INSPECTOR (babylon.inspector.bundle.js:408) at Object.t (babylon.inspector.bundle.js:408) at __webpack_require__ (babylon.inspector.bundle.js:21) at Object.<anonymous> (babylon.inspector.bundle.js:49) at __webpack_require__ (babylon.inspector.bundle.js:21) at babylon.inspector.bundle.js:41 at babylon.inspector.bundle.js:44 This is because it's absolutely right, the namespace BABYLON isn't included globally, my application is ES6, imports libraries where needed and then concatenates using Webpack. I moved to BabylonJS because it's dev team seemed to embrace TypeScript and ES6 but can't believe that something like this would have been overlooked? So that leads me to thinking I'm doing something wrong here. The only way I can see this working (which I found some libraries to do) is if the show() function to take the BABYLON object directly as an optional parameter, rather than expect for it to exist on the window (because it won't if you're importing ES6 style and webpacking). Open to thoughts and suggestions on this one as I'm new to BabylonJS. If I'm right with the above and it's just not something that has been done yet, I don't mind submitting a pull request.
  4. Can't debug.body on a group!

    Hi, in my render function, I have the following: render: function() { this.game.debug.body(this.player); this.game.debug.body(this.redMonstarsGroup); }, Now, the player, has a little green box around him, however the monster (or the group of monsters) has nothing and I get a warning: " gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, texture.source);" HOW TO I GET A LITTLE GREEN DEBUG BODY ON A GROUP OF OBJECTS?
  5. Hi everybody ! While I was writing my latest shader, I juste came up with annoying errors like this one : Guess what ? No, my typo is NOT at line 85. And I wondered why we couldn't have the real source code. The one after conversion, addition of defines and insertion of includes. Therefore the one where the typo actually IS at line 85. I know that getVertexShaderSource() function exists but it doesn't work without a successfully compiled program (and on success, no need of debugging). Guess what ? It's easy to get ! http://www.babylonjs-playground.com/#YX38N7#3 (Open your console) I would like to know, @Deltakosh , would you be interested in a PR for that or is it already implemented somewhere/useless ? Because in my PR I had to compute again the migratedVertexCode and migratedFragmentCode values, but these ones are available when entering the Effect.noError callback in the _prepareEffect() function... If you're interested, I see two options : - Just returning the two values in the onError callback and let the user make something with that. - Or printing the source code with numbered lines by default exactly as you print the defines Just let me know what you think is better. PeapBoy
  6. debug doesn't seem to work?

    I've recently been coding an infinite runner game in which the player is allowed to attack freely as they encounter obstacles and enemies. this being said, there is various objects that use collisions and physics bodies for collision detection and i have tried everything i have found to render the debug boxes to no avail. Attack = function() { Phaser.Sprite.call(this, game, player.x + 15, player.y, 'Attack'); game.add.existing(this); game.physics.enable(this, Phaser.Physics.ARCADE); this.animations.add('attack'); this.animations.play('attack', 8, false, true); this.body.setSize(50, 80, 30, 0); this.body.allowGravity = false; this.body.immovable = true; game.time.events.add(Phaser.Timer.SECOND * attackSpeed, setAttack, this); curAtk = this; }; //these set the variable 'Objects' Attack.prototype = Object.create(Phaser.Sprite.prototype); Attack.prototype.constructor = Enemy; //this checks conditions specific for the Attack Object made through the class every update. Attack.prototype.update = function() { this.x = player.x + 15; this.y = player.y; this.game.debug.bodyInfo(this); }; here is specifically the attacking object spawn which spawns the attack object, and on the last line of actual code i try to call the debug information to render. I'm not sure that this is the way to do it, but i have added the "render: render" to my game initialization and tried to call the code in that as well plus using the references within the examples as well and i cannot for the life of me figure out why the body's are not debugging allowing me to fine tune the desired collision areas. Any thoughts or ideas are welcome. if more code is needed of what i have i can upload my JS files. Also a quick note, there are no error messages. and everything runs as expected aside from the debugging aspect and proper hit-box areas.
  7. Hello fellow devs I have used THIS template to create my own project. It all works well, but I am working with WebStorm and I am struggling to create a debug profile. I don't want to use the Google Chrome debug. Any ideas? P.S. I also read something about live mobile debug - is that straight on a device? If so - what kind of setup do I need to make such connection between my IDE and the device? Is it also possible to live-reload only the changes that have been made and not the whole game state?
  8. I need help. I was following a tutorial online for the Phaser States, and I did everything right (I think), but obviously, I've made some changes myself to fit to what I kind of want. Here is the code: var loadState = { preload: function() { // Load the BG Images (Before so we can have an awesome looking loading screen) game.load.image('redPlanet', '././assets/images/redplanet.png'); game.load.image('spaceBG', '././assets/images/spaceBG.png'); // Preload the one character we need to look awesome! game.load.image('scavenger', '././assets/images/Scavenger.png'); // Add the loading label and the character, so the player doesn't think the game crashed. var background = game.add.sprite(0, 0, 'spaceBG'); background.scale.setTo(0.6); var character = game.add.sprite(80, 150, 'scavenger'); var loadingLabel = game.add.text(0, 0, 'Loading...', {font: '30px Courier', fill: '#fff'}); loadingLabel.alignTo(character, Phaser.RIGHT_CENTER, 16); // Load the Planet Images game.load.image('planet1', '././assets/images/Planet1.png'); game.load.image('planet2', '././assets/images/Planet2.png'); game.load.image('planet3', '././assets/images/Planet3.png'); game.load.image('planet4', '././assets/images/Planet4.png'); game.load.image('planet5', '././assets/images/Planet5.png'); game.load.image('planet6', '././assets/images/Planet6.png'); game.load.image('planet7', '././assets/images/Planet7.png'); game.load.image('planet8', '././assets/images/Planet8.png'); game.load.image('planet9', '././assets/images/Planet9.png'); game.load.image('planet10', '././assets/images/Planet10.png'); game.load.image('planet11', '././assets/images/Planet11.png'); game.load.image('planet12', '././assets/images/Planet12.png'); game.load.image('planet13', '././assets/images/Planet13.png'); game.load.image('planet14', '././assets/images/Planet14.png'); // Load the pause button game.load.image('pauseButton', '././assets/images/pauseButton.png'); } create: function() { game.state.start('menu'); } } And that is not all. Every single one of my state files has an error that says: Expected '}' to match '{' from line 1 and instead saw 'create'. Missing Semi-Colon. Unrecoverable Syntax Error (93% Scanned) Please help me, as this was going to be the way I made my game because I really like how organized states are!
  9. [SOLVED] - Debug Layer Just Broke

    Did we change the Debug Layer to the ne Debug Layer the BabylonJS guys have been working on... If so... Has the API changed to test for visible and showing the debug layer... If not... i now all of sudden get an error when trying to bring up the debug layer (using latest dist preview release)... No message ... just a yellow exclamation sign. Any body else getting this with latest list preview (12/8/16) ???
  10. Debug Phaser ES6 + WebPack in WebStorm

    Hey guys, I have decided to start using webpack and ES6 with my games, I have managed to run a sample with 'npm start', however I am unable to debug it in WebStorm. I am using the example here: https://github.com/SvetoslavKuzmanov/phaser-game-boilerplate This is my debug configuration in the image. I would like to use npm directly from WebStorm and be able to debug my code with preview in the browser. Also I have heard that it is possible to have live editing set up, so my code changes will appear immediately in the browser. Has anyone done that?
  11. This is more of a questions really. Searched a bit around the issues, change-log and this forum but couldn't find an answer for it. I'm loading bunch of scripts dynamically via game.load.script. As expected I can't put brekapoints and debug those scripts. I'm aware of sourceURL solution, but couldn't get it working. Is there any way to put breakpoints and debug dynamically loaded scripts? Any help or information would be appreciated.
  12. I would like to prevent players from switching to any game state by typing "game.state.start('name');" into the console. Has anyone found a way to prevent this from happening? Imagine you have a login-screen and any user can just type "game.state.start('play');" into the console and skip straight into the game. I have already tried using anonymous functions and closures but the problem is that the other states such as BootState, MenuState, GameState etc cannot access the game object created from new Phaser.game. I cannot be the only one who's worried that users can simply skip any game state by typing one line into the console. How have others dealt with this security breach? I tried googling but couldn't find any posts about this whatsoever. Thanks in advance for all answers!
  13. I've just published the library called FConsole, which should help pixi.js developers with debugging visual elements (the same as it was with the Flash-Console in Flash). Demo site Features Display List Inspector Hierarchy Properties Editing Any feedback is welcomed!
  14. Hi there. I have phaser game project and I want to setup debugger for all phaser files from repository. I can build my own single-file phaser via npm, but it is not comfortable rebuild every time after such minor changes. So interesting, how @rich (for example) use debugger for phaser (single-file debugging, or for all separate files)? And how is correctly setup the project for debug core-code. I need include all core files into my own html file, or I can use some special hack or existing sources?
  15. I try to turn on debugLayer but nothing is show, and no error in the javascript console. I only have one camera scene.debugLayer.show(true);
  16. Can anybody explain me why blender model shows for example 490 verts but bayblon export file in bayblon import meshes has 562 Vertices? (It is just default cube and default sphere create with blender. I have some model which have in blender around 2.027 but babylon (debug) after importing shows 22.776 ? (this is huge differences.) There are no double vertices, because I clean all doubles in blender! Why those differences of vertices between blender and babylon 3D environment ??? Please explain me what is happening here? greetings
  17. Hello, I've been following a Phaser spring example and I've been trying to remove the overlay sprite it draws on my circular physics body (I assume it adds this when I call body.setCircle(5)). Does anyone know how to remove this? I don't want to remove the body, I still want the physics, I just don't want the extra debug drawn sprite. Thanks
  18. Hello everyone, Does anyone of you know how I can disable the tilesprite debugging messages? example in the attachment Very Kind Regards, Cedric
  19. How to optimize 100% CPU usage

    Hi guys, I've been running profiles in Chrome dev tools on my game but having trouble making things run faster. I realize this is a hard question to ask, but can anyone point me in a direction of things to try? Play/test here: http://daverau.info/play/leafy-mobile/ - the game world is 50k pixels wide platform type game And uses arcade physics for Gravity - all assets are png retina so I'm scaling for high dpi but that doesn't seem to add my overhead - particle emitter is lightweight and doesn't seem to impact performance - I have about 500 platforms that all run collide checks, is there a way to only collide check what's in the camera view? - how can I better isolate what's causing memory leaks and max CPU performance? thanks for any help you can offer! I know it's hard to debug someone else's game but hoping for pointers.
  20. I got the latest babylon.js preview release build from git, and it seems like the statistics window from the debug layer is partially hidden. I tried it both in Chrome and Firefox. It doesn't happen with the stable 2.2 version.
  21. I'm probably being funny because I recently started working with phaser but I couldn't find an answer anywhere. I'm doing zoom by changing the world scale and my sprites seem to act naturally when I zoom but the lines that I render using debug.geom(line) don't update properly ( they start moving away from their start and end point ( which are sprites) as I zoom in or out but they still respond relatively if I drag either of the sprites. How do i make them to stick to the actual sprites not the view ? P.S. : If you check out the attachment : I have zoomed in a little bit and now the line has moved away from the handles but remains parallel to the invisible line that connects the two sprites, it will stay parallel to that even if I drag the handles around , but it's length is not scaling and the position is not right ! ... }; var newLine= function () { handles['line'+lineCounter+'_1']= game.add.sprite(100, 200, 'balls', 0); var handle1=handles['line'+lineCounter+'_1'] ; handle1.anchor.set(0.5); handle1.inputEnabled = true; handle1.input.enableDrag(true); handles['line'+lineCounter+'_2']= game.add.sprite(400, 300, 'balls', 0); var handle2=handles['line'+lineCounter+'_2'] ; handle2.anchor.set(0.5); handle2.inputEnabled = true; handle2.input.enableDrag(true); lines['line'+lineCounter] = new Phaser.Line(handle1.x, handle1.y, handle2.x, handle2.y); //handles['line'+lineCounter+'_1'].addChild(lines['line'+lineCounter]); lineCounter++ ; }; // Add available input keys var key1 = game.input.keyboard.addKey(Phaser.Keyboard.ONE); key1.onDown.add(previousPicture, this); var key2 = game.input.keyboard.addKey(Phaser.Keyboard.TWO); key2.onDown.add(nextPicture, this); var key3 = game.input.keyboard.addKey(Phaser.Keyboard.THREE); key3.onDown.add(newLine, this); // set our world size to be bigger than the window so we can move the camera //game.world.setBounds(-900, -900, 900,900); // move our camera half the size of the viewport back so the pivot point is in the center of our view game.camera.x = (game.width * -0.5); game.camera.y = (game.height * -0.5); }, update: function() { for (var lineName in lines) { lines[lineName].setTo(handles[lineName+'_1'].x, handles[lineName+'_1'].y, handles[lineName+'_2'].x, handles[lineName+'_2'].y); //lines[lineName].fromSprite(handles[lineName+'_1'],handles[lineName+'_2'], false); } // movement if (game.input.keyboard.isDown(Phaser.Keyboard.UP)) { game.world.pivot.y -= 5; } else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN)) { game.world.pivot.y += 5; } if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT)) { game.world.pivot.x -= 5; } else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT)) { game.world.pivot.x += 5; } // zoom if (game.input.keyboard.isDown(Phaser.Keyboard.Q)) { worldScale += 0.05; } else if (game.input.keyboard.isDown(Phaser.Keyboard.A)) { worldScale -= 0.05; } // set a minimum and maximum scale value worldScale = Phaser.Math.clamp(worldScale, 0.8, 3); // set our world scale as needed game.world.scale.set(worldScale); /* if (cursors.left.isDown) { console.log("Left"); if (backgrounds['image-data-'+String(currentImage-1)] ) { previous_image= backgrounds['image-data-'+String(currentImage-1)] ; previous_image.alpha= 1.0 ; } } if (cursors.right.isDown) { console.log("Right"); if (backgrounds['image-data-'+String(currentImage+1)] ) { next_image= backgrounds['image-data-'+String(currentImage+1)] ; next_image.alpha= 0 ; } } */ }, render: function() { for (var lineName in lines) { game.debug.geom(lines[lineName],'rgb(0,255,0)'); } }
  22. Debug p2 constraints

    Hello, I would like to know if it is possible to visually debug constraints when using P2JS (springs, revoluteconstraints, distanceconstraints, etc.) I found this image of box2d debug to illustrate what I mean Thanks in advance for any advice!
  23. 1) i have a structure: world - stageGroup - boxGroup - 3 sprites when i scale stageGroup 3 sprites do resize, but their debug boxes don't, so the collision system doesn't work. what do you think can be the problem?
  24. Hey guys! I have had poor performance on older devices and cant reach beyond 30fps. I added Phaser-debug to my project to get some insight on where I need to start optimizing, but Im not sure I understand the numbers. Except for these numbers, everything was zero. preUpdate4ms - stage postUpdate1ms - stage5ms - plugins render4ms - renderer Even though thses numbers only add up to 14ms, the total displayed is 30-40ms of calculations. (I have no idea where the rest are displayed. Oh well. Except for the debug plugin, Im not using any plugins. What does stage mean? Where should I look to cut the display time based on these numbers?
  25. Phaser Inspector Plugin

    [uPDATE] The plugin can now display RenderTexture on WebGL So last August I posted this [WIP] Phaser Inspector Plugin. Though I have yet to solve the problem I mentioned in the topic, I have managed to have time to create a release for the plugin, in an entirely new look. The new plugin provides a floating, resizable, minimize-able panel for inspecting Display Objects and States. The plugin is available here and you can try out a demo here. Working features: Display objects tree inspection.Display object class guessing.Display object name guessing (by looking for this./name/ in parents).Text as name for Phaser.Text.Display objects non-case-sensitive search by name and class.Display object destroy/kill/hide.Properties inspection and editing.Texture display for sprite/imageBounds drawingStates list and state changeFloating, resizable and draggable panelPanel remember position on page reloadClose/minimize panelPlay/Pause buttonUpcoming features: Transparent/Clickthrough panelSprite/Image load TextureOptimize when displaying too many display objects on the tree Here are some "promo" images