• Content count

  • Joined

  • Last visited

  • Days Won


nkholski last won the day on April 22

nkholski had the most liked content!

1 Follower

About nkholski

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Profile Information

  • Gender
    Not Telling
  • Interests

Recent Profile Visitors

2,415 profile views
  1. nkholski

    Phaser Plugin Starter

    I made a repository with a starter project for creating Phaser 3 plugins (Phaser 3.8.0+): Demo for testing your plugin with dat.gui integration for easy testing. Build script to build uncompressed and minified versions of the plugin (with source map) Webpack 4 ES6 support This is a cleaned up version of what I've been using for my Grid Physics and Animated Tiles plugins. Feedback and suggestions are appreciated. Clone it with git: https://github.com/nkholski/phaser-plugin-starter
  2. nkholski

    Generic platformer boilerplate

    @B.Guyl The webpack-stuff of repository a clone of a Phaser 2 boilerplate which I've managed to get to work with Phaser 3 through trial and error. I'm not a great source for webpack best practises. 🙂 (1) No idea. It's just kept as it was in the original repository. (2) I don't really understand the question. I prefer a source folder with content that should be transpiled, a static folder and a build folder that everything get copied to. I load the assets with the Phaser 3 file loader. (3) @snowbillr got you covered 🙂
  3. nkholski

    Creating Minimap as second Camera view

    I added a link to this thread and the codepen to the issue I mentioned above (https://github.com/photonstorm/phaser/issues/3547)
  4. nkholski

    Brunch with Phaser 3 (starter project)

    I'm using the es6-version. Great work. Sometimes it seems that it fails to wait for all imports though. I'm working with a button class and get this error now and then "menu.js:35 Uncaught TypeError: _button2.default is not a constructor" which resolves if I just save the file with the button class again unaltered. It was a thread here about making an official template. I think that's a great idea and maybe this could be a candidate? How does the build compare to webpack? I think an official template would get much more attention from the community, with examples on how to extend it and PRs to keep dependencies up to date.
  5. nkholski

    Creating Minimap as second Camera view

    Might be related to this issue when zooming in: https://github.com/photonstorm/phaser/issues/3547
  6. nkholski

    Grid physics plugin for Phaser 3

    Added support for levels (walk on or under a bridge) and updated the online example git-page today. Also replaced the image in the first entry of this thread with three gifs.
  7. nkholski

    Grid physics plugin for Phaser 3

    A proper Phaser 3 demo is now online on http://metroid.niklasberg.se/P3GridPhysics/ and I added turn-based mode toggled by dat.gui. You may also test things like setting a limit for the number of bodies the player can push, strength and velocity.
  8. nkholski

    Grid physics plugin for Phaser 3

    Thanks! Will try to upload a proper Phaser 3 demo until then. It'll be similar to the existing Phaser 2 demo minus pathfinding plus a few bugfixes and a working turn-based mode. With some luck, I'll manage to add z-index so that you can walk on or under a bridge.
  9. nkholski

    Grid physics plugin for Phaser 3

    Thanks! It's a plug-in with a demo, not a game to play. All you can do is walk around, test collision and push boxes. What do you mean with autofocus?
  10. nkholski

    Proper way to scale a game in Phaser 3

    The Mario example was made mainly while Phaser 3 was in beta and much by trail and error. That line should be removed because it does nothing (I found https://codepen.io/samme/pen/JMVBeV and tried it in my game with no success). I should really sit down and clean up the source. I ended up making a custom method to scale the whole canvas.
  11. I've published the first version of my grid-based physics plugin for Phaser 3 (a port and improvement from the Phaser 2 version). It makes it easy to create a game where the movement is restricted to tiles or a grid and comes with helpful built-in features such as a system for pushing objects or walking on one-direction tiles. I'm making the plugin to use it in a RPG I'm developing but it's suitable for everything from Sokoban-like games to Rouge-like. However, the development of the plugin will be focused to add features I need and fixing bugs that affect my game. Let me know if you use the plugin and feel that stuff is missing or if you run into issues. I won't be adding stuff just for the sake of the plugin unless there is a demand. 1. Testing a bridge and tiles will collidable borders. 2. Testing one-way collision (and I got stuck). 3. Turn-based mode with smooth animations. Multiple bodies getting pushed. DEMO http://metroid.niklasberg.se/P3GridPhysics/ (Use dat.gui to toggle turn-based mode, maximum number of bodies the player can push, velocity and more) Github: https://github.com/nkholski/phaser-grid-physics
  12. I've tried to put my assets folder in static but I get a 404 when trying to load an image: "/assets/image.png".
  13. Just tested it. Worked great to install (except it had a conflict against other service using port 8080). Is it possible to keep assets out of the src folder and avoid using import?
  14. nkholski

    Generic platformer boilerplate

    @Vlas @jorbascrumps I think it's a good decision not to call an update-method for all game objects (even if I was used to this from Phaser 2 and was quite confused why my code didn't work initially with Phaser 3). I hope we get a standard method to do this, like gameObject.runUpdate(true) to push it to an array of objects that get updated for each loop (and gameObject.runUpdate(false) to remove it again). However, doing it yourself as I do isn't that complicated either. It's probably a quite common bump on the road for those going from Phaser 2 to 3 though. @msickle The code is in the source code. I planned to clean up the code but couldn't stop myself from doing this instead, thus with a messier source code. The attract mode is the actual game stage running in parallel of the title screen with muted music. If you study it you see that you can activate a function to record keystrokes and positions of the player. Arcade Physics isn't deterministic and this was a big challenge, that's why I need to copy the position and velocity and not only keystrokes. I played the game while recording the keystrokes to a global variable. When happy with the result I did JSON.stringify with the object and I copied the output to a JSON-file. When running in attract mode I keep track on time and simulate keystrokes from the imported JSON and I adjust the position and velocity of Mario too to adjust it to what it was when I played. You can try to comment out the adjustment of position and velocity if you want and you'll see how soon it'll freak out. The enemies aren't controlled by anything else than game logic which means that Mario could be killed or miss a jump (he almost always fail to jump on the second goomba in the pair just before the first hole, my JSON seems to adjust Mario just in time to miss the enemy each time but sometimes Mario manages to squash it). It's far from a perfect solution but it was fun to make and good enough to keep in the demo I think :-). @Everybody: I'm super happy to see so many of you have used the repository. I mean 200+ stars is crazy! I didn't expect that. I've been busy with other things but hope to be able to return soon to update the code to Phaser 3, go through everything for readability and move misplaced code where it belongs. And of course, most probably get obsessed to add something new that makes everything into a mess again.
  15. nkholski

    Should I use Phaser 3?

    If your deadline is one month away and you're new to phaser and game development in general I would suggest Phaser 2. Otherwise I would really recommend Phaser 3. The claim that the industry would consider it a "release candidate" juat isn't true. It is a proper release and there is no reason "the industry" would call it something else. Anyone with such professional experience can easily pick up phaser 3 and create a game today based on examples and peeking in the source code now and then, and I think that goes for a lot of amateurs too.