Popular Content

Showing content with the highest reputation on 02/19/18 in all areas

  1. 3 points

    Stupax - Sidescroller game

    Hi all, I would like to introduce Stupax: A different sidescroller game, where you are not the guy, you are the level! In fact you control a movable platform using the arrow keys or your gamepad (Gamepad API) to help the guy (namely Stupax) to get through the levels. You can play the game here: http://mbarde.bplaced.de/stupax/ Controls: Arrow keys / Gamepad 'R' for level restart 'ESC' pause game and open menu Create and test your own levels here: http://mbarde.bplaced.de/stupax/editor.html You can find further information on my website and view the source code including contributions for the music, sounds and textures on GitHub.
  2. 2 points
    Phaser 3 BOILERPLATES | STARTERS Unify, upgrade, use. Last updated: March 6 Table of contents: 1. Intro 2. create-phaser-app 3. List of existing boilerplates 4. What kind of features we need/want 5. What's the point Intro: Hello there everyone! As Phaser 3 came out I immediately started to look after some Boilerplate which would take care of basic stuff and speed up the development. If you don't know what I am talking about, think of create-react-app, but for Phaser. There are a few already, however I think that is one of the things that shouldn't be re-created every time, but I'd rather see one, powerful, generator that is community driven, updated, and has many options. Richard has mentioned that he prefers this to be created by community, and just highlighted on the Phaser website. I am aware that sometimes you need something really different and boilerplate X won't suit your needs, but that's where configuration comes in (for example question at the beginning which physics you want to use). Unless even that can help you - get a different boilerplate/create new one. I want to help and in my opinion boilerplates are great way to unify the community, show out the best practices and speed up the development. Let me know what do you think about it. create-phaser-app: So currently I am developing this generator, which follows the convention of create-X-app. It will be configurable with --options, or by default running a "wizard" where you select basic options. At the start there will be only plain JS and typescript probably, but later on I'm planning to add things like multiple examples (ping-pong, platformer, etc) and many other stuff, but also some --basic flag where you get 0 configuration small project without any webpacks or anything! https://github.com/phaser-contrib/create-phaser-app Here's the repo. Project will be open up for contributions after I prepare the base. Hopefully after everything's prepared community will be able to focus this one and stop creating new ones, unless they really need to. Existing boilerplates list: https://github.com/oliverbenns/phaser-starter - https://github.com/rblopes/generator-phaser-plus - by @rblopes https://github.com/lean/phaser-es6-webpack/tree/phaser3 - (phaser 3 on different branch, i think it's still in development for p3) by @leandro Boilerplates/examples (things that fall in into example category, but still can be a good foundation) https://github.com/nkholski/phaser3-es6-webpack - generic platformer template (mario in this case) and it's based on phaser-es6-webpack by @nkholski I'll keep the list updated, you can give links in the comments too! Features: What should the perfect boilerplate have Recognizable name ES6 transpilation with babel ES6, CoffeeScript or TypeScript Webpack, along with live and hot reload Environment variables Continuous delivery and continuous deployment Images compress JS minify Standard folder structure with basic scenes like preload screen, game Config file for game configuration with all possible options Maybe something that will make sprite bundles ES lint configuration? (not quite sure as many people have different ways of writing code, however maybe just a small base for further configuration?) CLI commands (like create new object) Popular building integrations (Cordova, Cocoon etc) at least on some level Easy way to update Phaser Configurable at the start: Provide bigger example? or just standard template (for example do you want only one example asset, or whole game generated) Physics selection List of some basic useful plugins? That's all coming to my mind for now, leave the comments what would you like to see in a boilerplate! The point?: I know this may be not immediately clear "what the hell this guy want to do with this topic". I think it would be nice if community choose one boilerplate that already is in a good shape and drop all the focus on it. I don't think that this will be better if every person creates a new boilerplate for no good reason and reinvents the wheel. So to summarize: Create a list of boilerplates to have it in one place Let's choose together a boilerplate which community would accept to take care of, becoming a kind of "official" boilerplate (again think of create-react-app that is used by most of the people). (and yes, I am aware that not everybody will want that, but in most cases unified standard is a good thing, I guess?) List of features that this boilerplate would ideally have. I want to hear your feedback about the whole concept, maybe I am dreaming too much. From my side: https://github.com/lean/phaser-es6-webpack/tree/phaser3 seems to be the most popular, however don't think it's phaser 3 ready yet? Haven't looked at it yet. https://github.com/rblopes/generator-phaser-plus is also looking great, I've used it at it seems it has most of the features. What would I like to hear from you guys: Do you like the idea? If yes, would you like to prefer to choose an existing boilerplate or create a new one How would you name it if new one? If new one, clean start or forked from other project? What features would you add to the list Do you know any other generators that should be on the list? So let me know what do you think about it, let the discussion begin. Yey. Best regards.
  3. 2 points
    video-tag to canvas in iOS10 is using the BGR color scheme instead of RGB. Apparently. And they seem to have fixed it in ios11! way to go apple! This is my solution for this - https://github.com/BabylonJS/Babylon.js/pull/3785 , but I will wait for @Deltakosh, because he will probably have a better one. The idea is - there will be a new flag in the background material to switch the reflection texture to BGR instead of RGB. The developer (not moi but toi) will need to set the flag when needed.
  4. 1 point

    Visual Novel Engine RenJS

    Hi! I'm a developer from Argentina and I just released a visual novel engine based on Phaser and inspired by Ren'Py, called RenJS. The stories are written in yaml on a list of actions, and then interpreted and executed with Javascript and Phaser. It's easy to use by non programmers and it's super easy to extend and modify for anyone that knows a bit of phaser. I invite you to check the tutorial game I made with the engine itself in https://lunafromthemoon.itch.io/renjs, you can also get the code from https://gitlab.com/lunafromthemoon/RenJSTutorial, download it, play it locally and grab the files to make your own visual novels. There's no official documentation of it yet, but I'm working on it. I hope to get some feedback from you all, thank you!
  5. 1 point

    Uglify for ES6

    I have begun migration of all my stuff away from Eclipse back to Netbeans. The support for the Eclipse Typescript add-in has not worked for a while. I have been using Gulp to actually do any building. Netbeans editor for Typescript is much better, & importantly being updated / improved. Cordova projects is also nicer. I always use Netbeans anyway until I needed to work with Typescript. Eclipse was very early out of the gate. with Typescript. While Netbeans does gulp commands from a cascading menu, since the typescript editor relies on a tsconfig.json file, I wanted to move away from gulp. Netbeans also runs npm scripts (in a scripts collection in a package.json file) from a menu as well. I only really need one liners like "tsc" & "uglifyjs". I was intending to transpile to ES6 (do not care about ie11), so I need an uglify which supports it. By far the most downloaded Uglify is https://www.npmjs.com/package/uglify-js. It notes that you should use https://github.com/mishoo/UglifyJS2/tree/harmony for ES6. The first thing I noticed is this repo link is not the master branch, hence the question, is it just a little too early for es6? Has anyone used this?
  6. 1 point
    2018 has come, WebGL (1.0) adaptation is now widely available than ever (93.1% according to caniuse.com). More, high-performing mobile devices at low cost starts showing up. Internet is getting faster, whether it is dedicated broadband or mobile data. Mobile browsers are (arguably) getting better than ever. What's your minimum game project technical requirement for your players in 2018 and why? For me, I am aiming: 8 - 15 MB file size 720p - 1080p resolution quality 40 - 60 FPS Supports both Portrait and Landscape Works with any aspect ratio (no borders on fullscreen + responsive UI) WebGL only Works on these desktop and mobile browsers: Latest Chrome, Firefox, IE 11/Edge, and Safari Works on mobile devices at least: Samsung Galaxy S4 (Chrome)+, iPhone 5+, iPad mini 2/iPad Air, and more. Basically in terms of AnTuTu benchmark I think they are around the score of 30.000 or devices that are released around 2013 or near 2013. Cheers!
  7. 1 point

    Absolute positioning

    See, that's why @JohnK makes the BIG money. Thx JK!
  8. 1 point


    It's my kind of humor and I love when games do it
  9. 1 point

    Absolute positioning

    There Good PG. Alternative https://www.babylonjs-playground.com/#12YQ6V#2
  10. 1 point

    Absolute positioning

    Can I try it, JK? https://www.babylonjs-playground.com/#12YQ6V#3 Hey, that's close. Look at line 80... the positioning before the bake. divide-by 50's? Holy cow. I think I am pretty far lost. A guy needs to be a nuclear scientist to get THIS mesh baked into submission (into being squared-up with its world). heh. Unreal. I have no idea why it is acting that way, but it sure is fascinating. (PS: I changed camera to z-facing)
  11. 1 point
    @RaananW The workaround worked! thanks for looking into this!
  12. 1 point

    p2.js plugin

    p2.js plugin v1.2.0 released! The plugin now supports latest version of PhysicsEditor 1.6.4 See documentation and Panda 2 PhysicsEditor tutorial
  13. 1 point

    Uglify for ES6

    yes... There are a lot of problems still to be solved with es6 modules (personal opinion, actually). For example - the "traditional" npm-packaging-in-node-modules cannot work as you expect, as you need to link the file directly. No webpack-magic or browserify. For us as a framework, it is nice to offer an es6 module (which we do). But we still focus on UMD modules.
  14. 1 point
    I had tried to do this some time ago and I had not succeeded too. In fact babylon can only play one animation at a time of what I understood. Otherwise it is necessary that the movement of the eyes is integrated in the animation of walk for example. If there are two separate animations, only one will play. This subject interests me a lot if a solution is found. Maybe something is missing at babylon to handle multiple simultaneous animations.
  15. 1 point

    Multiple problems with my phaser-project

    @Arnon dropped by the discord ask asked about this -- I did some digging and came up with the following change to their `create()` method in `game.js` which achieves the behavior they were looking for: function create() { _game.physics.startSystem(Phaser.Physics.ARCADE); // set references _keyboardInput = _game.input.keyboard; // in theory ScaleManager.setMinMax doesn't work with SHOW_ALL (see docs // at https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager.html#setMinMax) // but empirical evidence definitely suggests that this works and is way // better than EXACT_FIT because of a weird tendency to scale only in // the X direction when resizing larger after the game has shrank. _game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; // make sure that our max is set to the max that the lesser of the width // and height -- this is because we don't want scale manager to use the // wrong axis as a scale guide. We could probably get away without doing // this if I understood how SHOW_ALL selected scaling axis better var sz = Math.min(window.innerWidth, window.innerHeight) // Make sure that the game doesn't scale anything larger than our selected // size. There is some interplay here between the aspect ratio (meaning we // can just use the same value) but that's left handwaved away. _game.scale.setMinMax(0, 0, sz, sz) // when the canvas resizes the window width/height changes which may mean // our game is no longer appriately sized. This will recompute all that // shit we just talked about _game.scale.setResizeCallback(function() { var newSz = Math.min(window.innerWidth, window.innerHeight) _game.scale.setMinMax(0, 0, newSz, newSz) }) // init game objects _map.init(); _player.init(); _ausgang.init() }
  16. 1 point
    First step is getting the jsdoc convert to valid TS defs without any hacks. That will require lot of fixes in the actual jsdoc. Then we can think about these dynamic plugins, possibly adding custom jsdoc tag for it. It shouldn't be too difficult I hope. In any case it will definitely have to be automatic and based on the jsdoc, not custom per-plugin manual hacks in the converter or anything like that. By the way, a lot of work already went into the jsdoc being TS friendly, but it's more difficult than it might seem on such a big project. JSDoc itself doesn't help there much either
  17. 1 point

    Create a pane of sprites?

    https://phaser.io/examples/v2/input/button-open-popup https://phaser.io/news/2017/10/message-box-tutorial This is the most in-depth examples of modal popups: https://github.com/netgfx/phaser_modals
  18. 1 point

    GPU particles

    Heya team!! I'm proud to announce that the GPU particles feature is now available! Documentation: http://doc.babylonjs.com/babylon101/particles#gpu-particles Interactive demo: https://www.babylonjs-playground.com/#PU4WYI#2 Please note that this feature requires webGL2 or it will fallback to CPU particles
  19. 1 point

    Improve external lightmaps interpretation

    Yeah, you rocks! It seems to work much better: http://www.babylonjs-playground.com/#59ZXVF#15 I've added a neutral environment, by not using the default one of createDefaultEnvironment, it adds a more... neutral... light (line 6). It looks like we now have a better interpretation than playcanvas (playcanvas ref vs BJS patched). Thanks for that great patch!
  20. 1 point
    It's fixed with Chrome v64
  21. 1 point

    Does Phaser 3 use Pixi.js?

    Phaser 2 uses a (slightly) modified Pixi 2, where-as they're currently working on Pixi 5. So they've had years to improve it and of course have done so! I don't believe it's optimized for mobile though, nothing I've seen indicates that, but you can tweak it so much you can target it for mobile for sure. Be careful with your assets and memory use and I'm sure it would fly along. I've seen reports that Pixi 3 is faster than 4, but I honestly think it's use-case specific, and in the general scheme of things, 5 will beat them both out.