Leaderboard


Popular Content

Showing content with the highest reputation on 02/13/2018 in all areas

  1. 3 points
    Pryme8

    Simple furMaterial

    Might not be what you are looking for... but then again it may be? This would be the least intensive computation method.
  2. 2 points
    This is a problem with the asset itself. The triangle winding order is wrong in the asset. glTF expects a specific triangle winding order as noted here. The reason why it worked in the stable version and doesn't work in the current version is two-fold: The current version of Babylon will now auto flip faces when there is a negative scale in the transform. The Playground scene is overwriting the scale of the root node of asset, removing the negative z-scale it had. The negative z-scale is done to convert the asset from right-handed (glTF) to left-handed (Babylon). The asset looks to be left-handed data written into a glTF. This works in the previous stable version since the engine doesn't auto flip the faces and the negative z-scale had been removed manually, so effectively the winding order changed. With the latest version, this "trick" won't work anymore. As an alternative, if you don't want to fix the asset, one way to work around this is to change the sideOrientation of the material. https://www.babylonjs-playground.com/#11BH6Z#328
  3. 1 point
    pichou

    WAZANA.IO

    Hi everybody from the html5 and babylonjs forum! This is a topic where I wanted to give you some feedback on my experience with babylonjs since I started working on it and to thank you for your help! SUMMARY : First I think your goal is fulfilled. Indeed Babylonjs is a complete Javacript framework for building 3D games and it's simple ( At least for a developer which love JS like me ). The game https://wazana.io which is now in 3D thanks to babylonjs is one proof of that. DOCUMENTATION : The way I use it is the following : when I find a babylonjs tool which I want to add in the game, I went to the 'HOW TO...' page of the tool. There I can find how I can make the tool work and apply it in my scene. Plus I can see different application of the tool. The playground examples are very very helpful as you can see immediatly the rendering. Then if needed I sometines went to the 'CLASSES' to find the function or the parameter I wanted or if I didn't use some function in the correct way or with the wrong arguments. I don't really use the other part but when you look for ideas or new way to improve your game, just surfing in the doc can give you a lot of possibilities (with the extensions for instance). PLAYGROUND : Awesome to test test and re-test before integrate. Most of the time, I start from one playground with the base code of the tool I want to test and then I make my change to see if I can obtain what I am looking for. I saw how convenient this is to allow you babylon dev to see what's wrong in our code. But this only works with small and precise issues. The bigger your project is going and the harder it will be to share a playground and find a solution. INSPECTOR : I found out about the inspector very late. I think it can be a very powerful window but I haven't really understood yet how it works. For instance I would want to see what is making the fps slow. Is it the particles, materials, number of meshes, etc? It will be great to instantly know what you can change in your code to improve the perf of your game. However I didn't find a way to have that information in the inspector. YOURFEEDBACK : I would really appreciate your feedback on the game WAZANA.IO. As an indie game developer I am always searching for player's feedback in order to get to the best experience and gameplay possible. So this topic is also the opportunity to tell me what you think about the design, the gameplay and give me improvement ideas if you have any. THANKS : A big thanks to you all who have helped me during this development of the 3D version of WAZANA.IO game. You make me gain some precious time and this is really thanks to you that I manage to be fast at deploying this new version. I explain some steps here in this article : https://blog.wazana.io/2018/01/09/how-wazana-io-has-gone-from-2d-to-3d-in-3-months-only/ FINALLY : You can imagine we are always looking for support so if you want to share, like or put me in contact with people that could be interested in the WAZANA.IO game in any way, feel free to do it! https://www.facebook.com/wazana.io/ https://twitter.com/wazana_io Sorry for my not very perfect english Cheers, PICHOU
  4. 1 point
    Deltakosh

    360 videos

    Hello team, I'm happy to announce the availability of the Video dome! It is a new utterly simple tool to display 360 videos in your scene (with support for FOV change and VR of course) Demo: https://www.babylonjs-playground.com/#1E9JQ8#7 Doc: http://doc.babylonjs.com/how_to/360videodome
  5. 1 point
    UPDATE: 24. Feb 2018 Patch 1.2.0 is live! Please click here to scroll down directly to the update comment. ORIGINAL: 30. Jan 2018 Play Link: Chase the Shadow A casual, lighthearted 1vs1 Arena Game. Play online in your browser against a friend or anyone waiting in the lobby! Play Link: Chase the Shadow Welcome to this unique little multiplayer game! Built with Phaser CE. You control a wizard with the purpose of defeating the enemy wizard (another player). You are both hiding in the shadows and can use powerful spells! Game Features: Play online 1vs1 against a friend or any person waiting in the lobby. Control a wizard & defeat the enemy wizard. You have 3 spells at your disposal: Fireball, Lightning & Blizzard. Gameplay: You can see the enemy's shadow. Predict his movement and hit him with your spells! Select the right spell for the situation. Move into the right position to aim your spells. Trick your enemy with unpredictable movements. Win by defeating the enemy before he kills you! Controls: Click your wizard to move. Click on the spell scrolls to activate a spell. Plan your next move during your enemy's turn & pay attention to his shadow! I know it can be hard to quickly jump into this game if there is nobody online to play - or no friend available to try it out. I still hope some of you can get to play a match and let me know what you think! Side Note: Why did I build this game? (Not sure if this paragraph is interesting for anyone) I've been doing a lot of client work lately and so much work had to be done on Node.JS. Yet, I always wanted to create a browser multiplayer game running on an Apache server with PHP! Thus, the motivation for "Chase the Shadow" was born. I definitely don't regret doing this in PHP but it does require a lot of thought and planning - something I could have done much better. Either way, the game is done now and I'm happy I did it! Will I do another game in PHP? Probably not for a while. I wanna stay away from multiplayer games in general for now. Credits: The game was developed solely by me. All assets in this game were either done by me or from the CCO assets linked below. These sources are also credited inside the game: UI background Author: Jetrel, https://opengameart.org/users/jetrel Download Link: https://opengameart.org/content/castle-platformer Map Tiles: Author: ansimuz, https://twitter.com/ansimuz Download Link: https://opengameart.org/content/rpg-town-pixel-art-assets Buttons: Author: Kenney, https://opengameart.org/users/kenney Download Link: https://opengameart.org/content/ui-pack Spreading the Word! If you would like to support this game, posting the link below on any of your Social Media accounts would be much much much appreciated! (If you would like to tweet it, you can mention me with @thejamespierce on Twitter.) http://browsergameshub.com/chase-the-shadow-released/ Play Link: Chase the Shadow
  6. 1 point
    Doug

    Generic platformer boilerplate

    Looks great! Thanks for sharing
  7. 1 point
    jay3sh

    Foody Avenue

    Pretty addictive! Good job. Built 3 restaurants. I think this guy got stuck (maybe a bug).
  8. 1 point
    samme

    Game list of phaser games

  9. 1 point
    Snouto

    [Solved] Skybox config issue

    Excellent that got it, thank you! I knew there was something simple I was missing
  10. 1 point
    You should try to scale your model to a 1x1x1 unit box with: mesh.normalizeToUnitCube(true)
  11. 1 point
    Wingnut

    Simple furMaterial

    I said that? And you believed me? I wouldn't trust ANYTHING I ever said... to be correct. I think @JohnK is the expert on this one, all in all.
  12. 1 point
    mattstyles

    Canvas Tilemaps - Javascript Help

    Yeah I know that feeling of being beaten down by a problem to the point where its difficult to even express it! It's usually a clue for a good nights sleep and to be tackled again when fresh!! I think I know what sort of thing you're after. How to express a tile and entity map has about as many solutions as there are developers out there! A common starting point might look the following: So, your map might be a 5x5 2d grid of locations, to simplify things lets express tile types as integers, 1 is a wall, 0 is floor and to simplify our rules even further, you can step on the floor but not on the wall: var map = [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1 ... ] var width = 5 function get (x, y) { return map[x * (y + width)] } This is a simple 1d representation of a 2d tile map with an associated getter function to convert 2d to 1d (which requires knowing the width of the grid), note that [0, 0] is top-left, x going right, y going down (yes, coordinate systems are important but we've just chosen the "easiest" representation). Now you need some sort of entity object (you might call it a class, but thats a bit ho-hum in JS): var player = { x: 1, y: 1 } You might want to add this player to an array of entities (or, even, an array of alive entities, depends what you want). This is about all your renderer needs to get rendering, throw the map array and the width and tell it to draw, then draw your entity on top in the correct location. To handle collision detection lets do something really simple, the following is semi-pseudo code: function checkMapCollision (x, y) { var target = get(x, y) return target === 0 } function handleMapCollision (entity, desired) { var isOkToMove = checkMapCollision(entity.x + desired.x, entity.y + desired.y) if (!isOkToMove) { return } entity.x += desired.x entity.y += desired.y } function onKeydown (key) { if (key === 'left') { handleMapCollision(player, {x: -1, y: 0}) } ... } Something like this would work (I've done it quickly, might have made a stupid mistake). Attach the `onKeydown` function to a keyboard (or joystick, or mouse, or touch, whatever) handler which responds to a key press event, takes the player entity and checks for a collision with the desired location, if all is ok then it updates the entity position so you either need to re-render or if you're using some sort of rendering loop then the position will update on the next render tick. This is pretty much the basis of it. Your next requirement is to check for collisions with entities, you pretty much do the same but rather than a spatial look up against a grid you'd probably want to loop over all active entities and check to see if any of them currently occupy the desired target location, if they do then run a function that handles what should happen when that collision occurs, otherwise loop through the map spatial check (above) and see if the desired target location is ok on the map or not. That really is about it, most other systems just add complexity on top of this simplistic model (obviously this is a very mature field pretty much as old as computer gaming, which isn't much younger than computing!). Some stuff you might want to look at doing: * Sometimes its easier to use [x, y] rather than `entity.x` and `entity.y` * Integers are fine for representing tiles and/or entities but you'd want another lookup table that maps that integer to an object which represents the actual object i.e. a wall object might have a flag (boolean) saying it is impassable, whereas a water tile might have a flag that states only flying, swimming or floating entities can enter it etc etc etc. * You might want to forego the integer (id) representation and just embed whole objects into your map and/or entity array but consider how distinct each element is i.e. if ALL of your walls are the same in a map and your map contains thousands of them then thats a load of memory you don't need to consume, just keep one wall object somewhere and your map array just references it. * If some of your map entities do differ from the blueprint/template for, say, a wall object, maybe you only want to store the differences. * The suggestion above notes looping over your entire entity array to find collisions, with 1000's of entities all moving this is expensive. You might want to look at techniques such as Octrees to simplify the search space (this gets technical real fast! but if you're diving in, then dive in!), if you want a warm-up maybe read up on A/B (or Black-Red trees) as Octrees are a more advanced (extra dimension/s) version, again, this gets technical real fast! I'd say its key learning for any developer! * Consider using a 2d array (or, an array or arrays) to hold your data, personally I dislike this approach but you might find it easier to use `map[0][1]` rather than using a getter. * Think about what to do when you have a collision, do you want a handler that takes the two 'things' that are colliding which decides what to do? i.e. this handler would map a collision between player and wall to a function, between player and enemy to another etc etc etc. As your list of possible colliders grows this can get tricky to manage, so maybe make it a little more interesting and physics based by considering the 'stuff' that makes up objects i.e. if 2 objects are marked as solid then they can't occupy the same space. * The above precludes entities occupying the same space, but maybe you want that. * The above also assumes only 1 single tile occupies a location, maybe you want multiple tiles on a location, so maybe each location holds an array of tiles at that location, or maybe you want a linked-list if your other dimensions are sparse? * If your map becomes an array of locations, which each hold and array of 'things' on that location, maybe you don't need the entity array anymore and they can just live in the map. In some ways this simplifies things, in other it makes things trickier. Hope that helps you get clear which way you want to implement things, I'd say that if you're not sure have a play with various techniques, personally I love playing with 2d map representations and systems, maybe you will too!
  13. 1 point
    I love the dark theme and the graphics.
  14. 1 point
    Deltakosh

    new rest pos for Skeleton

    Let's try something else Can you go through your bones and call bone.updateMatrix(yourNewBaseMatrix) ?
  15. 1 point
    enpu

    Removing Assets Question

    @Ninjadoodle Good question! Asset will stay in memory as long as there is reference to it. Changing scene will usually remove all references, so in most situations yes it will stay in memory until you leave scene. game.createScene('Main', { init: function() { this.sprite = new game.Sprite('panda.png'); this.sprite.addTo(this.stage); }, mousedown: function() { game.removeAsset('panda.png'); // panda.png would still be rendered // because there is reference to the texture at // this.sprite.texture }, mouseup: function() { this.sprite.remove(); // Remove from stage this.sprite = null; // Remove reference // This would now throw error var sprite = new game.Sprite('panda.png'); sprite.addTo(this.stage); } });
  16. 1 point
    MarianG

    [Solved] Skybox config issue

    Hi @Snouto Check your camera maxZ. If it is too small, increase it, something like this. scene.activeCamera.maxZ = 1000;
  17. 1 point
    Wingnut

    new rest pos for Skeleton

    *nod*. It might not be technically possible, though. Animations could be "accumulated" (additive?), so perhaps they need to be played-to-a-frame, and cannot jump to a frame. I think each frame is "movement since previous frame" and not "movement since beginning frame". Maybe, no jump-to-frame is possible... because of that. But, I am no expert about interpolations. I should read some docs and/or study some code... before I yap.
  18. 1 point
    Wingnut

    Change edges of decahedron

    Hiya MD! Essentially, taller? https://www.babylonjs-playground.com/#AFXASF#4 It was "a bitch" to do, and I did lots of guessing. Disable lines 34-36, and re-RUN. You can see that these darned polyhedra... are "crooked" within their boundingBoxes. So, scaling them along any "sane" axis.. is a pain. So, line 34 is Wingnut... doing trial/error... to get the mesh to be level with the camera (approximately - might need tweaking). Then, line 35... bake that rotation... weld that puppy in-place. Line 36... do some scaling on the Y-axis. I hope I was helpful. Maybe polyhedra-God @jerome will visit this thread, and we can ask him if better axial-alignment by-default...is possible. @JohnK too... these guys are hot hedra-folk! Super-Hedroids! SOME of those advanced 237-sided polyhedra are SO complicated... that it is difficult to determine "proper" orientations (where the axes should go). Pick a rotation and bake it, I suppose. Whatever LOOKS good. heh. Thank goodness for bakeCurrentTransformIntoVertices(), eh? *nod* Its 'got milk'.
  19. 1 point
    Hey, I'm searching for a team/dev/ (experimented) that need an artist for a project. You can check this webpage where i gather some sample of my school and personal projects. I've already made some small games in the past, but I would like to focus more on the art side of game creation I can do 2D/3D art and animation if needed. I'm more interested in character and props animation/modeling. If you're looking for someone feel free to contact me directly on this topic or via PM
  20. 1 point
    tomasantunes

    Game list of phaser games

    Turbo Racer http://turboracer.bitballoon.com
  21. 1 point
    jamespierce

    Game list of phaser games

    Hello fellow devs! My newest Phaser CE game is called "Chase the Shadow". Game Summary: A casual, lighthearted 1vs1 Arena Game. Play online in your browser against a friend or anyone waiting in the lobby! Forum Showcase: I've also created a separate thread with more details in the Game Showcase section of the forum: http://www.html5gamedevs.com/topic/35358-chase-the-shadow-1vs1-arena-game-multiplayer/ Game Link: Chase the Shadow Some Screenshots: Game Link: Chase the Shadow
  22. 1 point
    icebabygames

    Game list of phaser games

    I created my first platformer game using Phaser 2.9.4. Do check it out https://icebabygames.itch.io/dossier-the-ninja-mouse
  23. 1 point
  24. 1 point
    BdR

    States with Parameters?

    I read here that you can reference variables through the StateManager, something like this.game.state.states['statename'].variable, see code below // Phaser.state for level select screen mygame.LevelSelect = function(game){ this.game = game; // keep reference to main game object this._selectedLevel = 0; }; mygame.LevelSelect.prototype = { create: function(){ //etc. onLevelSelected: function() { // pass variables to 'MainGame' state this.game.state.states['MainGame']._currentLevel = this._selectedLevel; this.game.state.states['MainGame']._showTutorial = (this._selectedLevel == 1); // only show tutorial on level 1 }, //etc. }; // Phaser.state for main game loop mygame.MainGame = function(game){ this.game = game; // keep reference to main game object this._showTutorial = false; this._currentLevel = 0; }; mygame.MainGame.prototype = { create: function(){ //etc.
  25. 1 point
    Nick

    States with Parameters?

    You can pass additional parameters via game.state.start(); e.g. game.state.start('Leaderboard', true, false, customParam1, customParam2);The first two params tell Phaser whether or not to clear the game world and cache. Any params after those are custom and will be sent to your state's 'init' function if it exists. Then within your state you need to create the init function: var LeaderboardState = function() { }; LeaderboardState.prototype = { init: function(customParam1, customParam2) { }};