Massemassimo

Members
  • Content Count

    64
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    Massemassimo got a reaction from macavalon in Tiled json possible bug?   
    Ok so I had troubles with the tilesets because I copy/pasted some tutorial (can't find it right now) which used the following syntax:
    this.map.addTilesetImage('tile-image'); where 'tile-image' is the image of the tile (doh).
     
    Turns out using the "official syntax"
    this.map.addTilesetImage('tileset-name', 'tile-image'); where 'tileset-name' (again: doh) is the name if the tileset as specified in tiled fixed it for me.
     
    You can check it in your json-file under
    "tilesets":[{..."name": "tileset-name",... See if that fixes it maybe?
  2. Like
    Massemassimo got a reaction from Akshar Patel in How to write a class that extends from Phaser.Sprite?   
    Or typescript, like this:
    export class MonsterBunny extends Phaser.Sprite {rotateSpeed: number;constructor(game: Phaser.Game, x: number, y: number, rotateSpeed: number) { super(game, x, y); this.rotateSpeed = rotateSpeed;}update() { this.angle += this.rotateSpeed;}}
  3. Like
    Massemassimo reacted to rich in How to pause arcade physics   
    What a bloody great idea
     
    https://github.com/photonstorm/phaser/commit/0f42b530eb3891e35d21b509bc6f090f7a62263e
  4. Like
    Massemassimo reacted to darkraziel in How to pause arcade physics   
    The only quick way I could think of would be to create a global variable "isPaused" and then surround your update function with if (!isPaused), let me know if it works.
  5. Like
    Massemassimo reacted to Huulktya in Whats the best way to change rendering order?   
    The link to the answer doesn't work. Here is the correct link: http://examples.phaser.io/_site/view_full.html?d=groups&f=depth+sort.js&t=depth%20sort
  6. Like
    Massemassimo got a reaction from Wolfos in Typescript refuses to load files without png extension   
    For others coming here with the same problem: Solution can be found here:
    http://www.html5gamedevs.com/topic/3682-visual-studio-json-failed-to-load-resource-404/
  7. Like
    Massemassimo reacted to mwatt in The Phaser Book of Games   
    Sooooo interested in the Dungeon Crawl RPG game!!!
  8. Like
    Massemassimo got a reaction from valueerror in Fastforward button   
    Yeah, I wasn't quite sure what it did but it didn't render more FPS. Learned that today and was very confused for a while since changing the game.time.desiredFPS didn't chance game.time.fps.So as far as I can see the name "desiredFPS" is a bit misleading, FPS usually being the amount of frames drawn per second (hence the name ), not the amount of update loops.
     
    P.S.: maybe a bit of a funny story: Since I wanted to up physics calculations per second, I set desiredFPS to 120 and tried my best to handcode some sort of slowing mechanism for the FPS through locking framerendering for a certain amount of frames (half of them at desiredFPS = 120) by toggling game.lockRender true/false. Later of course it turned out that all of this was useless since phaser already handles that.
  9. Like
    Massemassimo reacted to farzher in Fastforward button   
    This works better. I don't have any issues with it. Thanks.
    But this also renders at 120fps, right? I don't need it to do that, that's a pretty big waste of resources.
     
  10. Like
    Massemassimo reacted to rich in The Phaser Book of Games   
    Hi all,
     
    Hope you're having a great 2015. Feels kinda like 2014 so far, but hey
     
    This post is part announcement, part question / survey. If you're reading this as a link from my tweet and don't have a forum account then feel free to send me comments on twitter.
     
    For a while I've been working on a project that aimed to recreate the coding books of the 80s but for Phaser. In the "olden days" (as my kids like to call it) you'd get a book stuffed full of type-in listings, each one creating a different mini game or example. For example:
     

     
    This book contained loads of games (of varying quality!) such as this:
     

     
    (here's a huge list of similar books if you're interested)
     
    I'm not suggesting that books full of code are the way to go any more. It's pointless making you all copy and paste code from a PDF But I do think there is still some merit in this approach. So I've been working on the Phaser Book of Games. Here is the 'features list' so far:
     
    Full source code to the complete games Professional game graphics and audio The book covers in detail the approach taken when building the game - a guide to the source, how things work and how to expand it yourself Code is broken down into sensible classes and States (no 'single file colossus') Games include boot, loader, menu system and win states Most games will work fine on mobile as well as desktop Includes grunt build scripts Uses latest version of Phaser Code is license free (artwork however is not)  
    This is where I'd love your feedback please:
     
    How many games would you like to see per book? (and any other comments!)
     
    Maybe 4 games per book and we release new books on a regular basis, each one with 4 different games. Would you prefer a much smaller approach? I.e. each book contains just 1 single game (or maybe 2?) Would you prefer more? Maybe 10 games per book and a much bigger book as a result? Maybe you don't care about the book part explaining the code, and just want more games and less details?  
    I see these books/games serving 2 purposes: 1) As a teaching aid primarily, but also 2) as blue prints you can use for your own games. Maybe for client projects or your own site. You can't use the graphics we provide, but you can certainly re-skin them easily as needed. There will be no restrictions on that.
     
    If you've any other comments then I'd love to hear them
     
  11. Like
    Massemassimo reacted to Arcanorum in I have no clue how to read the API!   
    Personally I think that content of the docs would be more useful in more of a wiki format, where people can add/expand/refine definitions, add examples, use cases, common problems and their solutions, etc.
     
    Maybe a HTML5 Game Dev wiki with a section for Phaser or (your framework of choice)?
  12. Like
    Massemassimo reacted to SebastianNette in I have no clue how to read the API!   
    The best advice that I can give is to take just a few hours 1 day per week to study the phaser source.
    Try to understand what is going on in the background. It really is not that complicated.
    That will allow you to organize your code better, improve your coding style and you will be able to get things done faster.
    On top of that, you will learn how to find the solutions to your problems in a matter of minutes instead of googling hours.
    This has always been the difference between people who only use a framework and people who undertand it.
    Most people are like "I have spent days just to find out why my tilemap is not working correctly" and similiar problems, but if you spend the same amount of time on studying the source, you will not run into that kind of problem anymore and in the long run this will not only save you a lot of time but also money.
  13. Like
    Massemassimo reacted to lewster32 in I have no clue how to read the API!   
    That seems like a crazy way to do it eguneys! Phaser builds on top of pixi to make all of that stuff much easier. If you're able to implement all of those things yourself, you'd probably not need to use Phaser, and you'd certainly not be struggling to understand the API! I could see people mastering Phaser and wanting to get 'closer to the metal' by moving on to pixi, but the other way around seems a pretty illogical scenario to me.
  14. Like
    Massemassimo reacted to codevinsky in The Phaser 3 Wishlist Thread :)   
    • Native UI Components (inputs, dropdowns, checkboxes, etc). Perhaps as a plugin?
  15. Like
    Massemassimo reacted to rich in The Phaser 3 Wishlist Thread :)   
    Don't forget the loyal TS users who will suddenly have meaningless defs What worries me most is that although TS is an edge-case, it's the way ES6 is heading very quickly! So we could spend months un-doing a whole load of work which may need re-doing later
     
    But I think there are ways around this. Objects OR parameters are easy enough to support from the exact same method.
     
    And as for the events it's time to drop Signals imho and look at something more native. Promises are a bit of a fudge imho, but could work. Needs investigation.
     
    The network stuff is interesting. It's not something I'd want to add directly but lewster is right, it does need support for it from the very bottom level. And then just let whatever API add its own implementation on the top. We're quite tied to Pixi though, so it may need some tweaking to get right.
     
    Anyway this is a wish list, nothing is discounted.
  16. Like
    Massemassimo reacted to lewster32 in The Phaser 3 Wishlist Thread :)   
    @fishrock: You're probably right, but if Phaser is going modular then I think it should maybe at least define some basic APIs, including something for bare-bones networking; even if it's just a concrete implementation of a 'network entity' object. At the moment, Phaser is very much a 'visuals first' framework and that makes it slightly awkard to separate the concerns of, say, physics and sprites, for instance - which you'd probably want to do with a network implementation.
  17. Like
    Massemassimo reacted to Fishrock123 in The Phaser 3 Wishlist Thread :)   
    @lewster

    I really think we should keep networking in plugins. There isn't much api that can be built to support different networking libs and protocols, not to mention auth systems, backend types, etc.

    An official plugin would be fine, I'd be willing to help on that, but I don't think it should be in core. I can envision tons of support being needed to tell still learning people they can't just plug and play and everything will work just fine.

    Edit: (Plus it will fracture everything even more for people who would rather use their own system)
  18. Like
    Massemassimo reacted to lewster32 in The Phaser 3 Wishlist Thread :)   
    Almost certainly a hugely ambitious wish, but a standardised way to implement networking easily would be really great. The Unity networking system would probably be a great thing to base it on, as that simplifies the whole process a lot down to RPCs and state sync. Obviously this would need to be supported by an external server implementation, or at least some centralised peer-to-peer WebRTC connection management such as that used by PeerJS.
  19. Like
    Massemassimo reacted to Fishrock123 in The Phaser 3 Wishlist Thread :)   
    I wouldn't aim for ES6 until it stably lands in all the Major browsers.


    If possible, I would like Phaser 3 to contain a massive api re-thinking to using objects for both options when creating / configuring things, events, any maybe other non-super-performance-critical things.
     
    Think constructors:
     
    // oldnew Phaser.Game(800, 600, Phaser.AUTO, 'canvas', null, false, true)// proposednew Phaser.Game({ width : 800 , height : 600 , renderer : Phaser.AUTO , domID : 'canvas' , antialias : true})// for those of you who prefer more traditional js stylingnew Phaser.Game({ width: 800, height: 600, renderer: Phaser.AUTO, domID: 'canvas', antialias: true}) This would help to keep code verbose and readable, while only making people pass the options that they need.
     
     
    Think events: 
     
    // taken from the loader events example// none of us actually remember this param orderfunction fileComplete(progress, cacheKey, success, totalLoaded, totalFiles) { text.setText("File Complete: " + progress + "% - " + totalLoaded + " out of " + totalFiles) var newImage = game.add.image(x, y, cacheKey) // stuff}// more in line with native js eventsfunction fileComplete(event) { text.setText("File Complete: " + event.progress + "% - " + event.totalLoaded + " out of " + event.totalFiles) var newImage = game.add.image(x, y, event.cacheKey) // stuff}
    In addition, HDPI support would be very nice, though I think that belongs in PIXI.
    Text renders awfully in canvas on my Retina display. :/
  20. Like
    Massemassimo reacted to spencerTL in Increasing the update loops per second?   
    Your question is somewhat similar to this current thread ( http://www.html5gamedevs.com/topic/11367-fastforward-button/ ) that I have managed to have no meaningful input on other than doubt! 
  21. Like
    Massemassimo reacted to lewster32 in Phaser Isometric plugin   
    Very nice stuff! I've taken a look at as3isolib's sorting method, as well as a few others - performance is always the biggest concern with HTML5 engines at the moment, so I'm exploring all possibilities. I think I'm going to provide a configurable depth sorting system, because as it stands the current depth sorting is absolutely fine for objects on a single z plane - it only breaks down when objects are on multiple z planes, and then only in a few scenarios.
     
    I'm quietly confident I can fix it to an acceptable degree just by playing with the maths for my current z-sorting, but having a graph-based sort as an option would definitely help make the plug-in as universally applicable as possible.
  22. Like
    Massemassimo got a reaction from clark in Stuck on learning Phaser (beginner question)   
    I really like Typescript with phaser since that makes it easier to realize bigger projects.
     
    Also, since typescript "accepts" pure javascript, you don't even need to learn TS beforehand. You could just rename your js files to ts and it would work fine (even though that would defeat the purpose of using TS in the first place).
  23. Like
    Massemassimo reacted to lewster32 in would it be more efficient to change tint colour or swap out multiple sprites?   
    Switching the sprite frame if using a sprite sheet or atlas is much faster than tinting, but you lose the flexibility of being able to tint to arbitrary shades. For what it's worth, tinting is still very fast in most cases; here's a demo I did of a possible future pixi/Phaser addon which redraws a BitmapText object and tints every character individually at full speed even running in canvas on a iPhone: http://rotates.org/phaser/bitmaptextcolor.htm
  24. Like
    Massemassimo reacted to Manifest in Stuck on learning Phaser (beginner question)   
    One option to consider is using Typescript instead of Javascript while you get to grips with Phaser, as IDEs like Visual Studio etc will provide you with Intellisense/autocomplete to help you find the things you want. Of course, then you might have to learn Typescript.
  25. Like
    Massemassimo reacted to lewster32 in Stuck on learning Phaser (beginner question)   
    Just to add, Visual Studio also supports intellisense with plain JavaScript.