dude78

Members
  • Content Count

    54
  • Joined

  • Last visited

Everything posted by dude78

  1. I wish I could give it a try, but simply can't. No full screen button. Android, Firefox. On PC can see text out of borders (guess it should be within): I am not sure that volume turn on/off button works. I am on the 3-d level, turned volume off, but still can hear the music.
  2. According to documentation. https://photonstorm.github.io/phaser-ce/ -> https://photonstorm.github.io/phaser-ce/Phaser.Group.html -> You must guess, you are looking for method, so: https://photonstorm.github.io/phaser-ce/Phaser.Group.html#toc-5 -> And looking for sth that contains "remove": https://photonstorm.github.io/phaser-ce/Phaser.Group.html#remove
  3. @Colon, Just there is no point to use it. If you need sth to be done when this state called, just add it either to create or init function. That code ("bad code") does nothing. But if I got your idea, a tip above might be useful. I didn't run it yet. I even don't whether it's for free or not. I'll take a look at it later and let you know then.
  4. @damager, presume, would be better to provide your post with a video. Also, I can't understand why do you need to use RESIZE to handle scale. How does it help with black screen? As of me there is little information. Suppose you know that there are functions as "enterIncorrectOrientation" and "leaveIncorrectOrientation" to handle game behaviour in case of device rotation.
  5. @Colon, why do you need to use immediately called function? (function() If you still want to use "(function(){})()", I assume this code will be useful for you: 'use strict'; Game.dialog = function state(game) {}; (function() { Game.dialog.prototype = { create: function () { console.log("here we are..."); } } })(); but I can't imagine why do you need to do so. There is no point of it... (So it's a bad code); So Conv.play() is not a function. What is Conv at all?
  6. I just had a look at your code. I did so before but now I got it. Try to rewrite your code, divide it into states and show what did you get. I'll try to help you then if you get stuck.
  7. @Colon, well... Shame on me I didn't work with modules yet. But. About using of states. Here is JUST EXAMPLE (Even don't know whether the following information will be useful for you): Let's assume we have 3 files: index.html, preloader.js, application.js. index.html: <!doctype html> <html> <head> <title>My App :)</title> <meta charset="utf-8"> <script src="../libs/phaser/phaser2/2.11.1.js" type="text/javascript"></script> <script src="js/application.js" type="text/javascript"></script> <script src="js/preloaded.js" type="text/javascript"></script> </head> <body> <script type="text/javascript"> var game = null; document.addEventListener("DOMContentLoaded", function(event) { game = new Phaser.Game({ width: window.innerWidth * window.devicePixelRatio, height: window.innerHeight * window.devicePixelRatio, renderer: Phaser.WEBGL_MULTI, parent: '', transparent: false, antialias: true, physicsConfig: null, preserveDrawingBuffer: true, enableDebug: false }); // add states to State Manager game.state.add('Preloader', MyGame.Preloader); game.state.add('Application', MyGame.Application); // start "Preloader" state game.state.start('Preloader'); }); </script> </body> </html> preloader.js: var MyGame = { }; MyGame.Preloader = function (game) { }; MyGame.Preloader.prototype = { // this function will be called first init: function () { }, // second preload: function () { this.load.path = "assets/images/"; this.load.images(["image1", "image2"]); this.load.path = "assets/sprites/"; this.load.atlas("sprite1"); this.load.atlas("sprite2"); }, // third create: function () { // here we start a new state "Application" this.state.start("Application"); }, }; application.js: MyGame.Application = function (game) { }; MyGame.Application.prototype = { init: function () { }, create: function () { }, update: function () { }, render: function () { }, }; So we can call each state as an object with its methods (such as init, create, update, render, loadupdate and more...) I'd recommend you to read Interphase book. As of me it is the best book for phaser 2. States are explained there too.
  8. Hi, @kodyrouse. Did you solve your problem? One simple tween slow your game down? It's better to show at least the part of your code then. I read questions and see "Phaser 2.6.2" from time to time. There is Phaser 2.11.1 as I remember as of now and documentation is available here: photonstorm.github.io/phaser-ce
  9. @Colon, Hello. 1. Did you solve the problem? 2. Do you need an example how to create state(s) and use them?
  10. Hi @hopeslicer. Unfortunately, I can't play it. After first level completes I see nothing but black screen and some stuff. Why does it happen? In case you'd like to see what's going on in console: But it works fine here: https://www.kongregate.com/games/hopeslicer/spacedust-defender
  11. @tihoho, Wayback machine did. https://web.archive.org/web/20161212104624/http://ds-code.net/?p=1 2.5dPhaserGame.zip
  12. @Finwillwin, hello, I don't think so. As of me, I didn't understand your question.
  13. @kiklop133, you could also give opportunity to restart at least the last level with other bow. I like that game, thank you :).
  14. @kiklop133, I believe this is a bug. Level couldn't be completed even if there are no enemies. archer.mkv
  15. this.game.scale.onSizeChange.dispose(); https://photonstorm.github.io/phaser-ce/Phaser.Game.html#scale -> https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html#onSizeChange -> https://photonstorm.github.io/phaser-ce/Phaser.Signal.html -> https://photonstorm.github.io/phaser-ce/Phaser.Signal.html#dispose
  16. Or check coords when click events is called.
  17. You could create another small object and place it at the center.
  18. dude78

    Detection zone

    See https://photonstorm.github.io/phaser-ce/Phaser.Physics.Arcade.Body.html.
  19. dude78

    Loading assets

    @tanmoy749, could you please show console messages?
  20. Hello all. I have a problem with Chrome on Android. When I switch to a fullscreen I can get different results: First one (all is ok): The Second one (a white band at the bottom): The third one when I leave fullscreen mode (white band at the top): I use the following code: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; this.scale.forceOrientation(true, false); this.scale.enterIncorrectOrientation.add(this.enterIncorrectOrientation, this); this.scale.leaveIncorrectOrientation.add(this.leaveIncorrectOrientation, this); I get such results only in Chrome on Android. Does anybody know why this occurs and how to solve the problem? Any tips would be appreciated!
  21. @ruslanfan, did you solve the problem?
  22. @ruslanfan, Why did you set width of Rectangle to -100? https://photonstorm.github.io/phaser-ce/Phaser.Rectangle.html#Rectangle
  23. Huh... I get slow fps in Chrome but not firefox (desktop). On mobiles all works fine.