Popular Content

Showing content with the highest reputation on 09/10/2016 in Posts

  1. 3 points
    `game` is a local variable, local to the onload function. When you call `game.add.sprite` later (in the Player class you're trying to use) there is no local `game` so the engine will look for it globally, but there is no global reference, hence the reference error. Removing the onload closure would punt it to global, or you could do that explicitly within the function using `window.game = game` (which is an anti-pattern). You actually do expose 2 globals, namely `Game` and `player`, during the those script loads. As an added bonus for 6 there is also the issue that your wrapping onload function is totally extraneous as, currently at least, there is no more stuff to load so that script will execute only just before the onload event is triggered (possibly in the same tick as its the last thing, it can be a little tricky to tell cross-platform).
  2. 2 points

    How to smooth cached lines in Canvas2D?

  3. 1 point
    Well, good news is that Microsoft is going to support WebVR in the Edge browser. This is great, since it means that the Hololens and similar AR device may be accessible to web programming. However, to make it work with these devices, the WebVR spec just added and deprecated some functions. Apparently AR devices provide detailed rendering info that wasn't addressed in the WebVR 1.0 spec - the 1.1 upgrade fixes that. Migration Guide: https://github.com/w3c/webvr/blob/gh-pages/migration.md Updated samples: https://webvr.info/samples/ JS Shim for Chromium (which still has the 1.0 spec) https://github.com/w3c/webvr/blob/gh-pages/js/webvr-1-1.js The big issues: Replace VRDisplay.getPose() with VRDisplay.getFrameData() Use projection matrices provided by VRFrameData, instead of computing from VREyeParameters.fieldOfView() Use the view matrices from VRFrameData, instead of computing from pose + eye offsets
  4. 1 point
    Interesting news. Looks like Army is planning on using Babylonjs to bullid browser-based viewer for OpenSim see http://www.hypergridbusiness.com/2016/09/army-to-release-browser-based-viewer-for-opensim/
  5. 1 point
    Maybe this thread helps a bit.
  6. 1 point
    Thank you all guys, but Milton said: Is there a difference between using "this.state.start()" and "this.game.state.start" ??
  7. 1 point
    Hey! We released our new game that was in development for some time now. Find the way is a puzzle board game with moving obstacles. Android version is released today. You can check it out here (Free download ) : http://bit.ly/2c0g2E6 I uploaded a few screenshots here to get the general idea. You can find intro video and full descrption in the link above. iOS version is in development and is coming soon Enjoy, Matija
  8. 1 point
    The load event fires at the end of the document loading process. So it's just a question of getting the order right.
  9. 1 point
    Hi Degga, You can never trust onload So just remove the window onload lines. I think you also need to use 'this.game.state.start' in load.js.
  10. 1 point
    The Babylon community is much better than that of Three.js (which doesn't really exist). If you are going with JS or TypeScript, I would go with Babylon. Since I use Haxe, I like Three.js, because Babylon for Haxe has problems with mixing 2D/3D (for now).
  11. 1 point
    Since Phaser has basically cornered the JS gamedev market, it would be wise for @rich and @lewster32 to develop the plugin. Basic Tiled support is easy, *without* collision that is... Adding Isometric TileMap support to Phaser is *very* much work, but I think it should be done. The real problem with 2D Isometric is depth sorting. You (and most people) haven't got that far yet, but as soon as you start using Z (height), you're in for a world of pain. That's why I would advice to look at 3D engines (which also give you the option of rotation/dynamic lighting).
  12. 1 point

    Yet another camera question

    Hello, wow amazing demo. Thanks)) But I already achieved what was needed for me, I see your demo very usefull when doing enemy turrets or something:) This is what kind of movement I have currently. http://gph.is/2clIXGB
  13. 1 point
    I would guess this is an isoArcade bug. Try hitbox1.body.allowGravity = false;
  14. 1 point

    [Phaser] [Box2D] Super Soccer Noggins

    @yahiko thanks for the compliments. I know that the AI has some shortages, it was the first time I did AI and I could have it improved if I had had more time.
  15. 1 point

    obj loader with file with groupnames

    hi i just make that for how can select group of mesh use with one mesh hover on the GPU and no information for cpu side or javascript we just show that in render output http://www.babylonjs-playground.com/#1TYWYB#142 http://www.babylonjs-playground.com/#1TYWYB#143 you can keep your standard material and just need make helper material i recommend use this function function helper(mesh,groupKey, scene) { mesh.helperMaterial = new BABYLONX.ShaderBuilder() .Solid() // black material .SetUniform('Group','float') // define group uniform .InLine('if(Group=='+groupKey+'.0 ){') // condition of shader for change color .IdColor(13000200, 1.) // costom Color Id : 13000200 just some id to changed to unsigned integer and postprocess can detect that .InLine('}') // end of block .BuildMaterial(scene); mesh.actionManager = new BABYLON.ActionManager(scene); mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPointerOverTrigger, function(ev){ // when hover this mesh change selectiongroup selectedGroup = groupKey; })); mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPointerOutTrigger, function(ev){ // unselect when changed material is not used selectedGroup = 0; })); mesh._savedMaterial = mesh.material; // keep current material in that for optimized rendertarget }
  16. 1 point

    Import Scene Error: Blender

    Create your scene on your own: var myScene = new BABYLON.Scene(engine); Use Append instead of Load: BABYLON.SceneLoader.Append("", "stage.babylon", myScene); Import your Guy: BABYLON.SceneLoader.ImportMesh("guy", "", "guy.babylon", myScene); Add your executeWhenReady: myScene.executeWhenReady(function(){ ...}); This is much straight forward than nested loads / callbacks. May not fix your problem, but will get rid of messy callbacks & scene scope issues. If "guy" is the only thing in "guy.babylon", use Append instead of ImportMesh. Also, turn on logging during debugging & check your console: BABYLON.SceneLoader.loggingLevel = BABYLON.SceneLoader.DETAILED_LOGGING;
  17. 1 point

    Why not just make native games?

    Thanks vornay for mentioning Okijin Games Honestly, my experience tells a different story. I have been making a living exclusively from this business for the past 3 years and I am confident that there's many more opportunities ahead. First, the thinking that you will necessarily make more money on bigger marketplace than smaller one is wrong. In the same vein as elevator's speeches where the business owner tries to convince investors that because the market has 1 billion potential customers, if he gets only 1% of it they would be rolling on the money. In reality, larger marketplace means more competition, higher production values, higher budgets then much harder exposure. I could run a campaign to 40K installs on Windows Phone for $500 in 2013... How many new players would I get for that budget on iTunes or Google Play? The size of the marketplace only matters for the bigger companies. For the rest of us, we should go where user acquisition is the cheapest, that is all that matters. And if we ever reach that point where we need a bigger marketplace then I would say this is a "nice" problem to have for any business! And then this is just the surface, you need a game that can pay you back. What's the expected ARPU (average revenue per user) for a game made in 2 weeks and a "Remove Ads" Button as entire IAP strategy? The reality is that your only chance to cash in is to pray the gods for your game to go viral (so you don't have to spend a dime in user acquisition) - and this is a strategy that could have you waiting for a life time, very similarly to people playing the lottery (and I am not saying don't try). ARPU for a game like flappy birds is at best 0.01 (and yes with 5M daily users it comfortably pays the bill) but if the developer had to pay for user acquisition at that scale he would have probably lost money at the end with that game. True, HTML5 games quality is a step behind but is good enough to compete in several game categories (puzzle, casual...). I am confident that many players cannot really tell the difference between native or not with my latest game Sailor Pop, just released on Google Play. We are catching up Finally, if you have any game idea I would encourage you to just go for it and make it a reality and release it somewhere - anywhere. Don't waste too much time in existential thoughts about which technology and best place to release, go with what can make your project a reality. If you meet success, then again, all problems will be nice to have (porting to another platform, growing user base etc). People have been making much money with only targeting one platform. In Korea where I live, there are game businesses (SundayToz...) making millions mainly targeting the local KakaoTalk platform (the number 1 messenger app there).
  18. 1 point

    Yet another camera question

    Hi Temptation... welcome aboard. Or should I say... "welcome a billboard"? http://playground.babylonjs.com/#QKQHS#372 (line 56 - billboardMode... options available for X, Y, Z, or ALL) Your thing is in lines 63-65 (temporarily deactivated). Another fun thing is at line 68. BJS has lots of cool things to play-with, and lots of cool people. You seem to be one, too. Good to have you with us! PARTY!!!
  19. 1 point

    Do I have to leave babylon?

    Jerome already say it but I want to clarify it once again. Babylon.js is an Open Source project developed by enthusiasts ON THEIR BLOODY SPARE TIME. Which means we are doing that instead of playing World Of Warcraft (or having a life :)). I started it during a rainy week end and then I dedicated all my free time to it. I read all posts and with the help of a brilliant community we manage to provide responses to all questions in less than 2 days (worst case scenario. Thanks to Wingnut most of the time :)) Contributors like @Nockawa, @RaananW or @jerome spent ages working on advanced features. FOR FREE. Because they are passionate and because they love sharing and help others (what a weird idea). (Oh and by the way we support FBX: https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/FBX)
  20. 1 point

    Pixi and AngularJS

    Hi guys! Check my example with Phaser and Ionic using services! http://market.ionic.io/plugins/ionphaser (I'm using an Angular directive to do that) Regards, Nicholls
  21. 1 point

    MarketJS copying games again

    I don't mean to criticize your handling of this but you'll find people might respond more positively if you just admitted fault and removed the games in question rather than use the same pseudo corporate PR response as last time. The games mentioned in the thread last year are still live and for sale on your site so why should anyone believe you this time? For clarity, here they are again: Original game Let Me Grow MarketJS copy Baby Whale Rescue Original game Pilot Heroes MarketJS copy Pilot Training Original Game: Mini Race Rush MarketJS copy Monster Truck Original Game Mini Putt MarketJS copy Tiny World Golf Would it be possible to remove these from your site immediately and not sold in the future? I've had to explain to clients why there are are odd looking copies of my games around and I've lost sales to publishers who already have your clones of my games in their catalogue Another thing - there's a couple of forum users have been very busy trying to push this thread off the front page by bumping old posts. I also noticed that the last time they posted was at exactly the same time as the previous MarketJS thread about copying games... Please could you ask them to give it a rest as it screws up the forum for other users!