Popular Content

Showing most liked content since 03/17/2017 in all areas

  1. 9 likes
    Hi beloved community, The implementation of WebVR 1.1 is in pretty good shape, @RaananW has done an impressive work. We're still in the process of polishing and finding ways to make it simple & powerful, the spirit behind Babylon.js since the beginning. You can read the documentation here: http://doc.babylonjs.com/overviews/webvr_camera and you'll discover that you can map your controllers (HTC Vive Wand or Oculus Rift Touch) to a mesh to the final sample shared at the end: http://www.babylonjs-playground.com/#5MV04 (you need a recent version of Chromium or Firefox with gamepad extension enabled you may find on http://webvr.info) I'm in the process of integrating the 3D models of both controllers. For instance: - HTC Vive Wand model: http://www.babylonjs-playground.com/#NCLFI - Left Touch: http://www.babylonjs-playground.com/#NCLFI#1 - Right Touch: http://www.babylonjs-playground.com/#NCLFI#2 I'd like to animate them by default when you'll press the trigger & the button to enhance immersion and provide you a default behavior that'll match most use cases. We still need to work on that with Raanan. I'm also experimenting turning Sponza in VR mode: http://aka.ms/sponzaVR . You can play with it if you've got a WebVR 1.1 device but beware, I'm still breaking it frequently. It also works on smartphone using Cardboard as we're falling back to VRDeviceOrientation camera in case of non WebVR support. VR for all!!! Regarding WebVR, it currently works in: - Edge Windows 10 Insider fast version that ships WebVR on by default. You can try it using the Mixed Reality Portal simulator: https://mixed.reality.news/news/try-windows-10s-mixed-reality-portal-your-pc-with-insider-build-15048-no-headset-required-0176419/ - Chromium with HTC Vive & Oculus Touch Stay tuned, we're continuing building great stuff you'd like. Cheers, David
  2. 7 likes
  3. 7 likes
    A note to anyone working with companies like this: they will distribute your games far and wide. You will not be able to license your games to other publishers when Famobi is giving them away for free. These companies also devalue HTML5 games as a whole with this strategy, making it harder for other developers to sell their content. Why would a company pay $500 for a license when they are getting games for free? My advice is to not shoot yourself in the foot, and to support the developer community by maintaining realistic prices for HTML5 games.
  4. 6 likes
    Hey all, we just launched a project for NZ Fire Service that I've been working on for the last few months. http://www.escapemyhouse.co.nz/ The experience works in-browser across Desktop, Tablet, Mobile, and VR. iOS has been especially challenging as it has some pretty heavy restrictions when in comes to inline video. Babylon has proven to be an incredibly powerful tool and I'm already working on another project that utilizes it. cheers,
  5. 6 likes
    I suggest you try this (it has worked for me, although it is in all probability still buggy in certain cases, and since the sin/cos aren't cached it's going to be a little slower. But hey 1. Extend your object that you want to skew 2. Give it skewX and skewY properties. 3. Create a function for your extended prototype called "updateTransform" 4. Go into the phaser source code and copy the content of PIXI.DisplayObject.prototype.updateTransform into your overriding updateTransform 5. Replace the following lines: a = this._cr * this.scale.x; b = this._sr * this.scale.x; c = -this._sr * this.scale.y; d = this._cr * this.scale.y;With this: a = this.scale.x * Math.cos(this.rotation + this.skewY); b = this.scale.x * Math.sin(this.rotation + this.skewY); c = this.scale.y * Math.sin(-this.rotation - this.skewX); d = this.scale.y * Math.cos(this.rotation + this.skewX);6. comment out the rotation cache calculation 7. amend the if clause "if (this.rotation % PIXI.PI_2)" to say "if (this.rotation % PIXI.PI_2 || this.skewX || this.skewY)" Now you have objects with Flash-compatible skewX and skewY values (ie skewX and skewY are radians values of skew angles). At least that's how it works for me (top sprite's texture is circular): If you want ALL DisplayObjects to have skew, you can try and override the function you copied from (PIXI.DisplayObject.prototype.updateTransform). In that case, I suggest you add checks for whether skewX and skewY exist, or otherwise make sure they are added in the constructor. I have not tested this and I cannot guarantee it'll work.
  6. 5 likes
    Hi Everyone, Pie.Ai (alpha) is my new HTML5 multiplayer game. Jump straight into the action and eat as much as you can of everything (even other players) but don't stand in the JAM! With simple one touch control to jump, eat, fly, open locks, break blocks or attack the game is designed to offer seamless experience across all devices (phones, tablets, PC). This alpha version was developed in one month (originally part of another project, more details below). Note that I have currently limited the number of players to 12 for the alpha so you may get the "Tables full" message if it gets busy at time (you can always spectate to get an idea). Click here to play Here is what to expect in the next few days: Lootable Armor (or temp invulnerability). Improved bot AI. More skins Multi-language support Gold shop to unlock starter packs and skins (gold farming allowed). Game Design: Propeller vs Jetpack for flying (currently both items behave the same, I am thinking of differentiating them) Smash items mechanism (jumping on some items to trigger some effects) Game modes (have a few ideas that need to be tried out). Initially that game was to be part of another upcoming project (mini game for Idle Brainz) but somehow I got stuck with the top-down graphics and changed to adopt an isometric view. Since the style ended up so different from Idle Brainz, I decided that a separate standalone release would probably be better. Feedback are welcome.
  7. 5 likes
    Update; 23.03.17 - Early Preview of new gamemode; ---------------------- Hi all, This is a project i have been working on for quite a while now, I've spent a lot of time on testing and trying different ideas and set-ups, and after several month's of set-backs and delays due to both changes aswell as some personal matters, I believe it's finally moving in the right direction. As the title indicates, it's called Bloodshed Online. I've set-up a very simple demo at; Bloodshed.online Demo notes; Update 14-03-2017; Enabled the third unit, a spearman. New game mode; FFA (Free For All) FFA; -Queue; Attempts to find an existing game which isn't full, if unable, it will create a new game and instantly join the player, effectively removing queue time. (Future updates will include AI mobs & actual map content) -Up to 25 players per game. -Guests can now only play FFA, Original Post; Tested & working in; Chrome, IE 11, IE Edge, Opera & Firefox Currently no mobile support. The UI & UI design is in-complete. The in-game chat is not active. (Doesn't emit to server/other player(s)) Click "Play as guest" Wait for opponent or open another browser tab to play against yourself in a splitscreen. Click on one of the unit icons in the "game lobby" to spawn said unit. Kill the other guy(s). If you die, the game lobby window opens again and you can choose another unit. >That's what the demo has to offer for now It's currently hosted on a cheap server, so it might be a bit slow sometimes. If you think you've found a bug, please do let me know. Also if someone have a Mac, i'd appreciate some Safari feedback Cheers. List of known issues in addition to the listed notes above; Archer arrows sometimes stop mid-air. [Test-Fix live in demo] Rare UI bug causing stats to disapear. In-game mouse-clicks not working in Firefox. [Fixed]
  8. 4 likes
    Hello! As my profile states I am new here and rather new with Babylon.js as well. I found its ease of use and performance (over Three.js) good reasons to work on it. Currently, I have been working on a voxel game (i.e. minecraft-ish) and I have been using Three.js, as there are so many libraries already out there for voxels. On the other hand, pretty much nothing for Babylon. For this reason, I would like to fill the void and, perhaps, find someone who is interested in helping out on the quest. I started with creating a small library for creating snow (called `voxel-snow`) and called it `babylon-voxel-snow` (https://github.com/Nesh108/babylon-voxel-snow/). The idea is to make the transition from Three.js to Babylon.js as easy and as painless as possible for people (like me) who have been using it for their voxel projects. Adding the prefix `babylon-`, would make it extremely easy to find the counter part for Babylon. Here are some other voxel libraries which are currently only in Three.js: ☑ Voxel Snow (https://github.com/shama/voxel-snow) --> Babylon Voxel Snow (https://github.com/Nesh108/babylon-voxel-snow/) ☐ Minecraft skin (https://github.com/maxogden/minecraft-skin) ☑ Voxel walk (https://github.com/flyswatter/voxel-walk) --> Babylon Voxel Player (https://github.com/Nesh108/babylon-voxel-player) ☐ Voxel creature (https://github.com/substack/voxel-creature) ☐ Voxel critter (https://github.com/shama/voxel-critter) ☐ Voxel builder (https://github.com/maxogden/voxel-builder) ☐ Voxel use (https://github.com/voxel/voxel-use) ☐ Voxel mine (https://github.com/voxel/voxel-mine) ☐ Voxel carry (https://github.com/voxel/voxel-carry) ☐ Voxel chest (https://github.com/voxel/voxel-chest) ☐ Voxel inventory creative (https://github.com/voxel/voxel-inventory-creative) ☐ Voxel items (https://github.com/jeromeetienne/voxel-items) ☑ Voxel clouds (https://github.com/shama/voxel-clouds) --> Babylon Voxel Clouds (https://github.com/Nesh108/babylon-voxel-clouds) ☑ Voxel skybox --> Babylon Voxel Skybox (https://github.com/Nesh108/babylon-voxel-skybox/) As I go, I will try to slowly implement them for Babylon, so hit me up if anyone would like to help out
  9. 4 likes
    Hello community, The inspector has been updated recently. The documentation is up to date here : http://doc.babylonjs.com/overviews/using_the_debuglayer http://doc.babylonjs.com/overviews/debug_layer_features http://doc.babylonjs.com/overviews/customize_debug_layer
  10. 4 likes
    Whoever wants to give it a try: http://raananweber.com/WebVRBall/
  11. 3 likes
    Hi! My name is Andrey! I'm an experienced 2d Game Artist and Animator. I make any types of game art: characters, animations, gui, sfx, illustrations, assets and backgrounds. This reel will tell you about my abilities better than any words: My site and old portfolio. Sometimes I load assets to my gumroad. Now I'm looking for freelance and outsource work My email: to.murlyka@gmail.com My skype: murlyka.
  12. 3 likes
    You are dead right @V!nc3r . I have warned @hunts about this issue before: http://www.html5gamedevs.com/topic/29161-export-cancelled/?do=findComment&comment=167812 cheers, gryff
  13. 3 likes
    Hi and welcome from me. If you are just working with your own custom shapes then you could build the caps manually from the data you are using. When you google 'triangulation of polygons' the algorithms for concave polygons are complex and not easily read. For your data label the vertices of the shape to be extruded and split into triangles, as for example in the diagram below. You can then place the triangles 0, 1, 4 1, 3, 4, etc into the indices array NOTE order of indices consistently clockwise for all triangles and the create your own custom meshes for the caps. Example http://www.babylonjs-playground.com/#1KQZAF#1 Should you then want to you could merge the extrusion and the two caps.
  14. 3 likes
    My first attempt at a Phaser game. Works in Chrome, Opera and Firefox (although some font problem in Firefox when fullscreen). Works on iPhone and iPad, but maybe not suited for iPhone's smaller screen. Gamepad inputs not working in IE under Windows 7, but ok in Edge on Windows 10. Game website at: http://www.dirtyrottenbounders.co.uk - there's a play button at the bottom of each page to start the game (best played on a desktop/laptop in Chrome or Firefox, with a gamepad). If you want to have best times/scores saved on server, then create a username. Still very much learning about Phaser, but managed to produce something with knowledge acquired so far. Regards, Paul.
  15. 3 likes
    Hey All! Thought you guys might like too check out mini-runner a simple alternative to events and signals with an emphasis on performance. It currently forms the backbone of the messaging system in our game engine. Its working out great for things like update events, collision events etc. Great to use if you are say looping through and array and calling the same function on each object. The resulting code is cleaner than a loop whilst still keeping the performance as fast as possible. So yeah, if you are dispatching signals/events to a lot of listeners often (like everyframe often), then I would considor using this alternative. For most cases, this performace boost is not really important enough to switch from your current fave. Think of this as a nice alternative for when speed really counts! https://github.com/GoodBoyDigital/mini-runner/ Cheers!
  16. 3 likes
    I don't know if this can be useful to someone, but I put it here : https://www.nothing-is-3d.com/dl/babylonJS/KTXtextures/ This is just a test scene to see what type of texture is loaded on the hardware. [edit] weird, when I load my scene locally (with easyphp) on windows 10, I have a dxt texture ; but on my ftp it's only png which is load Where I'm wrong ? [/edit] [edit2] added a download link for sources[/edit2] [edit3] upgrade to bjs 3.0 alpha to make it works [/edit3]
  17. 3 likes
  18. 3 likes
    1. Yes, at the last minute, a file name like "myfile.jpg" will get switched to say "myfile-pvrtc.ktx" for iOS. This is happening just to the string of the file name to get. Windows would probably be "myfile-dxt.ktx". 2. Basically, this generates an upside down texture. The reason it is needed is image textures are flipped in the process of being uploaded to GPU by Engine. Compressed images cannot be modified by the cpu, so this has to be done at the conversion or baking from image file to ktx file. There is a checkbox in the PVRTexTool when encoding. I did not include pictures of it in doc to be both tool independent-ish, & they said this might be changing. Why this is done Engine, I have no clue. 3. I might have left it off the doc, but given a machine has astc & etc1, engine will decide to assign astc automatically. I did not want people to have to know all the formats & which was better, so I have engine do the deciding.
  19. 3 likes
    Hi Everyone! This is my third iteration on a browser based rogue-like. Its getting pretty close to completion and I'm looking for some feedback from fellow developers. https://justin-wang123.itch.io/rogue-fable-ii The main objective for this project was to create a game that is playable in a single hour while containing enough content and variety to make repeated playthroughs novel and enjoyable. I'm pretty heavily inspired by Dungeon Crawl Stone Soup and I consider this an attempt to capture the spirit of that game for times when I don't have 8+ hours to do a full DCSS run. Features, design decisions and some rambling: Themed Zones: The game contains a total of 7 different themed zones each with its own unique monsters, traps, environmental hazards and level generators. For each playthrough the first few dungeon levels are always the same basic zone but then in later levels 3 of these themed zones are chosen randomly. The idea here is to give the player different combinations of themed zones with each playthrough. I think that just random placement of rooms, corridors and monsters is not enough to really make each run feel different so this is my attempted solution to that problem. Character Classes: There are 6 classes which I've tried to differentiate as much as possible. With rogue-likes, classes are kind of a tricky problem in my opinion. With random loot, its possible that many of the items that you find may be useless if your abilities are really solidly defined by your class. So to try to overcome this I've borrowed some ideas from DCSS and given each class a starting book from which they learn their class specific abilities. Later in the dungeon you will find the books of other classes allowing you to multiclass to some extent if you choose. There are some inherent statistical differences between the classes but most of it is defined by their starting equipment and their starting book. In this way I'm trying to have the classes be most differentiated at the start of the game but then the way in which you develop your character is dependent on what you find later in the dungeon. Damage Model: I've continued with a fairly deterministic damage model though with the addition of random critical hits and misses thrown in a very small percent of the time. I find that random damage is just sort of noise when I play games and just makes it difficult to judge tactics while not really adding that much unpredictability. I cant really call the difference between 5,6 and 7 damage 'random'. So my solution to this was some small percent of the time there's a critical hit (x2 damage) and some small percent of the time there's a miss (0 damage). My thinking here is that this reduces noise, increases the players ability to play tactically and when the dice do fall a certain way a big effect is produced. I've thought a lot during this project about this sort of 'meaningful randomness'. The themed zones could be seen as a form of tackling this issue. I've also generally moved away from say generating 3-6 gold per level and instead just made it a constant 4 but with a 10% chance to spawn a treasure room on a level full of piles of gold. I feel like players are unlikely to notice these small fluctuations in gold per level but a room full of treasure is sure to get their attention. This sort of design is carried through a lot of the project and is something I'll likely continue thinking about in the future. Feedback: All feedback is greatly appreciated. The game is pretty close to what I'd consider 'complete' there's just some graphics missing in a few places and maybe a few balance issues here and there. I haven't really gotten to adding a lot of help text yet so one thing I'm particularly interested in is any confusion that crops up during play, anything that doesn't make sense. Obviously balance and challenge is a pretty big deal as well. I'd like at least with the easier classes for players not to just get slaughtered in the first few minutes, so I'd appreciated your experience in this. Last but not least, crashes, bugs, weird behavior, all that stuff that I'm sure keeps us all up at night. A copy paste of the browser console after a crash would be extremely helpful.
  20. 3 likes
    And now official from me Wow! You guys are ALL awesome! Thank you all for participating! That was so much fun. @jpdev, you did an amazing job. Such a great game! And as promised, this is on the way (to me first, and then to you ):
  21. This post cannot be displayed because it is in a forum which requires at least 5 posts to view.
  22. 3 likes
    This is such a sad phrase to hear spoken from someone calling themselves a developer, with that attitude you certainly won't be a developer for long. Plus, your assumption about where the issue lies is plain wrong anyway. It doesn't, this is blatantly ridiculous. Hacking something together in 48 hrs is wildly different from creating a fully functioning generic networking layer. I have no idea of the scope of whatever networking engine you guys are discussing, but creating a properly functioning and resilient networking layer is hard yacka, I'd say a few months of several full-time devs would be required to get something off the ground, although there would still be plenty of hard work to put in after this. You're either being flippant or you simply don't understand how software gets built (or, more likely, never taken much into production readiness) if you think you can just crank out a networking layer in 48 hrs and call it done. This is plain wrong in so many respects. There seems little point further explaining why, just try googling about how web sockets work (hint: transport is identical to regular web traffic, probably because only regular web traffic can occur across the public network!). Also, as nice as it would be to assume a website would have only one roundtrip, it simply does not happen any more. --- You've put yourself out here publicly and asked for a discussion, don't be so afraid of criticism, roll with it, learn from it, disagree if you like, but bear in mind that someone critiquing you here has taken time to take an interest in you and feedback is golden.
  23. 3 likes
    Hey all, it is not ideal but I would like that answered topics would be flagged as solved using tags (like this topic). To add a tag, you have to edit the first post you made to start a topic. Thanks a lot
  24. 3 likes
    SOrry to be the one that keeps saying this but we really need a doc for newcomer in doc.babylonjs.com. You can also add reference there to your great videos
  25. 3 likes
    With setEnabled you don't need to care about your children. Even if you add a new children to the parent it will be automatically disabled if the parent is disabled (even if you have several nested children). With the visibility you have to manage your children by yourself. If you add a new children you have to check if there parent is an invisible parent and adjust the visibility flag of the child.
  26. 3 likes
    Hey there, Phaser uses the browser's build-in fullscreen API that will take any given HTML element, and make it stretch to your window's size. By default, Phaser passes the canvas element to make it full screen. What you want to do is change this fullscreen target (http://phaser.io/docs/2.3.0/Phaser.ScaleManager.html#fullScreenTarget) and pass the Element that contains both your UL and your canvas like so: //html <div id='wrapper'> <ul id='userList'> <li>user1</li> <li>user2</li> </ul> <canvas id='game'> </div> //js <script type="text/javascript"> game.scale.fullScreenTarget = document.getElementById('wrapper') </script>
  27. 3 likes
    A small correction, the anchor is the registration point of the texture (i.e. which point in the texture is going to be at the sprite's exact (x, y) position.)
  28. 3 likes
    Think of the image that makes up your sprite as a rectangle. The upper-left corner is (0,0). The lower-right corner is (width - 1, height - 1). The anchor gives a position in the sprite as a percentage of both its width and its height. So an anchor of (0.5, 0.5) is the position (width * 0.5, height * 0.5) in that rectangle. Likewise, an anchor of (0.2, 1) is the position (width * 0.2, height * 1) in your sprite. Phaser uses that to position the sprite. When you set the sprite.x or sprite.y properties you are setting the position of the *anchor* of the sprite in the world. For a platformer, it makes a lot of sense to set the anchor of the player to (0.5, 1). That's the middle of the sprite in the x direction, and the bottom of the sprite in the y direction. Make sense?
  29. 2 likes
    http://www.babylonjs-playground.com/#FC4IX#25 http://www.babylonjs-playground.com/#FC4IX#26 http://www.babylonjs-playground.com/#FC4IX#27 i designed something like this for make that ground.material = new BABYLON.CustomMaterial("s12",function(b){ var name = "newname"; b.varyings = ['varying vec2 vuv;']; b.fragmentUniforms = ['uniform sampler2D tx_01;','uniform sampler2D tx_02;']; b.vertexUniforms = []; b.body = 'result = texture2D(tx_01, vuv ,0.) ;\ result.xyz = result.xyz*0.5 +texture2D(tx_02, vuv ,0.).xyz*0.5 ;\ '; b.vertexBody = ' vuv = uv; '; b.initShader(name,scene); return name ; },scene); @Dad72 i know still without shaderBuilder but wait a few hours more i am so close
  30. 2 likes
    I'll complete the last part of the code before the end of the week (hope so). Then I will write the documentation... painful work because, although the API is quite simple, there's much to explain.
  31. 2 likes
    Reallllly cool! Thank you so much @gryff https://github.com/BabylonJS/Documentation/blob/master/content/tutorials/02_Mid_Level/Multi-Platform_Compressed_Textures.md
  32. 2 likes
    Finally I can help someone Keep your jointAB in a variable so you can use it later: scene.getPhysicsEngine().removeJoint(meshA.physicsImpostor,meshB.physicsImpostor,jointAB); If you want to see my project with helicopter able to crash when forces between body elements are to high just ask me.
  33. 2 likes
    By adding a camera and a light in your scene I could export and run, and I got this : As for diffuse & ambient color I had to remove texture assignation because they weren't on the dropbox links. So I assign a simple Color Grid texture. When this done, this was the result : So, you have to give us a screenshot of your result so we can help, because your scene works ^^.
  34. 2 likes
    It was indeed the skeleton. I made a quick test with a new skeleton (using bones), and the skeleton is alligned perfectly: http://www.babylonjs-playground.com/#1N9CSW#14
  35. 2 likes
    First working port to TS and first working compiled minified version here : https://github.com/BabylonJS/Extensions/tree/master/DynamicTerrain/dist doc to come
  36. 2 likes
    Hello, As some of you may know, we have been forced to introduce a breaking change in the way to use the physics engines starting with v2.4. We try as much as possible to avoid breaking but sometimes it can help introducing a much better way to achieve something. This is the case for physics as now, the physics impostor and its associated mesh are better linked. To better understand why, extract from the doc: "The physics impostor synchronizes the physics engine's body and the connected object with each frame. That means that changing the object's position or rotation in Babylon code will also move the impostor. The impostor is also the one updating the object's position after the physics engine is finished calculating the next step". In previous implementation, we had a lot of users questions & feedback that didn't understand why moving the mesh wasn't doing anything once it was transformed into a "physic object". Please read our documentation to better understand how to use physics in Babylon.js: http://doc.babylonjs.com/overviews/using_the_physics_engine I've then updated my tutorial and the default sample of our main page: - Understanding collisions & physics by building a cool WebGL Babylon.js demo with Oimo.js: https://www.davrous.com/2014/11/18/understanding-collisions-physics-by-building-a-cool-webgl-babylon-js-demo-with-oimo-js/ - Main sample: http://www.babylonjs.com/Demos/Physics/ Thanks! David
  37. 2 likes
    Hi all, Some weeks ago i needed to make a large tiled ground, i tried the build-in createTiledGround, but at "just" 50 x 50 tiles (2500), it starts to struggle a bit, even on a rather high-end PC. http://www.babylonjs-playground.com/#1XBLWB#168 So using the SPS and a spritesheet, i created my own; It takes a second to load, but at 500 x 500 tiles, (yes, 250.000) it runs smoothly and with 59 / 60 fps on the same PC. tile indexing example, 5x5 (25) tiles; Cols_> 0 1 2 3 4 Rows_V 4 20 21 22 23 24 3 15 16 17 18 19 2 10 11 12 13 14 1 05 06 07 08 09 0 00 01 02 03 04 other important stuff should be commented in the PG. (50 x 50) http://www.babylonjs-playground.com/#1ALQPZ#4 (500 x 500) http://www.babylonjs-playground.com/#1ALQPZ#5 Feel free to use it Cheers.
  38. 2 likes
    This is a 3.0 feature. That nothing-is-3d site launches 2.5 according to the console. Might be your issue as well. DXT / S3TC is old as dirt. The patent on it expires on October 2, 2017, I would be shocked if anyone doing webgl would be running something which did not have it. Only the framework for it is implemented on 2.5. Might be your issue as well @gryff. ASTC can run laps around it, but Apple really needs to expose it before most people have the hardware to use it (A8 cores & up). I have a NVidia GTX 1050 on my desktop, and it still not supported. There is a more powerful model, but this exceeds my needs, it is really short, and requires NO additional power connections. $130. I have made the changes to handle skybox textures, but have not tested that. From a sandbox standpoint, the limits with that "crossover stuff" applied to both image & compressed textures. So if a compressed texture should work from the same place as a jpg. Null is a valid response, but I only expect it to occur on either very old phones (my Galaxy S3 has etc1), or people trying to use it with 2.5.
  39. 2 likes
    Yeah, I think I have a new best friend. It's all cool... except when the fan club gets as big as DK's fan club. Then ya need Purina Puppy Plow. heh I don't have an answer for that, Abdullah... but... I found a possible work-around. http://babylonjs-playground.azurewebsites.net/#2H9MHN#48 Way up in line 43... set impostor on ball... 0 mass so it hovers. All normal there. Down in lines 265-272 we process the "L" key. Before, we would set a NEW impostor on sphere (line 268). This time, I just set a mass on the sphere. First "L" keypress drops the ball, as one would expect. But no "applyImpulse" is seen on first "L". All further "L" keypresses work ok. hmm. Creating the impostor... inside the "L" key handler... seems to cause troubles. Possibilities: #1: CannonJS hates applyImpulse immediately after impostor setting. #2: CannonJS hates adding impostors... WITHIN a keypress handler. (still a possible 'dispose original' issue). #3: About 200 other potential causes. Hope this helps. Physics engine is sure being grumpy, huh? *nod* Let's keep experimenting. Teach us things you discover, please. thx! It helps all of us understand CannonJS third-party physics engine. (Wingnut checks the bottoms of his shoes... for some goofy reason) I accidentally started another PG series... oops. http://babylonjs-playground.azurewebsites.net/index2_5.html#DWKPV#8 Feel free to hack-up that series with demented experiments and many more saves. Sorry for the repeat PG series. The playground app assigned the new URL when I wasn't paying attention. heh
  40. 2 likes
    The docs are probably 99% complete. A few very deep PIXI.* properties seem to get lost or misplaced. You can read the inline docs in v2/src/pixi/display/DisplayObject.js#L425.
  41. 2 likes
    I work out the scale on my phones and Mac based on this. Thank you so much.
  42. 2 likes
    Hi, testers found some of our games blinking on some devices in Chrome and all of them are blinking in Android's native webview. For now it seems, that setting "preservedrawingbuffer" parameter to true solves it. When you are creating game you can do this instead of commented line (code taken from TypeScript game class derived from Phaser.Game: // init game // super(800, 600, Phaser.AUTO, "content", null /* , transparent, antialias, physicsConfig */); super({ width: 800, height: 600, renderer: Phaser.AUTO, parent: "content", transparent: false, antialias: true, physicsConfig: null, preserveDrawingBuffer: true }); @LaczkoUr @Bikas can you, please, confirm, whether it helped?
  43. 2 likes
  44. 2 likes
  45. 2 likes
    Filters are working with region on renderTexture, not the full texture, that's why mapCoord / unmapCoord is needed. Also you can't use gl_FragCoord, because it can be either framebuffer either resulting canvas, framebuffer can have different size than screen, and canvas can be flipped. mapCoord/unmapCoord and "uvs" ( vTextureCoord ) are our trade-off to use multiple filters at once and to use pool of pow2 renderTextures. The problem is, they are in pixels, so you need dimensions. coord = mapCoord(coord ) / dimensions; coord = warp( coord ); coord = unmapCoord(coord * dimensions); But you already have them! Or, you can compute them automagically: //that's better move to your filter class filter.apply = function(filterManager, input, output) { this.uniforms.dimensions[0] = input.sourceFrame.width this.uniforms.dimensions[1] = input.sourceFrame.height // draw the filter... filterManager.applyFilter(this, input, output); } https://jsfiddle.net/60e5pp8d/1/ Also, you can remove division (/dimensions) and filterArea if you take into account what filterArea is really is: filterArea[0] = output.size.width; filterArea[1] = output.size.height; filterArea[2] = input.sourceFrame.x; filterArea[3] = input.sourceFrame.y; You can calculate the real params you need in "filter.apply", and reduce our code that way it'll look better I'm very sorry that there weren't that kind shader there before, and that we have to hack that. I make a promise to fix that in my next big overhaul of filters, that'll be soon!
  46. 2 likes
    Thank you all, my new friends, I really appreciate your consideration and support!! Well, I don't know if such new mode/feature is a common need as regards gaming development, but for those users that would use BJS in a different kind of web application (for example to create a 3D user interface to navigate a virtual environment and then to show some real 360 photographic details....without mentioning augmented reality experiments....) such feature could be useful (or simply fundamental). So I think that it depends on BJS future objectives and how much universal and multi-purpose aims to become in future ...if it wants to expand its horizon or not?? I'm really interested in all your opinions about that !!!
  47. 2 likes
  48. 2 likes
    You can use services like itch.io and I think gamejolt to host your games for you (obviously anything that requires a backend will be more difficult but I dont think that applies in your case). There are loads of these such sites that just give you an area to publish your game, I think most let you try and sell your game (I'd guess they keep ad revenue and possibly a percentage, dont know). As for licensing your game, selling your game to a publisher is usually far harder. Please dont be disheartened by my following comments, finishing any game is an incredible achievement, but, finishing a game to a point where people are going to pay for it is another step up. You've done incredibly well to finish a game, but it probably needs a little more polishing before it is in a place where publishers might pay you for it, I'd say it is unlikely that publishers will ever pay for a straight snake clone. The services I mentioned earlier let you upload, so, if all you want is some coverage then that is the way to go. If you have it hosted somewhere then fire over the link, if you want better critique to learn from we really need to play your game. From your screenshots you could do with a bit of graphical help, a little bit of work on laying out and styling your UI will go a long way. Being responsive with a canvas element can be tricky, if you just want your game viewport to scale to the screen then it usually becomes easier and most 2d rendering libraries (such as Pixi, or, if you use Phaser, which is a full-blown game engine rather than just rendering) support doing this sort of thing pretty much automatically for you. But, seriously, great work on getting a game finished, its a big achievement.
  49. 2 likes
    if (!(sprite.getBounds().contains(x, y))) { // Do something } ... is probably what you're looking for. getBounds() returns a rectangle on which you can call contains() with x and y.
  50. 2 likes
    1. A few ways, but the easiest is probably: this.game.input.keyboard.addKey(Phaser.Keyboard.UP).onDown.add(function () { a(param1, param2);}, this);2. That might work how you've done it if the scope is correct - but it'd be better as: this.game.input.keyboard.addKey(Phaser.Keyboard.UP).onDown.add(YourClass.prototype.a, this);The second argument, in your case 'this', is the context in which the first argument will be called with.