Henrique

Members
  • Content count

    6
  • Joined

  • Last visited

About Henrique

  • Rank
    Newbie
  • Birthday 06/11/1987

Contact Methods

  • Website URL
    fb.com/henrique.pikachu
  • Twitter
    henriquepikachu

Profile Information

  • Gender
    Male
  • Location
    Brazil
  • Interests
    Game Dev
  1. Ok, a solve the client download problem, add some hints and create a new template: details: https://github.com/pe77/pkframework-examples running: pkframe init -p layers template running print: // "hey kiddo... Over here! Do you want kill some vampire lords"?
  2. >First of all: Sorry for my shitty english... I created this collaborative framework not with the intention of remaking the library(phaser) but organize code and the development environment. I separated in three parts: > Pkframework (github project) The framework itself // need to documentation @todo > Pkframework exemples (github project) Which will be both the repository of examples as the initial development models > Pkframework client (github project) Install the initial models and make them work (webserver, auto typescript compile/deploy, liveload, etc ...) I have some goals: > Development time - Quick installation of an initial template. (Pkframe init -p <example-dir>) - Modular, exensive and reusable code. Create your own lib and / or packages. > Simplify some concepts and create easy way to make somethings: - Layers (@done) - Paralax (@todo) - Pass parameters between states in a clearer way (done) - Events function as (actionscript like) [listener / handler] (done) - Prod / Dev env, deploy and configuration (@todo) - Premade UI layers, boxes, talkbox (@todo) - Integrate external apis (facebook / twitter) (@todo) > Export to mobile My next step is create something like: pkframe export --platform=android --release Export your project using cordova and generate a apk. (Or xcode project for [ios]) > Organizing the development environment If you get the code from another programmer, and this game was made using the framework, it will have a structure pattern. Which also makes it easier to work with someone. > Make It Simple! One of the things I love about the phaser is its simplicity. I started only with the framework, but I managed, through pk-client, to work with 2 commands. You no longer need to worry about apache/ngix, typescript compile (or prototype native js), and no browser refreash! A very similar environment with ionic. Only you need if NodeJS installed and pkframe client: - Install nodejs - run [npm install -g pkframe] Ok, now to install one of the initial templates or examples just need to run: - [pkframe init] // in an empty folder | default get a basic example/template | you can use [-p layers] to see another littler more complex example - [pkframe go] // to run all the rest // for some reason, only the first time i run [pkframe init], a get a error but, on the second attempt works. Dont give up! With the server running(simple local httpserver), each change in the code will compile the ts(auto tsc -w) files and refresh the browser(liveload). I wonder what you think of the idea? How is a fully open source project, I thought of something collaborative.
  3. hahahahah. Nice! that sound...
  4. In one of my games runs into an angular application. When the player reached highscore, I take a print out of the canvas and send the image to the server. However, this action was triggered by the game(phaser canvas), not by the angular app. // get angular scope this._scope = angular.element($('ion-view')).scope(); // call controller function this._scope.ShareRanking(this._game); in angular controller: $scope.ShareRanking = function(game) { $scope.rankingImage = game.canvas.toDataURL(); // bla bla bla ... Just do the same by adapting the code to, whatever it is using outside the phaser. scope: javascript.app { phaser.app } Just pick up the variable / function. outside canvas: var foo = function (param) {console.log ('done!', param)} inside: foo('yeah!'); Sorry for my shit English. I hope I have helped! = D
  5. Thank you! I'll keep that in mind.
  6. Hi! I have a little issue or misunderstanding. I do not know yet, help me figure it out. Look at the following code: // inside state create this.game.physics.arcade.gravity.y = 150; // create a simple group with a sprite into this.groupTest = new Phaser.Group(this.game); this.groupTest.enableBody = true; this.groupTest.add(this.game.add.sprite(0, 0, 'simon')); // f5 here : OK - Noting happen // or p2 this.game.physics.enable(this.groupTest, Phaser.Physics.ARCADE); // f5 here : OK - group and sprite inside fall like a rock // body undefined this.groupTest.body.velocity.x = 0; If I change the group by sprite it works, BUT, I need it to be with group. I know that in pure javascript inject variables (like body), it would work without any problems. But I'm doing it in Typescript and in Phaser.Group has no body. How to make it work? thnks! =D