dude78

Members
  • Content Count

    53
  • Joined

  • Last visited

About dude78

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    altstudy.com.ua
  • Twitter
    anotherdude78

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. dude78

    remove an item from a group

    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
  2. dude78

    I need a REAL book to learn and study the phaser2

    For Phaser 2 phaser.io/interphase
  3. dude78

    create: function() => unexpected token :

    @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. dude78

    Black screen over game

    @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. dude78

    create: function() => unexpected token :

    @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. dude78

    create: function() => unexpected token :

    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. dude78

    create: function() => unexpected token :

    @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. dude78

    Calculate needed y velocity for given y point

    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. dude78

    create: function() => unexpected token :

    @Colon, Hello. 1. Did you solve the problem? 2. Do you need an example how to create state(s) and use them?
  10. dude78

    cave2d.com/game5 is done

    Superb!
  11. dude78

    Spacedust Defender - a maze TD with a small twist

    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
  12. dude78

    Sprite disoration, fake 3d

    @tihoho, Wayback machine did. https://web.archive.org/web/20161212104624/http://ds-code.net/?p=1 2.5dPhaserGame.zip
  13. dude78

    Saving a Game in Phaser Easy Example?

    @Finwillwin, hello, I don't think so. As of me, I didn't understand your question.
  14. dude78

    [Phaser 3] Swordy Archer: First Target

    @kiklop133, you could also give opportunity to restart at least the last level with other bow. I like that game, thank you :).
  15. dude78

    [Phaser 3] Swordy Archer: First Target

    @kiklop133, I believe this is a bug. Level couldn't be completed even if there are no enemies. archer.mkv