rich Posted August 1, 2017 Author Share Posted August 1, 2017 Not initially, no. Skeletal support is on the roadmap for sure, but won't be in v3.0.0. Link to comment Share on other sites More sharing options...
Legomite Posted August 2, 2017 Share Posted August 2, 2017 Will Phaser 3 have some sort of normal map integration like other engines? Link to comment Share on other sites More sharing options...
rich Posted August 2, 2017 Author Share Posted August 2, 2017 Yes Legomite 1 Link to comment Share on other sites More sharing options...
Legomite Posted August 5, 2017 Share Posted August 5, 2017 Will bitmap text in Phaser 3 have multiple styles and colors support? That would be awesome! Link to comment Share on other sites More sharing options...
rich Posted August 5, 2017 Author Share Posted August 5, 2017 As bitmap text is based on a texture it's limited to how that texture has been designed. You can tint it (per character if needed) but any other styles need to be part of the texture. Link to comment Share on other sites More sharing options...
Zielak Posted August 7, 2017 Share Posted August 7, 2017 Hey guys, didn't wanted to create a new topic for this so I'm gonna ask here. I started Phaser 3 project with Visual Studio Code, and there's very little autocompletion. VSCode automatically guesses what it should show you in those little popups using JSDoc-style comments from a class-structured code (maybe it does more guessing, but thats what I discovered). So without it, I have to have source code or docs for Phaser 3 open on a second monitor or somewhere handy. I noticed you're using some custom tool to generate classes. Are you planning to switch to ES6-style classes? You don't have to worry about browser support, as you're already using webpack, so it takes care or importing/exporting, and class keyword is supported in most of the modern browsers. If you care for IE11 you could use Babel to transpile it, or let us do the transpilation in our game projects (freedom of choice, woohoo). Link to comment Share on other sites More sharing options...
rich Posted August 7, 2017 Author Share Posted August 7, 2017 I guess there is no autocompletion because there are no docs at all yet. Once we've started adding them I'd hope things will begin to fall in to place. Or at least as much as VS Code can ever accurately guess what it should be. Link to comment Share on other sites More sharing options...
cernec1999 Posted August 7, 2017 Share Posted August 7, 2017 First of all, thank you for all of the hard work you have done towards Phaser. It is honestly the best HTML5 game engine I have programmed in. This is more of an optimization if anything, but will future versions of phaser handle Tilemap collisions more efficiently? Currently, when calling methods such as setCollisionByExclusion on large Tilemaps, the loading time can take many seconds (especially on iOS and Android). Calling setCollisionByIndex on every tile on the map appears to be wildly inefficient, as proven by the timed functions below. I assume these methods are written this way to make the code more maintainable. I have provided a temporary fix for myself by combining the setCollisionByExclusion function and the setCollisionByIndex function. There is no noticeable delay anymore, and fairly large Tilemaps are loaded with collision in mere milliseconds. public setCollisionByExclusion(indexes, collides?, layer?, recalculate?) { //refactored method from superclass to increase performance if (collides === undefined) { collides = true; } if (layer === undefined) { layer = this.currentLayer; } if (recalculate === undefined) { recalculate = true; } layer = this.getLayer(layer); for (var i = 0, len = this.tiles.length; i < len; i++) { if (indexes.indexOf(i) === -1) { if(collides) { this.collideIndexes.push(i); } else { var i = this.collideIndexes.indexOf(i); if (i > -1) { this.collideIndexes.splice(i, 1); } } } } for (var y = 0; y < this.layers[layer].height; y++) { for (var x = 0; x < this.layers[layer].width; x++) { var tile = this.layers[layer].data[y][x]; if (tile && indexes.indexOf(tile.index) === -1) { if (collides) { tile.setCollision(true, true, true, true); } else { tile.resetCollision(); } tile.faceTop = collides; tile.faceBottom = collides; tile.faceLeft = collides; tile.faceRight = collides; } } } if (recalculate) { // Now re-calculate interesting faces this.calculateFaces(layer); } return layer; } Link to comment Share on other sites More sharing options...
rich Posted August 7, 2017 Author Share Posted August 7, 2017 None of the old tilemap code will be used in v3 at all. You should submit your revised method to the Phaser CE project. Link to comment Share on other sites More sharing options...
cernec1999 Posted August 7, 2017 Share Posted August 7, 2017 1 minute ago, rich said: None of the old tilemap code will be used in v3 at all. You should submit your revised method to the Phaser CE project. Will do - thanks again for everything you do! Link to comment Share on other sites More sharing options...
Legomite Posted August 8, 2017 Share Posted August 8, 2017 Will Phaser 3 support percentage values? (responsive UI!!!!) That would be cool to set position.x to a percentage value instead of a pixel value, or the font size and line height. Link to comment Share on other sites More sharing options...
rich Posted August 8, 2017 Author Share Posted August 8, 2017 No, because how could it tell the difference between a percentage and a float? Link to comment Share on other sites More sharing options...
Karma Octopus Posted August 9, 2017 Share Posted August 9, 2017 I've added some tilemaps to my test and generally it works fine. But I'm getting some odd artifacts on transparent tiles. I suspects it's due to filtering issues. So I'm wondering if it is or will be possible to set the filter mode for a texture manually, at least in webgl mode? For example I would like to use Nearest neighbor filtering right now for all the images I have but in some games I would need to have some images use nearest and some use linear filtering for example. I have attached an image to explain the issue I have. The left side if from Tiled (properly rendered) and the right side from the v3 test. I use dynamic tilemaps but with static tilemaps the result is exactly the same. You can see the outline on the dirt and the rock. You also see that the texture is smoothed in phaser. Link to comment Share on other sites More sharing options...
rich Posted August 9, 2017 Author Share Posted August 9, 2017 You can set the filter mode of a texture: var t = this.textures.get('key'); t.setFilter(mode); Where mode is 0 or 1. I wonder if maybe for tilemaps it ought to default to nearest though. Link to comment Share on other sites More sharing options...
Karma Octopus Posted August 9, 2017 Share Posted August 9, 2017 Thanks, changing filtering solved the outline problem! I think that tilemaps should default to nearest, just like how Tiled does it. That way you also don't get the outline issue I had. Also if you could add some constants like Texture.NEAREST and Texture.LINEAR that would be neat. Ex: t.setFilter(Texture.NEAREST), or something along those lines. Edit: I found Phaser.ScaleModes in the src. Link to comment Share on other sites More sharing options...
rich Posted August 9, 2017 Author Share Posted August 9, 2017 We discussed automatically setting nearest on the tileset image but there are possible side-effects, for example, a tileset that is a frame in an atlas would set nearest on the entire atlas, not just the tileset (as it's a texture-wide setting), so it felt a bit too magical to do automatically. There is a pixelArt: true game config setting you can flip which would cover cases for pixel art games, but if you're doing a mixed media game then I think it's up to you to know to split assets into 'linear' and 'nearest' atlases, and set the scale modes accordingly. Link to comment Share on other sites More sharing options...
Legomite Posted August 10, 2017 Share Posted August 10, 2017 On 8/8/2017 at 3:25 AM, rich said: No, because how could it tell the difference between a percentage and a float? String values for percentages? Link to comment Share on other sites More sharing options...
YuPi Posted August 10, 2017 Share Posted August 10, 2017 Is typescript still supported? There are no definition files yet, but that's probably related to the docs not being available yet. Link to comment Share on other sites More sharing options...
rich Posted August 10, 2017 Author Share Posted August 10, 2017 7 hours ago, Legomite said: String values for percentages? Then you'd have to do a typeof check every time a Game Objects position value is set and parseFloat it if a string. I dread to think what the cost of that would be in a typical game. To me, this feels like a feature very easily implemented yourself. Link to comment Share on other sites More sharing options...
rich Posted August 10, 2017 Author Share Posted August 10, 2017 18 minutes ago, YuPi said: Is typescript still supported? There are no definition files yet, but that's probably related to the docs not being available yet. There are no TS defs yet. JSDocs will come first but even then we still need to find an easy way to manage the TS defs, because doing them by hand like in v2 was a royal pain in the ass, and automating them is a lot harder than it first appears. Link to comment Share on other sites More sharing options...
Legomite Posted August 21, 2017 Share Posted August 21, 2017 Will the arcade physics be faster? Will arcade have support for surface friction for each body? And will it natively support slopes? Link to comment Share on other sites More sharing options...
QLNEO Posted August 21, 2017 Share Posted August 21, 2017 I'm currently working with lots of groups, and I really miss a kill() for groups. Not killAll(), I mean kill(). Since groups have alive, exists and visible properties, and that applies to children, it would be just natural to be able to kill groups as well. Of course... I'm still a newbie with Phaser. I apologize if there's already something like it, but surfing the docs there appears to be nothing. samme and YuPi 2 Link to comment Share on other sites More sharing options...
Doug Posted August 25, 2017 Share Posted August 25, 2017 Hi It would be really great to see better text formatting options. For example: The ability to specify a text area by setting bounds for x, y, height, width and then apply the formatting as per the current implementation, but have the text scale automatically to the size of the bounding box. That would enable us to center align an unknown amount of text and scale it nicely to an allocated area of the screen. An example call might be something like: var config1 = { x: 10, y: 10, width: 760, height: 100, text: "This is some text that will scale to fill the text area.", style: { fill: '#ffffff', align: 'center', backgroundColor: '#ff00ff' } }; this.make.text(config1); Thanks so much! Phaser 3 is awesome! D Link to comment Share on other sites More sharing options...
Karma Octopus Posted August 26, 2017 Share Posted August 26, 2017 I added some Impact physics to my test and it works very well. Some things that I needed though were getters for body position & velocity. I couldn't find any in the current code but I'm sure you'll add that later, if I didn't just miss it. In the mean time I just added some own temp stuff. Another thing I see is that debug boxes for bodies often overlaps when moving even if the bodies themselves don't overlap. I'm not sure if it's a bug or not. It looks like you maybe get the position data before the body has been pushed back after the collision. Link to comment Share on other sites More sharing options...
rich Posted August 29, 2017 Author Share Posted August 29, 2017 @Karma Octopus you can get those values from 'body.pos' and 'body.vel' (these are the original properties that Impact.js uses, so I couldn't change their names). I think maybe I may leave it like this for Impact, but when we add in Arcade Physics it should be a lot cleaner. You're right about the debug boxes though - they are drawn before the solver takes place (and update too). I could definitely move this to happen after everything has been solved, I'm just wary of yet another iteration loop. Link to comment Share on other sites More sharing options...
Recommended Posts