• Content Count

  • Joined

  • Last visited

Everything posted by ekeimaja

  1. Damn, I had this same game idea at last summer when I was tired at work and slept always when my boss did not see me and then I came up with same idea.
  2. Does anybody has any kind of blank Babylon boilerplate with ready folder structure?
  3. @adam can you get that work? When I run it in the browser, the window keeps blank and I see only the fps meter in bottom right.
  4. Is there any comprehensive es6 boilerplate for Babylon? For Phaser is a lot, but for Babylon I haven't found yet. If somebody has done some kind of boilerplate, could I get it also?
  5. Then it gives this error 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ] 2 info using npm@3.9.5 3 info using node@v6.2.2 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle phaser-es2015@0.0.1~prebuild: phaser-es2015@0.0.1 6 verbose lifecycle phaser-es2015@0.0.1~prebuild: unsafe-perm in lifecycle true 7 verbose lifecycle phaser-es2015@0.0.1~prebuild: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/ekeimaja/Desktop/phaser-es2015-master/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 8 verbose lifecycle phaser-es2015@0.0.1~prebuild: CWD: /home/ekeimaja/Desktop/phaser-es2015-master 9 silly lifecycle phaser-es2015@0.0.1~prebuild: Args: [ '-c', 'npm run clean' ] 10 silly lifecycle phaser-es2015@0.0.1~prebuild: Returned: code: 1 signal: null 11 info lifecycle phaser-es2015@0.0.1~prebuild: Failed to exec prebuild script 12 verbose stack Error: phaser-es2015@0.0.1 prebuild: `npm run clean` 12 verbose stack Exit status 1 12 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:245:16) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at EventEmitter.emit (events.js:191:7) 12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at ChildProcess.emit (events.js:191:7) 12 verbose stack at maybeClose (internal/child_process.js:852:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 13 verbose pkgid phaser-es2015@0.0.1 14 verbose cwd /home/ekeimaja/Desktop/phaser-es2015-master 15 error Linux 4.0.0-040000-generic 16 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" 17 error node v6.2.2 18 error npm v3.9.5 19 error code ELIFECYCLE 20 error phaser-es2015@0.0.1 prebuild: `npm run clean` 20 error Exit status 1 21 error Failed at the phaser-es2015@0.0.1 prebuild script 'npm run clean'. 21 error Make sure you have the latest version of node.js and npm installed. 21 error If you do, this is most likely a problem with the phaser-es2015 package, 21 error not with npm itself. 21 error Tell the author that this fails on your system: 21 error npm run clean 21 error You can get information on how to open an issue for this project with: 21 error npm bugs phaser-es2015 21 error Or if that isn't available, you can get their info via: 21 error npm owner ls phaser-es2015 21 error There is likely additional logging output above. 22 verbose exit [ 1, true ]
  6. Now I tried to launch it with npm, and it gives just errors. 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'build', 'run' ] 2 info using npm@3.9.5 3 info using node@v6.2.2 4 info build /home/ekeimaja/Desktop/phaser-es2015-master/run 5 verbose stack Error: ENOENT: no such file or directory, open '/home/ekeimaja/Desktop/phaser-es2015-master/run/package.json' 5 verbose stack at Error (native) 6 verbose cwd /home/ekeimaja/Desktop/phaser-es2015-master 7 error Linux 4.0.0-040000-generic 8 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "build" "run" 9 error node v6.2.2 10 error npm v3.9.5 11 error path /home/ekeimaja/Desktop/phaser-es2015-master/run/package.json 12 error code ENOENT 13 error errno -2 14 error syscall open 15 error enoent ENOENT: no such file or directory, open '/home/ekeimaja/Desktop/phaser-es2015-master/run/package.json' 16 error enoent ENOENT: no such file or directory, open '/home/ekeimaja/Desktop/phaser-es2015-master/run/package.json' 16 error enoent This is most likely not a problem with npm itself 16 error enoent and is related to npm not being able to find a file. 17 verbose exit [ -2, true ]
  7. When I ran that with Mozilla, console gives this error: SyntaxError: import declarations may only appear at top level of a module
  8. Has anyone done or found blank ES6 Phaser template? All I have found, are just ready multiple state and gulp templates. ES6 is new thing for me, so that's why I'd wish to get just blank project template without multiple states etc.
  9. I have thinked about this now for a long time. So, if you have really great idea and you would like to begin developing it, what would be the time when you tell about it to public. If: Too early: someone steals the original idea and creates game before you. Too late: someone else invents the same idea and begins to create it. So would it be the best time in that point when you have something real to show, early sketches etc.
  10. So I am now making 2d sidescroller, where player can jump with trampoline. But I cannot get it working as I would like to. I made it like this in Physics Editor: But because of using material, which enables bumping, it makes like with arcade physics. (RED IS SHOWING AREA WHERE I WANT IT TO LAND.) So, is there any solution to this? One possible is to cut that jumping area half, and put it together in game with constraints.
  11. Now I changed it to tileSprite, and now it works. Thank you all!
  12. No, still black screen. Now I got error Uncaught TypeError: e.create is not a function Earlier I haven't had any problem like this. 980x860 image is ok by its size?
  13. Now I removed that function, but it is still black.
  14. var RPG_test = RPG_test || {}; RPG_test.game = new Phaser.Game(640,640, Phaser.AUTO, 'game'); RPG_test.game = function () { }; RPG_test.game.prototype = { preload: function () { this.game.load.image('street', 'img/street.png', 980, 860); this.game.load.image('player', 'img/human.png', 50, 50); }, create: function () { this.game.physics.startSystem(Phaser.Physics.P2JS); this.cursors = this.game.input.keyboard.createCursorKeys(); this.game.add.sprite(0, 0, 980, 860, 'street'); this.player = this.game.add.sprite(400, 400, 'player'); this.game.world.setBounds(0, 0, 980, 860); this.game.physics.p2.enable(this.player); this.game.camera.follow(this.player); } When I try to run that, game area appears just black.
  15. Now I moved main.js to others, error disappeared, but it shows just black.
  16. <div class="home-header-wrap"> <?php global $wp_customize; echo '<div class="header-content-wrap">'; echo '<div class="container">'; ?> <script src="<?php echo get_stylesheet_directory_uri(); ?>/game/phaser.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?>/game/boot.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?>/game/preload.js"></script> <script src="<?php echo get_stylesheet_directory_uri(); ?>/game/game3.js"></script> <div id="game"> <script src="<?php echo get_stylesheet_directory_uri(); ?>/game/main.js"></script> </div> <?php echo '</div><!-- .header-content-wrap -->'; echo '<div class="clear"></div>'; ?> </div> Now it gives error SyntaxError: expected expression, got '<' Phaser.Loader.prototype.fileComplete() phaser.js:71080 Phaser.Loader.prototype.xhrLoad/xhr.onload() phaser.js:70672
  17. So, I need to put Phaser game to WordPress static site. Theme is called Zerif lite. I need to put game to big title -section, where is not possible to use widgets. How can I make the game appear to this section? Where do I put my game folder structure? Or is this even possible to make?
  18. Don't bother to this, if you make Lazer with own renderer. It's just waste of time imo.
  19. Do you have skills to make great top-down graphic? Are you willing to show your skills worldwide? If you answered yes, then I can offer some work for you. If the game makes success, you get your own share of profit. Make a sample and send it to me via PM. It does not need to be breathtaking, but not either some quick botch-up. It doesn't matter which software you use, and it can be either vector or pixel art. Game will be top-down driving game in different sceneries, so needed content to do will be countryside, suburb and downtown style graphics and different cars.
  20. this.enemy = enemy; enemy.destroy(); With this it now disables enemy physics, but does not destroy sprite. If I add sprite keyword between enemy and destroy, it gives error. rich, please improve collision events in Phaser 3!
  21. Everytime player collides to any enemy, that enemy object needs to be killed. Enemies are made as group. I need some simple solution for this. this.enemies = this.game.add.group(); for (var i = 0; i < 90; i++) { this.enemy = this.enemies.create(x,y, i); this.game.physics.p2.enable(this.enemy); this.enemy.body.setMaterial(this.enemyMaterial); this.enemy.body.static = true; this.enemy.body.collideWorldBounds = true; this.enemy.outOfBoundsKill = true; this.enemy.body.velocity.x = 290 + Math.random() * 87; this.enemy.body.setCollisionGroup(this.enemyCG); this.enemy.body.collides([this.playerCG, this.wallsCG]); } this.player.body.collides(this.enemyCG, this.killEnemy, this); none of these does not work. How it works in the example then? killEnemy: function (player, enemy) { //this.enemy.animations.play('die'); // this.enemy.kill(); // this.enemy.destroy(); // this.enemies.remove(this.enemy); }
  22. Much better! Now code snippets are readable again
  23. This would be really useful feature. Collision groups are not as useful as materials imo. contactMaterial.setEvent(call_function);
  24. This is nice, simple graphics and smooth gameplay. "blablabla..." must try this later again.
  25. This is really great and useful for all! Thank you so much!