Popular Content

Showing content with the highest reputation on 11/19/2016 in all areas

  1. 2 points

    [Phaser][WIP] Basket Champs

    Hi there, here our latest game, we are finishing it, it has some bugs and still needs audio. Basically is a remake of an old flash game called World Basketball Championship. This time we wanted to develop something very simple and related to sports. . link: Basket Champs
  2. 1 point
    Some time ago, we launched what turned out to be a really popular browser game: TANX. It's an online tank battle game and it's designed to be all about instant mayhem and fun. But we always felt as though it wasn't pushing WebGL hard enough. So we've spent the last few months revamping it. Here's the result: It's now using the PBR (physically based rendering) support in PlayCanvas. The level, tanks and power ups have all been rebuilt from scratch. So, it's the same great gameplay but with fancy new graphics. Read more about it here. And if you want to play, head to: https://tanx.io Please send us your feedback and suggestions. Want to help us out? We'd really appreciate a retweet: https://twitter.com/playcanvas/status/798871630323843072 See you on the battlefield.
  3. 1 point
    Hi (for Dad72 or anyone with Castor skills) I'm using Castor for simple UI elements for my app. My UI will have a window for scene/world buttons, a window for current mesh buttons and a window for status/MI. I am having difficulty adding buttons into a window: var form = new CASTORGUI.GUIWindow("form", { x: 0, y: 0, w: 300, h: 200, overflow: "hidden" }, guiSystem); var sceneButton_toggleAxis = new CASTORGUI.GUIButton("sceneButton_toggleAxis", { x:10, y: 10, w:40, h:40, borderRadiusButton:"20px", borderButton:"8px solid gray", value:" ", backgroundImage:"./assets/icon_axis.png" }, guiSystem, toggleSceneAxis); form.add(sceneButton_toggleAxis); form.setVisible(true) When I run this it appears correct. However if I move the window to a new position there is an instance of the button in the window AND a duplicate instance of the button left behind in its original position. Both buttons appear functional. How can I avoid this duplicate button being created? Second question - is it possible to remove the title border from the window object or reposition it (e.g. to the bottom of the window). Many thanks Richard
  4. 1 point
    @getzel You right in 2 months most babylonjs will break. So its better to learn WebGL 2.0 at least you are targeting the majority of people on this planet Maybe i'm overdramatize everything a bit, at least more errors it my chrome console. http://webglreport.com/?v=2 (88 new functions implemented.) So for me WegGL is not so important, i will build small "presentations" i learn shaders http://www.babylonjs.com/cyos/ and from their, i only need some of the functions to get a website running. under 100 Lines of Code. ~2kB User input, different states between different object, physics, get your model in the engine with the right materials, - all this what babylonjs as engine has to accomplish this is a long way run. If you buy a book, or read something online from OpenGL for the PC that date 2009 its easy to transfer for WebGL1.0 for WebGL 2.0 you need a reference from 2011. But at the end its all the same, if you once got your basics. I dont know what you are playing, compare between a Game and the Sequel. And at least whats really matter is your talent. Some people shoot film on 35mm some HD both can horrible fail.
  5. 1 point

    Collision layer with P2

    i had the same issue with a game i am developping here http://asciimulation.link/zeldajs/basic so the order of layers is important, i don't know if with P2 it's the same // Order of layer in tile editor is important for collision layer1 = map.createLayer('Calque de Tile 1'); layer2 = map.createLayer('Calque 2'); layer1.resizeWorld(); map.setCollisionBetween(502, 509, true, layer2);//look at the id in tiled on the spritesheet map.setCollisionBetween(1366, 1373, true, layer2); map.setCollisionBetween(2406, 2409, true, layer2); game.world.setBounds(0, 0, 1280, 960);
  6. 1 point

    Do we have a Discord channel?

  7. 1 point

    BabylonJS EditControl

    @DigiHz Data Pivot is a good idea . Will work on it. Thanks for the nice playground example. You put in lot of work there
  8. 1 point
    @Nabroski You are right, Chrome 56 and Firefox 51, both coming in january with webgl 2 enabled. That will change the status of webgl 2 in time...
  9. 1 point

    Remove some polygons

    Hi Negrant! Um... I guess start with this thread. http://www.html5gamedevs.com/topic/26307-multimaterial-and-submeshes-docs/#comment-151141 Someone once asked "Hey, how can I remove the top of a BJS box?" "Yes, very carefully... with a chainsaw... cutting various indices" (the things that are drawn clockwise or counterCW between vertices... to make triangular faces). Finding the correct ones to cut... is the difficult part. But I managed. http://www.babylonjs-playground.com/#1KH9RY#7 Read that thread carefully. Learn about the vertexData object (one for each mesh)... and learn about its many arrays and their "format". See the blue boxes in the plotting demo from that other thread? It might help to start with that. Get those boxes activated (temporarily) on your SMALL test mesh. Now you have "vertex numbers". Now do... var myIndices = myMesh.getIndices(); Dump them to console and stare at them. Those are 3-packs of integer vertex numbers... like seen in the plotting demo - lines 52-63. Those numbers are blue box numbers. Those values dictate WHICH blue boxes are connected together with each other... to form triangular "renderable" faces. Always 3 vertices per face, so indices are always 3-vertex numbers per face. Always remove 3 values from indices... each edit (or multiple of 3). Each 3-value pack that you remove from indices... is one triangular face that won't be drawn... but you must remove the CORRECT 3-value group... or else you will screw-up the mesh shape. Fun experimenting indeed. Then... after you've removed certain values, then myMesh.setIndices(myIndices, myIndices.length); (put them back onto the mesh's vertexData object). Notice that I zeroed-out 4 indices in the #7 demo. Although it worked, I did sloppy programing, there. I should have nulled 6 indices... 2 groups of 3-packs. Important Note: Your mesh must be set updatable = true to allow after-render changes to mesh, like this. Good luck!
  10. 1 point

    How to delete diagonal movement?

    No worries, thats a good question! The conditional is a block, and that block has a parent block, which in this case is a function, the update function. Returning from anywhere inside the function will indeed stop the execution of that function, whereby control passes back to whatever called the function and your program continues, doesn't matter if thats in the parent block scope or a child block scope (in this case, the conditional block). note: There are certain cases where this won't be the case but that's a broader discussion, usually when you embed functions within other functions, which usually isn't a great idea anyway. In this case this is an implicit return because you haven't specified what the function returns, so javascript returns 'undefined', kind-of akin to null or void in other languages that require an explicit return. In your case, you only want the code for one key to be active at a time so by using 'early return' you force your function to return before the other conditions get checked, which gives you the functionality you want. Early return is a good pattern, its cleaner to write, which is the main benefit, it is also very very fractionally more performant as you perform less comparisons and evaluations.
  11. 1 point
    Sing up. We are Green. Two opposite one. It was a very easy victory
  12. 1 point
    @touslecoq - Glad you solved this, although I was hoping to assist. @Dad72 wrote a great extension, and I find it saves me loads of time and effort when I require HTML objects - and especialy when I need to quickly and easily create great looking forms for my GUIs. I rely heavily upon CastorGUI in addition to using some of the WebGL GUI extensions now available - as CastorGUI is unique in handling HTML elements. Obviously, I'm a huge fan. And I highly recomend checking out the library of GUI elements he's already built - which are entirely customizable using CSS in addition to the extension. I'm glad there's someone else out there using it, as allot of work went into creating the extension, and @Dad72 is always there to assist. Cheers, DB
  13. 1 point


    OHHH SNAP I FORGOT I made a program (well its very unfinished) that renders 3D into 2D in Babylon AND FORGOT I MADE IT THANKS
  14. 1 point
    This worked! Thank you so much!
  15. 1 point


    render your 3d models out with this method https://greyscalegorilla.com/tutorials/how-to-create-pixel-art-renders-in-cinema-4d/
  16. 1 point
    Also I removed the title border by setting the Text to " " and the heightTitle to "0px". Would be great to have more configuration over the positioning of title though. Great extension though!
  17. 1 point

    [SOLVED] Shadow map degenerates

    Are you using a directional light for shadows? If yes this could be the reason of what you're seeing: by default the directional light tries to capture all meshes which cast a shadow. This means that resolution can be reduced to allow more meshes (This is done by virtually moving the light farther than expected). You can turn this behavior off with light.autoUpdateExtends = false