Popular Content

Showing most liked content on 02/05/2017 in all areas

  1. 2 points

    Bjs is moving fast

  2. 1 point

    [WIP] isometric diablo style aRPG

    Latest version always here Play only with keyboard and mouse. Without a name or a proper design document i started to create an diablo clone in browser. I am working alone, i didn't use any framework but instead used scala.js which compiles to javascript. Its just a side project, working on this on weekends and nights (if i dont play something else haha ). Image assets are mostly from this guy http://opengameart.org/users/clint-bellanger Its probably not the typical html5 game Not 100% sure if i finish it (at least at some degree) but it will be for free anyway. I am planing to do a rich skill tree, no inventory, stats boost drops, skills acquired from boss enemies. The hero is a mage + necromancer. At this point its kind of playable but everything is in test state (one test enemy, one test npc, one test map ... ) let me know if you have performance problems ( if so, mention your OS and browser ) Also what do you think about the idea. Thx Viso.
  3. 1 point

    isometric rpg needs your help

    Arkona (working title) is an isometric retro rpg in a style you may remember if you played pc games in the 90s. :-) I'm looking for people who are just into this stuff. The game is in a relatively early stage and is meant as a hobby project only. I could use help with: - music/sound fx (there are none so far) - 3d artist: is toon-shaded creature animation your thing? - pixel artist: see screenshot below for reference - coder: phaser+es6+webpack, there is a lot to do (combat, inventory, pathfinding, etc.) - other: want to write conversations, design levels, etc? Get the source here: https://github.com/uzudil/arkona Thanks for considering! --U
  4. 1 point

    Helicopter game developement

    Hi, I am a beginner to Babylon.js, but I decided to create a game about helicopter and... I don't know what to add next. Here you can see the latest update: http://babylonjs-playground.azurewebsites.net/#11OMIX#23 The CONTROLS are: -Arrows to tilt the helicopter -W/A to fly up/down -S/D to turn left/right -Spacebar (press) to change perspective You can pick up the minecraft block by landing on it. Crash into buildings (yes, these big blocks). If you have any ideas how to develope this project let me know in comments. I am pretty sure I will need help with placing textures on the ribbon, it seems to be hard to do because it has the width and height equal to 0, I see just one pixel, but I want to fix it later.
  5. 1 point

    BLUR launch jam

    There's a new messaging platform where you can chat and play HTML5 games, and the BLUR team behind it wants to focus on helping indie devs showcase their games. The launch jam already started, and you can check the details on their website and in my blog post. You can win some prizes and got your games featured when the app launches in April to get some extra exposure.
  6. 1 point

    Engraver text on mesh

    Hiya K... welcome to the forum. Perhaps my friend @Temechon won't mind my intervention, here. http://www.babylonjs-playground.com/#UKFP6#3 Essentially, we start with a highly-subdivided Babylon GROUND... which is a plane with... well... lots of subdivisions. I think these are sometimes called "patch grids". In line 29, we make a ground grid... with 512 by 512 subdivisions. It is a fairly hi-rez mesh. This is needed so that our engraving has good "clarity" or "granularity". Now for all the BAD news. Nearly EVERYTHING in this playground example... had to be done "upside-down". In line 22... hemispheric lights almost ALWAYS aim straight-up... 0, 1, 0. This one aims straight down. Line 24... the groundColor, which normally is used to color the BOTTOM of hemi-lit mesh... is used to color the TOP of your engraved panel. Weird, huh? We're just getting started. Line 33... the displacement map minimum height = 0, and maximum height = -.5 ? How goofy! Line 34... AHA! There is the reason. The ground-grid needed to be inverted.... ie. flipped-over, to make the hand-writing be correctly oriented. Without flipping the ground, the hand-writing was backwards. This can likely be fixed by using a CreateGroundFromHeightMap... instead of an applyDisplacementMap. You can experiment with that, as wanted, of course. I wanted to show an example of Temechon's idea. Some might say... "Hey Wingnut... why did you bother adding a StandardMaterial and doing material settings? Why not leave it without material?" (lines 35, 38, 40). Well, line 40 is important. We are viewing the BOTTOM of the ground-grid, and we needed to give it some color/texture. Sure, we might be able to get some color with light2.diffuse = someColor3 but... I decided not to try that... yet. Remember... with light2... (the hemi).... the .groundColor is the top of the ground- grid, and the .diffuse is the bottom. (Because of the unusual -Y direction of that light) So... setting light2.diffuse might eliminate the need for having a material, and the need to set .backFaceCulling. Maybe. Lastly, this is a lighting nightmare. (a good challenge). Light0 and light1 are twin v-opposing directionals... with .intensity of 30!!! Holy crap! That will burn your retinas into french fries right now, huh? And still... our negatively-displaced engraved text "channel"... is quite dark. There's HOURS and HOURS of lighting fun to be had... trying to light that engraved text! PARTY! Don't forget THIS SECTION of our lights tutorial. It says we can have more than 4 lights on a material! All we need to do is set groundgrid.material.maxsimultaneousLights = 10; Yeah, with 10 (or more) directional lights... I think we can properly light ALL the "facets" of the engraved text "channel". Maybe. heh. FUN!! Perhaps we could fill the channel with petrol, and start it burning? Then the engraving would be well-lit, huh? Ten directional lights... grouped, and then spin the group of lights REAL sloooow... and the facets inside the text channel... should start to twinkle. (Might need to increase the .specular on all lights, and increase (high-powered-color) the .specularColor on the material itself. Did you know that the values within a BABYLON.Color3(here, here, here) don't NEED to be between 0 and 1? You can put BIG FAT numbers in there! I use blue values of 6 OFTEN! DEMENTED!!! Fun! There's definitely some possibilities for sparkle, here. Might need to change 512 to 1024... more facets to sparkle. LOVE that sparkle! Hope this helps. Holler as wanted... but have fun experimenting, first. Try modifying that playground, make some more saves, show us what you discover, if you wish. Here are some more engraving images. Good luck! What's that? You say you want another demented factoid about the upside-down ground-grid? Ok, let's add light #3... a low powered pointLight. http://www.babylonjs-playground.com/#UKFP6#4 Line 26... there it is... a point light working fine... except... umm... it MUST have a NEGATIVE Y value (-80). It is UNDER the groundgrid, yet it shines light atop it. WOW! What a "topsy-turvy" playground we have!
  7. 1 point

    Issue with resize and gravity

    Hey samme, wanted to let you know that I've been able to resolve the problem by turning off collision checking at the beginning of the resize function, and turning it back on at the beginning of the update function. I still am not exactly sure why it's necessary to mess with the collision checking, so it feels pretty hackish to me. But it works! Thank you
  8. 1 point

    Babylon Screenshot

    with this, everything goes fine, what's the difference ? can you explain? and how can I improve the resolution ? there is a way that i can change the name of the file ? instead be 'screenshot_-2-5_14-18' change to '1' ?
  9. 1 point
    Nope, I only need to create 1 BMD for all textures and draw to it once when a user selects a different texture than the one already being used. 1. A Single BMD for ALL textures: when a new texture is clicked, I don't create a new BMD, that would be wasteful. Clearing and redrawing the same BMD I used on the previous texture is far more efficient. You'll run into a memory bottleneck if you continually create new BMDs, instead clear and redraw the same BMD for every texture, whenever you need it. One BMD to rule them all! 2. Draw to the BMD only once: I think you may have missed something from my post above. There is no need to redraw the BMD for every new stroke. Once you've created that overlay, and anchored it in the exact center, all you need is to calculate the correct relative position when it is drawn to a render texture. For example: Suppose my map size is 100 x 100 and 10 x 10 pixels for each tile. The user clicks to place a texture at (45,0). This intersects two tiles: [tile #4 on X and #1 on Y] and [tile #5 on X and #1 on Y]. Both tile #4 and #5 are converted into render textures and the base texture is drawn on top of each. A BMD is then drawn to create the overlay, which is anchored at (.5,.5). The overlay is drawn on top of both render textures, but in different positions: Tile #4 is at 40,0 and Tile #5 is at 50,0 (tile anchors are 0,0) Therefore, when the BMD is rendered to the render texture (tile #4), it is rendered at: X: (45 - 40) = 5 Y: (0 - 0) = 0 So, (5,0), and this is using the simple formula (to calculate the point the user clicks relative to the tile instead of the game world). At tile #5, it is rendered at: X: (45 - 50) = -5 Y: (0 - 0) = 0 (-5,0). Ultimately, we've drawn to the BMD only once and rendered it to 2 different render textures.
  10. 1 point

    Masking certain meshes?

    http://babylonjs-playground.com/#QO7CR#12 some fun with this sample
  11. 1 point

    Masking certain meshes?

    @joshcamas @adam http://babylonjs-playground.com/#QO7CR#15 is this correct answer?
  12. 1 point
    I'm currently working on a fix for this. edit: https://github.com/BabylonJS/Babylon.js/pull/1744
  13. 1 point
    Hello! this is because the tab is completely stopped by the browser when you switch to another tab and thus, babylon.js has no time to run the required code. Here is a fix for you:http://babylonjs-playground.com/#1MZCTQ#1
  14. 1 point
    back to normal: http://doc.babylonjs.com/classes/2.5/arcrotatecamera
  15. 1 point

    How to zoom linearly ?

    You need to multiply instead of add: newZoom = oldZoom * zoomAmount;
  16. 1 point

    Dynamic lightning

    I hate to double post, but I got it working on 4.x melonJS Like I said before, I just looked at the history of the file and obviously, the init method no longer takes three parameters, it takes only one. here's the working compositor (that gives basic lighting): https://gist.github.com/ldd/d0fa1bb1fe1a3644abfdd123e0875b8b and I just had to look at the updates in this commit: https://github.com/melonjs/melonJS/commit/68b1e3a66bafa9d52e6e291ae5f94842593efe16 Be warned that there is a lot of theory to understand how to use the lighting and use better defaults (I'm just providing this for reference. The tutorial that I mentioned is awesome and will tell you what you need to update.
  17. 1 point

    Canvas2D Main Post

    Hello everybody, Some updates: Primitive Collision Manager (PCM, @ller request) The PCM is finally done! Well, first release, I've already spotted some not supported cases... Anyway, you can check a PG demonstrating the feature here: http://babylonjs-playground.com/#1PXWLR#2 (I've commented the PG for you to see how it works) Turned out that I didn't do what I wrote in the previous message, I didn't check for OOB and I've implemented a generic triangle set versus triangle set intersection algorithm right away. Basically all primitive types now create/update a Tri2DArray which contains a list of triangles describing the primitives surface. It needed to be that way because an Ellipse with a intersection of 8 is graphically not shaped like a perfect ellipse: there's not enough polygons, so I couldn't use a intersection algorithm involving a true/perfect ellipse, same goes for the Rectangle2D with round corners. So I decided to go for the most generic and accurate way. All primitive types are supported except the new WireFrame2D one. Through the PCM object you have a list of all primitives intersecting with the Canvas' border (if you activate the feature), it's useful. You also have a list of all the pair of two colliding primitives. From a given prim you have the intersectWithObservable and intersectWith properties to get notified of new/removed intersections and to access the full list of them. New Text Alignment (vertical and horizontal) and word wrapping features for Text2D (coded by @adam, I'm very thankful to him! It's good to feel less alone on this whole coding...) Basically now you can set a left/center/right text horizontal alignment and a top/center/bottom for the vertical one. If you specify a size for your Text2D primitive you can now have auto word-wrapping if the line exceed the horizontal limit. Maybe @adam could share a PG demonstrating the feature! New Primitive Type: WireFrame2D Well, I needed it to draw the debug World AABB and Cluster of the PCM, so I wrote it. The Primitive accept many WireFrameGroup2D, each one having a default color and contain a list of lines. Each stored vertex has its own color. Basically you create a WireFrameGroup2D instance then use its method to fill it with vertices. Note: it's Line List, not line strip: each line is defined by two own vertices. You can use an API to start, fill, end a LineStrip but internally it will double the vertices for everything between the first and last vertex. Right now this Primitive doesn't support any kind of intersection (point or prim-prim), I'll add an intersectionThreshold and implement the algo any time soon...It's not a priority right now... Misc things The BoundingInfo2D now support a WorldAABB with an efficient dirty/update, I obviously needed it for PCM Each Prim Instance has now a uid property which is a unique id (a GUID), I use it as a key to store the prim or prim related data into a StringDictionary, it's an efficient way to retrieve a given prim without going O(n). There's a Triangle versus Triangle intersection method in the Math2D.ts file, its implem is slow. If someone has the code for a Tri-Tri in 2D implemented using the Separating Axis Theorem (SAT) algo: I'm in ! What's next? I will update the doc in the next few days with more PG and explaining the latest implemented features. Fix the TrakNode bug reported by @royibernthal asap. Well, the highly awaited Group clipping/masking feature. I won't have time to work most of the next week, so don't expect it soon. Then I'll certainly make a break on C2D (except for bug fixing) to finally get back at the GUI coding!
  18. 1 point
    Alright, enough. I'm locking this thread. Ozdy, please leave TV alone. TV, please stop being so 'personally offended' by what was actually a quite legitimate question. Even I thought it was a fair question. - it's clear English isn't the OPs first language, it was asked as best I feel they could have. Rather than assuming it was a personal attack, you could have simply said "I target offline / non-mainstream publishers on purpose", it would have been enough.
  19. 1 point

    Simple Loading with shaderBuilder

    fire sample http://www.babylonjs-playground.com/#1JUXK5#5 http://www.babylonjs-playground.com/#1JUXK5#7 http://www.babylonjs-playground.com/#1JUXK5#10 http://www.babylonjs-playground.com/#1JUXK5#11 i think i need drink now but this is illegal in iran
  20. 1 point
  21. 1 point

    The Evolution of Phaser 3 and Lazer

    I'm not clear why porting to ES6 would require a totally different project (Lazer and Phaser are, essential, individual projects, otherwise we wouldnt be having a discussion at all right?), what language your source is written in is an implementation detail, so long as I can `import` or `require` or `define` or whatever the Phaser modules into my project with the expectation that that code will run in the supported browsers then it doesn't matter what the source looks like. You're versioning against a contract, if the api is very very similar but with a few breaking changes then thats a dead-set increment of the major, not a new project. If you then port it all to using ES6 but make no other changes then the contract remains the same. You'd probably release that after you've cracked some new features in and bump the minor, or the major if that refactor did indeed produce breaking changes to the contract. The only possible difference here would be that importing your source directly would require the consumer to run a defined list of transforms to prepare it for the browser, but any decent build tool can now support this and there is even the unofficial use of jsmain inside your package.json description to allow various tools of using your source entry point. Again, I'd say this is supplementary to any discussion of a new project, this is a new feature to let consumers produce a slightly more efficient product bundle (rather than consuming your own transpilation, they might get advantages from running that themselves) so would be a minor bump. I (wrongly) assumed Lazer would drastically change the api, hence the name change, it sounds like now that has Lazer has been used almost like a fork, and is now ready to come full circle back into the Phaser project. Sounds to me like this is a Phaser 3, with the ES6 refactor either a 3.1 (with other features, as the refactor adds no new features by itself) or a 4 if it does introduce breaking changes. I'd assume, at this stage, that a v4 would be unlikely, a refactor should not introduce breaking changes ideally.
  22. 1 point
    True Valhalla

    Greetings from Famobi

    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.