All Activity

This stream auto-updates     

  1. Past hour
  2. Hello, I would like to add small update to the System Text in text.js in order to make it have New Lines like <br> and typewriter-effect like RPG dialogue. Demo. new game.SystemText('Lorem ipsum dolor sit amet,\nconsectetuer adipiscing elit. Sed posuere interdum sem.\nQuisque ligula eros ullamcorper quis,\nlacinia quis facilisis sed sapien.\nMauris varius diam vitae arcu.\nSed arcu lectus auctor vitae,\nconsectetuer et venenatis eget velit.'); if the text includes "\n", it become line breaks like <br> and user enable typing_effect = true; the text have typewriter-effect like RPG dialogue. First, render\text.js Add typing_effect varable. game.createClass('SystemText', 'Container', { ... /** Enable typewriter-effect @default false **/ typing_effect: false, i: 1, ... Add the following code, when user type "\n", it can do line break effect var lines = this.text.split('\n'); //Check New Lines for (var i = 0; i<lines.length; i++){ context.fillText(lines, 0, (i*this.size) ); _renderCanvas: function(context) { var wt = this._worldTransform; context.globalAlpha = this._worldAlpha; context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * game.scale, (wt.ty + this.size) * game.scale); context.fillStyle = this.color; context.font = this.size * game.scale + 'px ' + this.font; context.textAlign = this.align; //Add the New Lines like <br> and typewriter-effect like RPG dialogue. if(this.text == undefined){ context.fillText(this.text, 0, 0); }else{ if(this.typing_effect){ //Check If typewriter-effect is enable var lines = String(this.text.substr(0, this.i)).split('\n'); //Check New Lines this.i++; for (var i = 0; i<lines.length; i++){ context.fillText(lines[i], 0, (i*this.size) ); } }else{ var lines = this.text.split('\n'); //Check New Lines for (var i = 0; i<lines.length; i++){ context.fillText(lines[i], 0, (i*this.size) ); } } } } Main.js Enable typing_effect this.text.typing_effect = true; game.module( 'game.main' ) .body(function() { game.createScene('Main', { init: function() { var ths = this; this.text = new game.SystemText('Lorem ipsum dolor sit amet,\nconsectetuer adipiscing elit. Sed posuere interdum sem.\nQuisque ligula eros ullamcorper quis,\nlacinia quis facilisis sed sapien.\nMauris varius diam vitae arcu.\nSed arcu lectus auctor vitae,\nconsectetuer et venenatis eget velit.'); this.text.size = 50; this.text.font = 'serif'; this.text.color = '#ffffff'; this.text.typing_effect = true; //Enable typewriter-effect this.text.x = 10; this.text.addTo(this.stage); }, update:function(){ // this.text.text = 'Hello\nPanda'; } }); }); Could you update this @enpu? my code may be not good or more hardcode or not the best solution to achieve , Welcome to give me a feedback to improve my coding skill, Thanks text.js
  3. Today
  4. Hi, I have a bunch of Html5 games, some of them are greatly enjoyed and 2 more currently in development. Let me know what you're interested in doing. Retrobolt@hotmail.com
  5. Rubydesic

    Hitboxes

    The problem is, I want the Graphics object to be initially rotated, e.g. a slanted rectangle that straightens itself when hovered over (but the hit area remains slanted/same size). therefore, the hitArea that I need to set needs to be rotated?
  6. Tried below, but it did not work: http://cristian.sulea.net/blog/disable-browser-caching-with-meta-html-tags/
  7. Hi, When we upload a new version of our HTML5 game the new version is not shown until Internet browser cache is cleared? Does anyone know how to force the HTML5 game to disable caching? Perhaps a change to the index.html file? Let us know, thanks! Game is below: http://fallenangelsoftware.com/stuff/files/SpaceSwap/HTML5/index.html (game uses the AppGameKit Classic engine) Jesse
  8. Yesterday
  9. make a container, use your sprite as a child, and set "interactiveChildren=false" for container. Set hitArea for container as a rectangle. Animate sprite scale ( or width/height, same thing).
  10. Rubydesic

    Hitboxes

    I have a Graphics object that I'm checking mouseover events on. When hovered over, I want the object to get larger and rotate itself, but I don't want the hitbox to change. I'm not really sure how to achieve this, because getBounds returns a rectangle and not a polygon or something like that.
  11. Last week
  12. Hi all, I just wanted to let you know that Panda is still my primary game engine and I have no plans to abandon Panda. The absence of @enpu is unfortunate but don't forget that Panda is open source so most of the time, it is possible to fix minor issues yourself by having a look in the source code. Currently I have two large commercial projects powered by Panda and it is expected that these project will be running for at least several years. Don't forget that Panda by itself is a great engine and that it has a couple of features that not all other engines currently are supporting. Take hires support and the custom Panda GUI for example, these are just great! I will continue to read this forum on a regular basis. If there are questions that I can answer quickly, you can count on my support. Stephan
  13. Yes, told you it was going to be fun This is getting a bit out of my comfort zone ... our approach was using Nginx as the load balancer (with sticky sessions). PM2 approach works fine with this - with each NodeJS application instance running the service on a sequential port and sharing data between them with either a DB or Redis. The Nginx maps inbound requests to each server via internal-IP, and each instance via the port. So let's say 2 servers x 4 core = 8 instances with 8 ports. New user comes to IP:80, Nginx routes them to one of those 8, and remembers which one (so that Websockets can persist). Nginx configuration determines whether inbounds are round-robined or more elaborately determined - it's doing all the smart stuff automagically. It's certainly been solved before, so it's a matter of implementation rather than invention.
  14. box2d is too heavy. I prefer lightweight as P2, in my opinion, at most case, P2 should be best option.
  15. (1) Skeletal Animation Blending is performed by the GPU using pre-baked animation texture. (2) Automatically generated connecting path allows smooth transition between two distinct path animations.
  16. Did Phaser Editor have Code obfuscation function? Can it possible to export a phaser project that making the obfuscated code? Thanks https://phasereditor2d.com/
  17. Hi @Chelsea, I just signed and would like to know more about your platform.
  18. I'm actually having some issues with this topic. I have the following piece of code but for some unknown reasons the callbacks for progress and complete never get called and therefore the progress bar doesn't animate and I'm stuck on the boot scene...anyone can help? import {AbstractScene} from "../../Framework/Components/Core/AbstractScene"; import GameScene from "./GameScene"; export default class BootScene extends Phaser.Scene { private _progressBar: Phaser.GameObjects.Graphics; private _progressBox: Phaser.GameObjects.Graphics; constructor() { super({key: 'BootScene'}); } public preload() { this._progressBar = this.add.graphics(); this._progressBox = this.add.graphics(); this._progressBox.fillStyle(0x222222, 0.8); this._progressBox.fillRect(240, 270, 320, 50); this.load.on('progress', this._onProgress); this.load.on('complete', this._onComplete); } public create() { this.cameras.main.setBackgroundColor('#000'); } private _onProgress(value: number) { console.log(value); this._progressBar.clear(); this._progressBar.fillStyle(0xffffff, 1); this._progressBar.fillRect(250, 280, 300 * value, 30); } private _onComplete() { console.log('complete'); this._progressBar.destroy(); this._progressBox.destroy(); this.scene.add('GameScene', GameScene, true); } }
  19. I can't pass the scene. Becoz Smartfox server automatically throw's connection lost event to "checkConnection" class. R u understand what i am telling.
  20. get the scene instance from phaser scene class to your normal class by passing it through the constructor.
  21. Hi I am new to game development. I have an issue.. here is the screenshot of my game which I am developing. My screen is scrollable with phaser_kinetic scroller. When I scroll the sheets with numbers it should be masked from the white line and and disappear the part of group sprite which is crossing the line. How can I achieve that. I used graphics to mask. But the graphics also hides the background. I dont want background to be hidden.
  22. The site has a period of 60 days, which is twice as much as in other advertising networks. Therefore, adding another 10-14 days to this deadline is frustrating.
  23. BillyKane

    I'm back

    @enpu Are you work on Panda 3 development????
  24. They could be set that way but AFAIK there is no easy way to use them for compiling Phaser.
  25. I just wanted to update that recently the site has been rebuilt! It's now far faster then before and just feels so much nicer to use.
  26. One thing you should do if you are using WebFont is ensure before you proceed, the load is already done. You can use the active callback for this. I use some fonts which are web based or are local to my game. I do something like the following. WebFont.load({ google: { families: ['Pacifico'] }, active: function() { app.webFontsLoaded = true; if (app.coreAssetsLoaded) { app.nextState = GameState.Game; } } }); There are two flags in use here since I have 2 async things loading: font and and "core assets". So both loading mechanisms check to see if the other one is done. If you don't have this need, you can remove it.
  27. I have been receiving payments regularly now every month or so. I think you should always wait about 2-3 months, then you will get paid. Hope all is sorted now, fingers crossed.
  1. Load more activity