Search the Community

Showing results for tags 'error'.



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 87 results

  1. Unable to import babylon

    Hi, I am trying to import BABYLON, but TypeScript is complaining that it 'cannot find namespace BABYLON', As a result, I cannot compile my files with gulp. I have tried everything to get this to work, and have spent the last two days googling, to no avail. I have tried: import * as BABYLON from './babylon'; import * as BABYLON from './babylon.module'; import { BABYLON } from './babylon'; import { BABYLON } from './babylon.module'; import './babylon'; import './babylon.module'; None of them work. I have attached a screenshot of the error I am getting, and my folder setup. Hopefully someone could explain to me how to get this to work, thanks in advance!
  2. Hi all, i am trying to use Pixijs inside a vue instance and have encountered a strange issue. I know it might no be directly related to Pixi.js and you can jump to the tl;dr section for a question about how to update sprites locations, thanks, ------------------------------ All worked as expected when i used the particle container example from Pixi's official website. https://jsbin.com/jewapiyuzo/1/edit?html,js,console,output But now I want to have more control over the location of those sprites, like using an array to re-assign x, y, of each sprite. so I add a reference of pixi instance as vue's data element at line 12 and received an error It would throw a similar error if I want to pass a reference of ``maggots`` by using this.pixiInstance = maggots. jsbin seems to have added some protection or sandboxed this but it would caused a stackoverflow if you run this directly inside Chrome. So I am really desperate here on how to access ``maggots`` so I can loop thru and update all its elements... My last resort would be removing the canvas dom element and redraw it everytime i have to update the sprites data. i really don't want to do that Edit1: I am using the import below to import pixi, not sure if this would make any difference. =================TL;DR and Pure Pixijs question========================= Once you have initialized a Pixjs instance and have added sprites to it, what's the best way to access the instance so you can loop and update sprites' x, y values?
  3. I've been having a look through the phaser tutorials for json tiled maps and I've noticed that it's not clear on how to create a json tiled map that is 'phaser ready'. After creating a tiled map in tiled and following the code examples I've been unable to get passed the following error. Cannot read property '2' of undefined line phaser.js:98679 // find the relevant tileset sid = map.tiles[tile.index][2]; set = map.tilesets[sid]; version: 2.6.2 Is there anything obviously wrong with the code or the exported json tile map? Maybe there is a special way to export maps from tiled? Help would be appreciated. Thanks. game = new Phaser.Game(600, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { game.load.tilemap('map', 'assets/map.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tmw_desert_spacing', 'assets/tmw_desert_spacing.png'); } function create() { map = game.add.tilemap('map'); map.addTilesetImage('tmw_desert_spacing'); layer = map.createLayer('Tile Layer 1'); } { "height":14, "layers":[ { "data":[0, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, 0, 0, 40, 40, 0, 0, 40, 40, 40, 0, 40, 40, 0, 40, 0, 0, 40, 40, 0, 0, 0, 40, 40, 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 40, 0, 40, 40, 40, 0, 40, 40, 40, 40, 40, 40, 40, 0, 40, 0, 40, 0, 40, 40, 40, 40, 40, 0, 40, 40, 40, 0, 40, 40, 0, 40, 0, 40, 40, 0, 40, 0, 40, 40, 40, 0, 0, 40, 40, 40, 0, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 0, 0, 40, 40, 40, 40, 40, 40, 40, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 40, 40, 40], "height":14, "name":"Tile Layer 1", "opacity":1, "type":"tilelayer", "visible":true, "width":14, "x":0, "y":0 }], "nextobjectid":1, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.0.1", "tileheight":32, "tilesets":[ { "firstgid":1, "source": { "columns":8, "image":"tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":0, "name":"tmw_desert_spacing", "spacing":0, "tilecount":48, "tileheight":32, "tilewidth":32, "type":"tileset" } }], "tilewidth":32, "type":"map", "version":1, "width":14 }
  4. Hi, Got error on android device when createInstance is used ,PG. Device: Galaxy Tab 3 WebGl: renderer:"PowerVR SGX 544MP2", vendor:"Imagination Technologies", version:"WebGL 1.0 (OpenGL ES 2.0 Chromium)" Android: 4.4.2 Error: Uncaught TypeError: this._gl.vertexAttribDivisor is not a function at n._bindVertexBuffersAttributes (babylon.js:5) at n.recordVertexArrayObject (babylon.js:5) at t._bind (babylon.js:15) at r._renderWithInstances (babylon.js:12) at r._processRendering (babylon.js:12) at r.render (babylon.js:12) at t.render (babylon.js:13) at t.renderUnsorted (babylon.js:9) at t.render (babylon.js:9) at t.render (babylon.js:8) [.Offscreen-For-WebGL-0x6f7cfc20]GL ERROR :GL_INVALID_ENUM : GetIntegerv: <- error from previous GL command [.Offscreen-For-WebGL-0x6c2ab010]GL ERROR :GL_INVALID_ENUM : GLES2DecoderImpl::ClearWorkaround: <- error from previous GL command
  5. PBR crash on android

    Hi, Got error on android device with hdr material (updated using babylonjs extension, size 128). Device: Galaxy Tab 3 WebGl: renderer:"PowerVR SGX 544MP2", vendor:"Imagination Technologies", version:"WebGL 1.0 (OpenGL ES 2.0 Chromium)" Android: 4.4.2 Error: [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_INVALID_ENUM : GetIntegerv: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_INVALID_ENUM : glTexImage2D: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_OUT_OF_MEMORY : GetShaderiv: <- error from previous GL command [.Offscreen-For-WebGL-0x714d4da0]GL ERROR :GL_OUT_OF_MEMORY : glFramebufferTexture2DMultisample: <- error from previous GL command Unable to compile effect: Attributes: position, normal, uv Vertex shader: default Fragment shader: default Trying next fallback. Unable to compile effect: Attributes: position, normal, uv Vertex shader: default Fragment shader: default WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost Unable to compile effect: Attributes: position, normal, uv, uv2 Vertex shader: pbr Fragment shader: pbr Error: Failed to execute 'shaderSource' on 'WebGLRenderingContext': parameter 1 is not of type 'WebGLShader'. Cannot set property 'isCube' of null There are more error logs as all shaders are logged, if more info is needed I can attach something more
  6. Hi guys I'm beginner on framework phaser and I have problem with musics of play. According to the printscreen below.
  7. Hi all, have continued working on my little game prototype. Nothing much there atm except an animated background (a few clouds moving, and a Spine based animated cactus). Ive just started dropping in some sprites for the HUD but getting an error from Interaction manager as soon as myButton.interactive=true and myButton.buttonMode = true are set. Cannot read property 'pointerType' of undefined at Interactionmanager.processPointerMove Any clues? Using 4.52 Production (non-min)
  8. Download Problem

    Downloading MelonJS (mini) throws up error 800A0404. The case is similair with other versions. I've looked everywhere for a solution but can't find one! am i the first person to have this issue? How do i solve it? please?
  9. Hello everyone, I am trying to export a scene as a babylonjs file; and I keep getting this error: ERROR: self.backFaceCulling &= material.game_settings.use_backface_culling ERROR: 'NoneType' object has no attribute 'game_settings'. I have unchecked culling for the mesh but it still shows the error. How would you go about this? Thank you for your time.
  10. Phaser.io Compliation Error

    When I try to download Phaser.io's Javascript file, I get this error. I am running windows 7, and am trying to download this for a school project. Any light shed on this would be welcome.
  11. Hello all, I am using BitmapFontTexture for creating text messages, in browser chrome and opera all works fine, but in firefox I got white screen and error message: I tried to finding something in internet but still don't solved this problem. Thank.
  12. Loading tilemap error

    Hi, in my platform game I want to load map from Tiled. Everything was working fine, with this example: function preload() { game.load.tilemap('level1', 'assets/level8.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('tiles-1', 'assets/tiles-1.png'); } function create() { //MAP SETTINGS map = game.add.tilemap('level1'); map.addTilesetImage('tiles-1'); map.setCollisionByExclusion([ 13, 14, 15, 16, 46, 47, 48, 49, 50, 51 ]); layer = map.createLayer('Tile Layer 1'); layer.resizeWorld(); } It worked perfectly, but when I just edited tilesheet and used them in Tiled (identical tiles but grey instead brown), the game cannot load. The error from the console: Failed to load resource: the server responded with a status of 404 (Not Found) and Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)' at c.Tileset.draw (phaser.min.js:27) at c.TilemapLayer.renderRegion (phaser.min.js:26) at c.TilemapLayer.renderFull (phaser.min.js:26) at c.TilemapLayer.render (phaser.min.js:26) at c.TilemapLayer._renderCanvas (phaser.min.js:26) at c.World.d.DisplayObjectContainer._renderCanvas (phaser.min.js:7) at c.Stage.d.DisplayObjectContainer._renderCanvas (phaser.min.js:7) at d.CanvasRenderer.renderDisplayObject (phaser.min.js:9) at d.CanvasRenderer.render (phaser.min.js:9) at c.Game.updateRender (phaser.min.js:11)
  13. There's some mistakes in the documentation for PIXI.BaseRenderTexture. The first example at the top of the page ends with this line: "baseRenderTexture.render(sprite);" But PIXI.BaseRenderTexture doesn't have the method "render" so the example doesn't work. It should use the renderer.render method, like the second example. Also, at the end of the second example there's a comment that says "Renders to center of RenderTexture", but really it renders the sprite to the top left of the RenderTexture, since the sprite's transform is reset before rendering. It's the first example that renders the sprite to the center of the RenderTexture. This mistake shows up again in the documentation for PIXI.RenderTexture. And another mistake in BaseRenderTexture's documentation is in the first example, the constructor is called like this: "PIXI.BaseRenderTexture(renderer, 800, 600)". But renderer isn't a parameter of the constructor so this example doubly doesn't work. All in all a bit confusing, and I wouldn't want anyone else going in circles with this, so hopefully the documentation can get fixed. EDIT: *Yawn* hopefully this makes sense, I'm pretty tired but wanted to write this up before I go to bed and forget about it
  14. Hey folks, I get the error message when using the godrays and looking into them in a certain angle. I didn't manage to create it in a playground yet, but here is the current online version: http://p215008.mittwaldserver.info/space/ If you look in the direction of the sun and lower the camera angle the skybox disappears and I get that error. Any idea whats wrong here or how I could debug that? I attached pictures of how it should look like and how it actually looks like.
  15. Hi all, i'm facing with this problem on some chrome browser (updated), can some one suggest where i must check the error? I use typescript with webpack. Can some one tell me how to figure out this error? The code work well also in internet explorer!!! The problem is only on chrome windows. This is my webpack configuration: var path = require('path'); var webpack = require('webpack'); var phaserModule = path.join(__dirname, '/node_modules/phaser/'); var phaser = path.join(phaserModule, 'build/custom/phaser-split.js'), pixi = path.join(phaserModule, 'build/custom/pixi.js'), p2 = path.join(phaserModule, 'build/custom/p2.js'); const { CheckerPlugin } = require('awesome-typescript-loader') var definePlugin = new webpack.DefinePlugin({ __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')) }) module.exports = { entry: { app: [ //'babel-polyfill', path.resolve(__dirname, 'app/index.ts') ], vendor: ['pixi', 'p2', 'phaser'] }, watch: true, devtool: 'cheap-source-map', output: { pathinfo: true, path: path.resolve(__dirname, 'dist'), publicPath: './dist/', filename: '[name].js' }, module: { rules: [{ test: /\.ts(x?)$/, exclude: /node_modules/, loader: "awesome-typescript-loader" //loader: "babel-loader?presets[]=es2015!awesome-typescript-loader" }, { test: /\.css$/, loader: 'css-loader' }, { test: /pixi\.js/, use: ['expose-loader?PIXI'] }, { test: /phaser-split\.js$/, use: ['expose-loader?phaser'] }, { test: /p2\.js/, use: ['expose-loader?p2'] } ] }, plugins: [ new CheckerPlugin(), new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.bundle.js', minChunks: Infinity }), ], resolve: { alias: { 'phaser': phaser, 'pixi': pixi, 'p2': p2 }, extensions: [".tsx", ".ts", ".js", ".jsx"] } };
  16. 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!
  17. Alright. I'll cut to the chase. I'm making a simple game about abducting people, and I want the victims to run from the player or "flying saucer". This is what I have setup in the update function (I'm pretty sure the rest is irrelevant, but tell me if you need more): this.win.angle = game.physics.arcade.angleToXY(this.win, -(this.player.x), -(this.player.y)); this.win.velocity = game.physics.arcade.velocityFromAngle(this.win.angle, 145, this.win.body.velocity); game.world.wrap(this.win, 0, false); Now here is the error after getting to the "play" state (Oh and by the way, the game is based off of the state tutorial for phaser, except with a lot of edits and a lose.js file.): Uncaught TypeError: d.setTo is not a function at c.Physics.Arcade.velocityFromAngle (phaser.min.js:23) at Object.update (play.js:94) at c.StateManager.update (phaser.min.js:10) at c.Game.updateLogic (phaser.min.js:12) at c.Game.update (phaser.min.js:12) at c.RequestAnimationFrame.updateRAF (phaser.min.js:18) at window.requestAnimationFrame.forceSetTimeOut._onLoop (phaser.min.js:18) Please help!
  18. WebGL and XML errors

    I'm using the latest bjs alpha, a few old errors disappeared (fixed I guess), and new ones appeared. These are internal bjs errors that are not related to my code as far as I can tell. 1) I don't know what this is related to. 2) This error is logged for each .babylon file I'm loading. Why am I getting an XML parsing error on a .babylon file written in JSON format?
  19. I would like to know if is possible to disable the multi texture batching in a PIXI V4 game. Recently i jus update my game PIXI lib from version 3 to 4.2. I`m using cocoon Canvas + . It seems perfect on iOS and android version greater than 5. In a old phone the texture batching is messing with the textures. Please. Is possible to disable it. I already tried PIXI["settings"].SPRITE_MAX_TEXTURES = 1; PIXI["settings"].SPRITE_BATCH_SIZE = 1024; without success
  20. 'Neighbors' error

    Hi folks, I get this error: Uncaught TypeError: Cannot read property ‘neighbors’ of undefined I read around and I think is something relative to constraint. I have two sprite with a constraint and I need to destroy all when I press a button. Maybe that's the problem! Someone who could help me?!
  21. Hello I started playing with phaser, some time ago. But now i wanted to try something new, something like Websocket + phaser. And i stuck :/ So, i want to make multiplayer "Game" but i stuck, i cannot happen that game will be still working in background. It should be working that i m logging at 1st tab and sprite is apearing, than i m logging at 2nd tab and on first another sprite is apearing but on different position. So at the end, at the 1st tab will be 3 sprites, or more, depends how many tabs you will open. Sry for my bad engladno :/ I hope you understood something. My code: Client: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var player; var cursors; function preload() { game.load.image('med1','client/assets/Unit/medievalUnit_01.png'); } function create() { game.stage.disableVisibilityChange = true; game.physics.startSystem(Phaser.Physics.ARCADE); cursors = game.input.keyboard.createCursorKeys(); game.input.mouse.capture = true; ws.send('NewPlayerJoined',nick); player = game.add.sprite(0,0,'med1'); player.nickname = nick; game.physics.enable(player, Phaser.Physics.ARCADE); ws.onmessage = function(data){ game.add.sprite(Math.floor((Math.random() * 100) + 1),Math.floor((Math.random() * 200) + 1),'med1'); console.log("NewPpl"); }; } function update() { if (cursors.left.isDown) { player.body.velocity.x = -100; }else if (cursors.right.isDown) { player.body.velocity.x = 100; }else{ player.body.velocity.x = 0; } if (cursors.up.isDown) { player.body.velocity.y = -100; }else if (cursors.down.isDown) { player.body.velocity.y = +100; }else{ player.body.velocity.y = 0; } } SERVER: const express = require('express'); const http = require('http'); const url = require('url'); const WebSocket = require('ws'); const app = express(); var players = {}; __dirname = 'E:/WebstormProjects/TestWorkingServer'; app.get('/',function(req, res) { res.sendFile(__dirname + '/client/index.html'); }); app.use('/client',express.static(__dirname + '/client')); const server = http.createServer(app); const wss = new WebSocket.Server({ server }); wss.on('connection', function connection(ws) { console.log("New Connection"); ws.on("message",function incoming(data) { ws.send("sumf"); }); }); server.listen(2000, function listening() { console.log('Listening on %d', server.address().port); });
  22. hi, I tried to create instances of meshes, basically cloned my loaded meshes and then create instances of that clones, but run into issue. some instances created fine but others throws in console "[.CommandBufferContext.Offscreen-MainThread-0x12d4118a0a00]GL ERROR :GL_INVALID_OPERATION : glDrawElementsInstancedANGLE: attempt to access out of range vertices in attribute 2" during render. I also created small demo http://www.babylonjs-playground.com/#1NAQZD#8 . looks like this errors occurs only when some of the instances out of screen, maybe I forget something or this approach can't be used, but didn't found in docs any restrictions about using clones and instances. so what is the right approach to solve this? using Chrome Version 51.0.2704.103 (64-bit)
  23. Hi all, I want to ask that is there any way to operate the loading file. what I want to do is when the file loading or waiting for the response more than 5 sec, I will stop this loading process and start a new loading from another url. I tried to customize the addToFileList function in the loader to replace the file in the Loader._fileList. but it seems the xhr loading request is still on-going. So, I wonder that can I just mark this loading as error to trigger the onError event in the loader, and stop the xhr request for this file. thx
  24. Canvas not visible on Safari

    Hello, We are making a game with Phaser and works perfect in all the browsers except in Safari (iPad). It's pretty strange becouse the game seems to be running becouse we can hear the music, but the canvas is not displayed... Few seconds later the game is destroyed... We can't use the remote debugging becouse we don't have any Mac to conect the IPad... (Phaser Version: 2.6.2 / IOS version: 9.3.2) Please help!! Thank you
  25. Hi guys, I was trying to make a group of objects and got the following error: phaser.js:45776 Uncaught TypeError: Cannot read property 'length' of undefined Everything seems to be fine, anyone has a clue why this might be happening? FYI: I'm using Phaser 2.5.0 Thank you for your help.