rich Posted August 25, 2013 Share Posted August 25, 2013 Hi all, Ok I'm back from holiday feeling refreshed and invigorated. It was good to get away from it all for a while really. The stupid battle with the TypeScript compiler and missing my self-imposed deadline really took it out of me. But I'm now ready to tackle it again and get those final loose ends wrapped up. While I was away I noticed they released a new version of TypeScript, so I guess I'll try that again and see if it's any better than before. Also the TS developers reached out to me and have been offering me suggestions on how to help debug the compiler crashes I was getting. So, it's time to make this happen at last haden and Rudrabhoj Bhati 2 Link to comment Share on other sites More sharing options...
benny! Posted August 25, 2013 Share Posted August 25, 2013 Welcome back,mate.Cool to hear that you enjoyed your holidays. Link to comment Share on other sites More sharing options...
end3r Posted August 25, 2013 Share Posted August 25, 2013 Holidays are always a good way to rest from everything and get back with new energy. Can't wait to see Phaser reaching 1.0! Link to comment Share on other sites More sharing options...
WindSower Posted August 25, 2013 Share Posted August 25, 2013 Great to hear that your holidays was successful ;-) can't wait phaser 1.0. I'm on a edge of relasing my first "big" (aka polished) game which uses Phaser, and I think i would do that after 1.0 relase :-) Once more thanks for a great framework. Link to comment Share on other sites More sharing options...
Travis Posted August 25, 2013 Share Posted August 25, 2013 I believe in you! Link to comment Share on other sites More sharing options...
mwatt Posted August 27, 2013 Share Posted August 27, 2013 I can so understand how those trials and tribulations could take the starch out of a person's sails, but phew, so glad you are back. I've been checking every day, eagerly awaiting both 1.0 and some documentation and/or basic tutorials. However, one thing at a time - I'm excited for 1.0 alone. Link to comment Share on other sites More sharing options...
rich Posted August 28, 2013 Author Share Posted August 28, 2013 So after the lengthy discussion in this forum about dropping TypeScript I went ahead last night and did just that. So far it has been a really good experience. There is a new 1.00JS branch on github where you'll see my endeavours in the src and examples folder. But I'm going to use this thread as a means to log my progress for you all and (hopefully) solicit feedback on some choices as I go. Completed in the first commit: system/Device - for browser/os interrogationcore/Signal and core/SignalBinding - for the way Phaser handles eventsnet/Net - query string and domain checking functionsmath/RandomDataGenerator - a fantastic class imho time/Time - the time manager, updated a bit as wellanimation/Frame and FrameData - needed as part of the Cacheanimation/Parser - the new home for the old AnimationLoader, parses json and xml atlas data into FrameDataCache - the internal asset cache, fully workingLoader - the loader for all assets, fully working and added atlasXML, atlasJSON and atlasJSONHash as proxiesGame - the boot process and above libs enabled So not too bad for a few hours work I've got quite a big decision to make today though - shall I implement pixi.js for rendering or not. I need to do some solid experiments first, but I'm leaning towards doing it especially now that WebGL is on by default in Chrome Android. I much prefer my way of handling asset loading and caching, so I'll be using pixi for rendering only really, but I feel it would make a worthy addition. Pedro Alpera 1 Link to comment Share on other sites More sharing options...
Mike Posted August 28, 2013 Share Posted August 28, 2013 What I see as result from Pixi.js and the WebGL it would be a good thing to be included as renderer in phaser. Also they have ts support and are part of the family. Link to comment Share on other sites More sharing options...
rich Posted August 28, 2013 Author Share Posted August 28, 2013 Yes that's my thinking too. Right now I'm doing the boring "essential" stuff like geom and Math, but once those are out of the way I can move to experimenting more with hooking in pixi. It's going to be tricky because I only need the core bits of it, not the whole package, but it has become quite deeply coupled in places - so we'll see how it all pans out. Link to comment Share on other sites More sharing options...
Alvin Posted August 28, 2013 Share Posted August 28, 2013 I also agree that it would be a really good idea, having Phaser implementing (one of) the fastest renderer would be great. But maybe you could wait until IE 11 is released so the support would be even broader and the implementation more relevant ? Anyway, I'm impressed by how seamless the transition from TS to JS was Link to comment Share on other sites More sharing options...
rich Posted August 28, 2013 Author Share Posted August 28, 2013 More good progress so far today. Have finished geom/Circle, Point and Rectangle. Have merged the old CircleUtils (etc) into the core file, so they are a combination of the prototype, some getters/setters and Object functions. Best of both worlds imho. Also have done math/Math. Will get a couple more easy ones out of the way (tweens and raf) and then tackle the monster that is the Input classes. With that I can move on to Sound. A couple more files after this and it will be fully functional but without any rendering, which is a great place to take stock and evaluate my options. korpuskel 1 Link to comment Share on other sites More sharing options...
Mike Posted August 29, 2013 Share Posted August 29, 2013 By the way I have some questions and interest about the transition process: 1. Do you use the compiled .js files from VS ts project and manually transfer comments only ?2. How you preserve the relations and structure between classes (same as the exported files , amd, or manually ...) Overall if your answer is longer you can share the experience in article: Transition a large codebase from TS to JS it sounds like usefull thing so people will not be afraid to code in ts if they know that always there is an escape door. Link to comment Share on other sites More sharing options...
rich Posted August 29, 2013 Author Share Posted August 29, 2013 Progress last night was pretty epic. I have seriously refactored the main Game class. It's a lot smaller and more powerful now. Have also added in state object switching, custom callbacks and other core parts. Tweens are also now done and fully in, having updated to the latest tween.js in the process which bought a few bug fixes and yoyo support (something I added manually in the TS version, but is now in core). Most important of all though, it's now rendering via Pixi. So I've got a Pixi sprite on-screen, doing its thing, but the texture is being pulled from the Phaser Cache and you can control it via Phaser. Baby steps, but exciting all the same. Mike - A bit of both. I've been using the JS that TypeScript output, but having to rework it quite a bit - the structure is a bit strange, I'm having to move comments around and unpicking some of the things TS adds, but on the whole it's a fast and pretty efficient process. haden and Alvin 2 Link to comment Share on other sites More sharing options...
korpuskel Posted August 29, 2013 Share Posted August 29, 2013 Sounds great! Since Pixi supports Spine skeletal animation we also get that in Phaser now for free, right? Reading through the recent posts really makes me wonder whether I should use TS or not. Too bad Ecmascript 6 is still so far away: http://kangax.github.io/es5-compat-table/es6/ Anyway, keep up the good work Link to comment Share on other sites More sharing options...
Mike Posted August 29, 2013 Share Posted August 29, 2013 Reading through the recent posts really makes me wonder whether I should use TS or not. Too bad Ecmascript 6 is still so far away: http://kangax.github.io/es5-compat-table/es6/ This topic is discussed in a lot of other threads... and there is no single answer... but seeing that TS to JS is not hard, and after trying all of TS cool features i bet you'll use TS. Link to comment Share on other sites More sharing options...
rich Posted August 29, 2013 Author Share Posted August 29, 2013 Today I've overhauled the State system. It's now a lot more powerful with a proper full StateManager and the ability to have persistent states too. It's much easier to use from the JS side now. Link to comment Share on other sites More sharing options...
Rudrabhoj Bhati Posted August 29, 2013 Share Posted August 29, 2013 I am really pure a JS fan, is TS really worth all those problems? Link to comment Share on other sites More sharing options...
mwatt Posted August 29, 2013 Share Posted August 29, 2013 @rich: "Progress last night was pretty epic. I have seriously refactored the main Game class. It's a lot smaller and more powerful now." Sounds like the problematic TS was a bit of a blessing in disguise. No suprise really, I know that when I am forced to revist a project for one reason or another, it often comes out with more improvements that I thought it would. Anyway, this is great news. Sounds like you're on a roll. Link to comment Share on other sites More sharing options...
rich Posted August 29, 2013 Author Share Posted August 29, 2013 You're totally right Everything I have touched has been refactored for the better so far, and I'm making crazy good progress. Pixi is now quite deeply coupled and is handling all rendering, there is a new State Manager which is really quite awesome and have been cracking through. Link to comment Share on other sites More sharing options...
rich Posted August 30, 2013 Author Share Posted August 30, 2013 More excellent progress today. The integration of Pixi continues in leaps and bounds. You can now load any format Texture Atlas (json hash, json array or xml) or an old-skool style sprite sheet and the Phaser loader will correctly parse it and add it to the Pixi caches, so it renders and displays perfectly. I'm doing all of this without modifying the pixi source at all, so hopefully that will make for easier upgrading. Also added ability to disable anti-alias when using canvas (pixi only supports it via webGL) bunnyhero 1 Link to comment Share on other sites More sharing options...
Orillian Posted August 30, 2013 Share Posted August 30, 2013 So excited. Looking forward to the weekend so I can dive into the 1.00JS build! O. Link to comment Share on other sites More sharing options...
rich Posted August 30, 2013 Author Share Posted August 30, 2013 Just pushed the latest version. All of the core Phaser nice things are working their way back in You can now add sprites directly to the game world, tweens are working, all of the AnimationManager is back in and working beautifully, so very happy with progress for just a few days work. Really need to do some kind of camera system next. Sadly I'm about 99% sure using Pixi means I can only support 1 Camera at once To be honest I've never seen any games that used more, but even so it's a limitation I didn't have before. But until Pixi can handle cameras natively I may need to enforce that restriction. Link to comment Share on other sites More sharing options...
rich Posted August 30, 2013 Author Share Posted August 30, 2013 Oh for anyone wanting to have a (very very) early play with it - you should check out the sprite2.php file in the examples folder. That is the latest working example (most the early ones now break). Link to comment Share on other sites More sharing options...
rich Posted August 31, 2013 Author Share Posted August 31, 2013 Lots of work done this morning - the full Input Manager class has been moved over now. So Mouse, Keyboard, Touch and MSPointer events and everything they did under Phaser is now working. Also added a World and Camera object and Sprites are now placed inside the world, and you can move around the world and sprites update automatically as you'd expect. Also tidied up the core game loop significantly, reducing the number of iterations a lot. Time to do camera culling and input over sprite detection. Gotama 1 Link to comment Share on other sites More sharing options...
haden Posted August 31, 2013 Share Posted August 31, 2013 Really cool. Any idea when it will be ready for us to make game with (or is it already) ? Link to comment Share on other sites More sharing options...
Recommended Posts