Jump to content

Search the Community

Showing results for tags 'RequireJS'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 12 results

  1. EDITED: This problem is solved. The solution is in this message. Hello, Require.js does not understand '.' (dot) in the module name: "pixi.js". Here in the RequireConfig.ts file: RequireConfig.ts requirejs.config({ baseUrl: "js", paths: { "pixi.js": "https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.0.4/pixi.min" } }); requirejs(["Program"], () => { }); I changed "pixi.js" to "pixijs" in this file: "node_modules\pixi.js\pixi.js.d.ts" here: declare module "pixijs" { export = PIXI; } But now PIXI is undefined in my example: import * as
  2. A friend of mine and myself just recently graduated from the Ironyard(a full-stack web development boot camp) and have begun work on our final project, choosing to do a game through Phaser. My friend had already begun work on the game and had it working, but not to the scale we wished to bring it. The end goal was to use Nodejs to navigate through a login, sign up, and game page, saving the user info(as well as the game state) to a mongoose/mongodb. We also wanted to use socket.io to make it multiplayer, working on mobile and desktop. In its state before beginning this endevour, it had si
  3. Hi, I've just updated v3.0 to 3.2 and am getting this error: Uncaught ReferenceError: BABYLON is not defined. I'm using requirejs to load BJS, PEP and some other libs. Has something changed in 3.2 definitions?
  4. Hi guys, I have a socket.io server running with node.js and i am trying to add players/sprites to my game. I am trying to figure out the best way to do this. As of now i have been working towards using object arrays but i know this is a better way. socket.on('addPlayer',function(data){ var thisID = data;//myArrayID; if(data.id == myID){ }else{ console.log(thisID); pFish[thisID] = this.add.sprite(); pFish[thisID].x = this.world.centerX; pFish[thisID].y = th
  5. I've tried the new version of Phaser, but I've noticed it doesn't like requirejs. It's giving the following error: ReferenceError: p2 is not defined phaser.js:77528:0 I've downloaded the build from the website and tested loading it via <script> with no problems. Source: index.html: <html> <head> <meta charset="utf-8" /> <script type="application/javascript" src="require.min.js" data-main="game.js"></script> </head></html>game.js: (I've also had a function inside; I've also tried starting the game and putting the new version in an already workin
  6. We use grunt templates and jasmine to run our test suite and since upgrading to v3 - our tests fail to run at all via grunt. I think it's down to the way v3 uses requireJs vs v2 and it doesn't seem to play well with our grunt template. The error I get is: Error: define: 'undefined' is not a function (evaluating 'this._loadResource.bind(this)')I'm thinking this might be because ./loaders doesn't get required properly? Did anyone face similar problems and have any solutions? For ref our grunt test template looks like: test: { src: ['src/**/*.js', '!src/main.js'],
  7. I'm using RequireJS to organize my game structure and tried to add this debug plugin https://github.com/englercj/phaser-debug , but I don't know how to do it. I tried to add it directly on script tag, or using requirejs to load it, but both of them fail. Anyone can help?
  8. Good day to you all, I have just learned how to use requirejs this template really came in handy : https://github.com/photonstorm/phaser/tree/master/resources/Project%20Templates/RequireJS , now i am struggling to see how it fits in with server side code with nodejs I would like to incorporated most of my backend code from nodejs and I cannot find any examples on how to do this. for example adding nodejs snippet inside of a module :: define(['phaser'], function (Phaser) {'use strict';var http = require('http'); <<<---------------- how am I supposed to incor
  9. Hello everyone, I wondered what the best course of action might be if you're using RequireJS with Phaser and wanting to access groups from other scripts. For instance, on the 'create' method (currently housed in its own script file) I have a bunch of groups that exist, but they only exist within that context, and it would be great to be able to access them say from another area that handles the game's update loop, etc. Current all I'm doing is this, it does work, but I can't help but wonder that it's not a nice way of doing it: this.game.groups = {};// And the groupsthis.game.groups.explosio
  10. Hi everyone I named this post "Alternatives to organize code base into different files" because it is a more general than "alternatives to make modular code" or something like that. I like javascript a lot, but it being the ONLY LANGUAGE IN THE WORLD that does not have a way to load/reference a file from within another is what pisses me off most. Every language has it. C and C++ has "include", C# has "using", Java has "import" and php has "require" and "require_once". I bet even X86 assembly may have something like that. Nonetheless, javascript yet don't have it and only God knows if (and wh
  11. Hey guys, Over the past few weeks I have been learning more about Phaser and TypeScript and I have started a blog to share what I have learned and post code that I think will help people better use Phaser with TypeScript. I was waiting to post anything about them here until I had a post with actual code in it and a GitHub repo. (Though I saw today a link to one of the posts was on the front page, thanks Rich!) I use OSX and WebStorm, but you should be able to use the code and examples in pretty much any TypeScript environment. But keep in mind these tutorials use more advanced TypeScript f
  12. Was following a guide on using RequireJS with Phaser and my main.js starts like this: require(['lib/phaser.min','module/Player'],function(Phaser,Player){ var game = new Phaser.Game(1067, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update, render: render }, false, false);And right away the console gives me the error "Uncaught TypeError: Cannot read property 'Game' of undefined" But if I try it with an older version of Phaser (the one provided with said guide, don't know how to check the version) it gets past that line. So are the new versions of Phaser incompatible with
  • Create New...