Search the Community

Showing results for tags 'typescript'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • 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 244 results

  1. Hi all I'm trying to make a toy game that's a pinball game. For this I needed good Physics so I opted for P2JS Have a look at this current version: Here is the source easier to read (you can see I've been at this for a while! @#$%$) I'm having big issues with the physics system though... - all materials feel gooey. Ball seem to soften into all other parts... that's not great. - when moving the flippers, the ball quite often falls through... Is it because the refresh rate is too slow? is there a function to call to force a refresh of the physics system? Or does the physics system does not support fast moving items? - no matter what I tweak, the bounciness feels odd. Center of a surface seems to be a lot bouncier than the edges! - I couldn't figure out how to change the pivot (center of rotation) of the P2JS body... I opted with using larger PNG and shifting the position of the sprite inside, giving me a large P2JS body. Are any of you familiar enough with P2JS? Documentation is... sparse to say the least. Can you help with any of the items above? Thanks!
  2. Hi all, I'm having a few issues with Phaser 2.0, typescript and physics and hope that someone can point me in the right direction. Not sure if my error is because the phaser.d.ts might be incomplete or I'm just missing something. I'm simply trying to init Arcade physics by calling...;This compile error I receive is... The property 'startSystem' does not exist on value of type 'Phaser.Physics.Arcade.World'.If I try and use.. new Phaser.Physics.Arcade(;... I don't get the compile error. Pretty much any other calls to a sprite's body or other physics functions cause an error too. Thanks for the help. -- Mark
  3. Hi guys. Today I tried using phaser with TypeScript, and it simply doesn't works at all.... First problem : "Could not find symbol 'Phaser' " => So I tried to use "import Phaser = require('phaser.d'); . So I had to use "Phaser.Phaser.Game" (For an example), so normaly, it works... Second problem : I have just a f**king black screen, even by copying and pasting the tutorial, I have just a black screen. So, i'm alone to have these problems ? Thanks.
  4. Hello Ladies and Gentlemen, I'll try to keep it short and to the point. I've finally decided to start a technical blog, which will mainly be used for game development tutorials using different languages, libraries and techniques. While it is, no doubt, a humble start, some feedback on the first post of mine (as well as guidance on whether I'm on the "right track") are more than appreciated. And obviously, if you find the future of it interesting - feel free to subscribe! Without further ado, the link: Click me!
  5. Hello, i recently started trying to work with this engine and got TypeScript and VS2013 running on my laptop. I have followed the first TypeScript tutorial multiple times and it will not display the image.
  6. First of all, I apologize if this is not the correct place to ask this question, since maybe it's more of a Typescript question than a Phaser question? I'm trying to create a typescript project that uses Phaser in the browser and talks to a Node.js server via My browser code is set up just like in the tutorial and it all compiles to one file - game.js. Meanwhile, my server is compiling to commonjs modules. I have some code that I would like to keep common between the Phaser side and the Node side, but I can't seem to create a module that both sides can use. When I add an export = MyModule; to the end of a file, it won't let me use it in my game. Removing the export seems to allow my game to use the module, but then Node can't load it.... Has anyone else run into this problem?
  7. I'm new to HTML5 game development and am using Phaser. I decided to convert the tutorial to TypeScript as practice, but am getting an error. The offending line: this.scoreText =, 16, 'Score: 0', { fontSize: '32px', fill: '#000' }); I commented out the line and the error went away. The error: JavaScript runtime error: Unable to get property ''x' of undefined or null reference The error is thrown on Phaser.js line 24853, rect is undefined. Can anyone see what I'm doing wrong?
  8. As you can see drawRect produces some strange shape which is definetely doesn't look like rect But drawCircle works perfectly. I'm using Typescript + phaser 1.1.4 + definitions file from dev branch var rectGraphics:Phaser.Graphics =, 40);rectGraphics.beginFill(0xfff000);rectGraphics.drawRect(0, 0, 40, 20);rectGraphics.endFill();var circleGraphics:Phaser.Graphics =, 40);circleGraphics.beginFill(0xfff000);circleGraphics.drawCircle(0, 0, 20);circleGraphics.endFill();
  9. I hope to have something online soon but I am guessing really with the definitions as I have never written one, does anything think they can put together a Pixi.d.ts file? Cheers!
  10. Hey guys! I'm just getting started in HTML5 development so I thought I'd join up and post what I'm up to. In the last week I've created two super small, generic games, using two different frameworks. They're extremely basic, as I'm still learning the ins and outs of developing plugin-free games! Pixols - TypeScript + Phaser Link: BoxBot - Haxe + OpenFL Link: Feedback is more than welcome, and if you have any guidance for a newbie like myself, I'd love to hear it. Cheers!
  11. It seems that the TypeScript definition for Phaser.Animation.generateFrameNames is missing. I think that's the problem since the function seems to be in the Phaser JS but I can't use that function in TS.
  12. Hello everyone! I am new to HTML5 game development and I'm determined to get my first game completed. I've been very impressed with Phaser and all the hard work being put into it. I chose to develop with this game engine because I feel the community is very active and supportive. At this time, I'd really appreciate some help. I was able to get my Typescript project up and running by following Rich's two new tutorials and I'm using his game template to guide me through my project. When it comes to loading a sprite, I have no issues. However, I wanted a level larger than just the canvas size, so I felt I needed to create a tiled map and add platforms through a tilesheet. I haven't had too much experience with Tiled but I followed a simple tutorial to help me position the platforms and level. I created a map size of 75 x 19 tiles with their tile sizes being 32px x 32px. I have 3 layers consisting of an image layer with the background, tile layer for my platforms, and object layer for collisions (not sure if its needed). Here is a link to my set up on Tiled: Tilesheet link: Background link: I exported the tiled map into a JSON file and loaded it into my preloader state. I've noticed that many people load their tilesets with a load tileset function, but I noticed the Typescript definitions file doesn't support it (I obtained mine from the dev branch). So I've explored other ways through the examples and forums, and I'm having trouble loading my tiledmap. My game and player loads normally, but my background results in a black screen. I've spent hours trying to get it working. I'll share my code below and you'll notice the different ways I tried to go about it. Based on my set up, can someone suggest the best way to approach this problem? export class Preloader extends Phaser.State { preloadBar: Phaser.Sprite; background: Phaser.Sprite; ready: boolean; preload() { this.background = this.add.sprite(0, 0, 'preloaderBackground'); // Set-up our preloader sprite this.preloadBar = this.add.sprite(150, 370, 'preloadBar'); this.load.setPreloadSprite(this.preloadBar); // Load our level1 assets //character and enemy spritesheets this.load.spritesheet('dog', 'images/dog.png', 48, 32, 28); this.load.spritesheet('loca', 'images/locaspritesheet.png', 48, 48, 3); // First we load our map data (a json file exported from the map editor Tiled) this.load.tilemap('example', 'images/tilesheet_platforms.png', 'maps/level1.json', Phaser.Tilemap.JSON, null); //this.load.text('level1data', 'images/level1.json'); //this.load.tileset() isn't in the phaser.d.ts file // Then we load the actual tile sheet image this.load.image('levelspritesheet', 'images/tilesheet_platforms.png'); //background for level1 this.load.image('background', 'images/background.png'); //mostly menu and music this.load.image('jalepenos', 'images/jalepenos.png'); this.load.image('titlepage', 'assets/titlepage.jpg'); this.load.image('logo', 'images/logo.png');'music', ['audio/level1music.mp3'], true); this.load.spritesheet('simon', 'assets/simon.png', 58, 96, 5); this.load.image('titleScreen', 'images/titlescreen.png'); this.load.spritesheet('play', 'images/play.png', 150, 100, 3);'titleMusic', ['audio/salsa.wav'], true); this.load.bitmapFont('desyrel', 'fonts/desyrel.png', 'fonts/desyrel.xml'); }export class Level1 extends Phaser.State { background: Phaser.TileSprite; bg: Phaser.Tilemap; examplebg: Phaser.Sprite; layer: Phaser.TilemapLayer; music: Phaser.Sound; player: ChihuahuaWars.Player; state: Phaser.StateManager; create() { // = this.add.tilemap(0, 0, 'level1', true, 32, 32); // this.background = this.add.tileSprite(0, 0, 2400, 608, 'background'); //this.layer = this.add.tileLayer(not sure if I'm heading in the right direction); this.examplebg = this.add.sprite(0, 0, 'background');, 0, 2400, 608); ='music', 1, false);'', 0, 1, true); this.player = new Player(, 130, 465);; } update() { } }export class Game extends Phaser.Game { constructor() { super(800, 608, Phaser.AUTO, 'content', null); this.state.add('Boot', Boot, false); this.state.add('Preloader', Preloader, false); this.state.add('MainMenu', MainMenu, false); this.state.add('Level1', Level1, false); //this.state.add('Level2', Level2, false); //this.state.add('Congrats', Congrats, false); // this.state.add('GameOver', GameOver, false); this.state.start('Boot'); } }
  13. SDK 0.25.0 has been a long time coming, but we hope it will be a significant step in helping our developers make awesome games. This SDK includes the first public release of TypeScript versions of our libraries. With improved syntax checking and validation using TypeScript should help you streamline your development process and avoid silly bugs and runtime errors down the line. It compiles to JavaScript and works with other existing JavaScript libraries. You don’t need to use TypeScript to use Turbulenz, but we now provide type definitions for all of our libraries, which is just one good reason to try it out!
  14. Signals are a light-weight, strongly typed messaging tool and we use them extensively in our game framework. And we’ve just released our TypeScript implementation for others to benefit from. It’s a conversion of js-signals by Miller Medeiros, which is of course in turn a conversion of AS3-Signals by Robert Penner. You can get TypeScript-Signals from github. If you are unfamiliar with Signals, how they work and how they compare to Events then this short summary is well worth a quick read, but to summarise: A Signal is essentially a mini-dispatcher specific to one event, with its own array of listeners.A Signal gives an event a concrete membership in a class.Listeners subscribe to real objects, not to string-based channels.Event string constants are no longer needed.Signals are inspired by C# events and signals/slots in Qt. I ported over all of the 18 unit tests to TypeScript as well. So you have plenty of examples: from adding a basic listener up to manual binding and dynamic context switching.
  15. I write a lot of HTML5 games and my preferred language of choice is TypeScript. I love the compile-time errors, code-insight and debugging tools it provides. A large part of my work is porting over ActionScript3 code from Flash games. I found that I was going through the same motions over and over again; simple things like changing “Boolean” to “bool”, or rename the class function to “constructor”. It got to the point where I figured it would save time to write a script to help with the process. So I did, and I’ve released it for anyone else who may benefit from it. The script runs on a local web server and can convert either a single file or a whole directory full of them. It will intelligently deep-scan a folder structure, converting just the ActionScript files that it finds along the way. I’ve successfully run it across the whole of the flixel codebase with no issues, so I’m hopeful it’ll work for you.
  16. Hi to all, I present you port of the Artemis Entity System framework to TypeScript Before you start dive in the code go check the Artemis documentation and examples, cause they are 99% the same as this TS framework THE CODE: SOME WORDS: This is alpha release, and i didn't make any game yet, but i share the project and code because: 1. Its open source 2. It's a core framework (no things like rendering, input, collisions or physics) 3. It's TypeScript (which is still in development) but if you see the compiled JavaScript i think you're liked it 3. There was some struggles in the process of porting so i\ll be more than happy if some folks help me with code reviews, and suggestions also there is some changes to be expected when TypeScript add the generics feature 4. Some custom solutions for classes like Hashmap, BitSet, and ImmutableBag they are array based and there is a big chance that something is buggy More technical info about use: VisualStudio is used as IDE in my project and every .ts file is build to .js (but you can compile it with what you want) the AMD module pattern to load classes, also i've made an App class in which for test and probably for future use i included the: dat.gui as example how can other JS libraries can be imported. STARTING THE GAME (the app or whatever) Well if you download the github code it should just work try open the index.html and check if the console output something like this: document ready App.ts:68app started App.ts:34construct a logger So if all is ok without errors you could type: mg and hit enter and it the console should print you the Game object which is supposed to be singletone. SOME MORE WORDS: It,s 2 am and I'm going to sleep, I've been working on this for several weeks (I'm new to TypeScript, and also new to entity component design but i think i love both) So I hope more developers are interested in this and with the help of the community to make a solid game framework on which anyone could build his own game specific engine. I'm going to write more about the feature and also my plan is to expand the code in new project which will be fully featured game engine but based on ArtemisTS so ArtemisTS is going to be relative small and just a core. Also there is a DART port of Artemis which even has two examples, I've been looking closely to their structure so my goal is to make one example for ArtemisTS too.
  17. Check out the video above to see why I think TypeScript can be a great technology for those coming from an object-oriented language like AS3 or Java. It can really help you to understand today’s JavaScript because it compiles down to human-readable code as opposed to other technologies like Dart. Basically TypeScript allows you to use the JavaScript of tomorrow (ECMAScript 6), today.
  18. "Today, we're happy to announce the 0.8.3 preview release of TypeScript. This release adds incremental polish and bugfixes to the TypeScript compiler, language service, and Visual Studio plugin. Compiler Improvements In the 0.8.3 preview release, we fixed a few key issues that improve compiler correctness and performance, including issues with 'this' typing, external modules, and scoping. The 0.8.3 preview also includes improvements to IO buffering which should now allow large projects to compile much more quickly when compiled using Node as the JavaScript host. Visual Studio Debugger Improvements The Visual Studio support for source level debugging of TypeScript no longer requires that the files being debugged are part of the current project. This allows Visual Studio to attach to a running instance of Internet Explorer and debug TypeScript projects remotely. To do so, attach to the running IE instance which has the Script type, with "Attach to:" set to Script code."
  19. "In the v0.8.2 TypeScript addon for Visual Studio 2012 there are a number of projects settings you can place in your .csproj file to control how the tsc compiler is run. These don't yet have GUI controls so you need to do some hand editing if you want to change things. These options are all XML elements containing either true, false or a string value, here is the list:"