• Content Count

  • Joined

  • Last visited

  • Days Won


jpdev last won the day on February 26 2017

jpdev had the most liked content!


About jpdev

  • Rank
    Advanced Member
  • Birthday 02/01/1982

Profile Information

  • Gender
  • Location

Recent Profile Visitors

2744 profile views
  1. Earlier this year, I gave out pieces of paper to friends and children of friends with a jagged outline on them with the instruction to color it in and send it back to me. I received 7 colored shapes. Little did they know, that they were actually coloring Easter eggs for a little game I was making. Now, just in time for Easter it's finished and I thought I would also share it with you guys. Play it here if you like: (see below for instructions) It's written in js using only babylon.js as a library. I did the modelling and levels in blender. I hope you enjoy it, I had fun making it! Thanks to everyone making, maintaining and improving babylon.js Here are the instructions and tips for playing the game: In the main menu start by clicking on a level button. You can only go to levels that you have reached. Start with level one. As long as you hover over a level button, you can see the best time and most eggs collected for the level (only shows your scores & times). (Warning: You can only get a better time if you collect the same amount of eggs or more) cursor left = bunny hops left cursor right = bunny hops right space or cursor up = bunny jumps (press longer to go higher) cursor down = crouch and wiggle your tail tips & tricks: Jumping while crouching results in a high back flip. Jumping three times while maintaining speed results in a high forward flip. Pushing into the direction of a box while falling makes you slide along the box, you can now wall jump.
  2. I tried to integrate it, here is a link to the pr:
  3. @brianzinn You are correct, using your URL it works. An explanation why I tried to use the wrong URL: I was following this page: and it says: But has no actual URLs - so I just tried /Playground and the playground did come up. (Just not the local one.) I still consider this kind of weird behavior, and I will make a pull request for the file to link to the other file with the actual entry points. Edit: While creating the pull request I noticed, that there are acutally URLs in the, but they are in quotes - and that causes them to not be displayed on github. - So my pullrequest just fixes that. Link to PR:
  4. Hi babylonjs team, I am looking into contributing to babylonjs. So far, I have cloned the github repo and installed node & npm. I edited the ts files in question, and I can get them to compile, for example with "gulp typescript-all". But I ran into a problem trying to test my changes using "gulp run". This starts a webserver as expected: "Webserver started at http://localhost:1338", but this webserver serves a playground (http://localhost:1338/Playground) that does not use the local babylonjs: <!-- Babylon.js --> <script src=""></script> <script src="" type="text/x-draco-decoder"></script> <script src=""></script> <script src=""></script> So I can't test my changes in this playground, because they don't exist in the online files. (I got the "gulp run" command from here: ) Please let me know if I got something wrong. JP
  5. Hi @Deltakosh & @Wingnut thanks for the replys. I found this definition that matches what I experience with buttons across all software (web & desktop): (from My code from the first posting (checking the enterCount) does achieve that. If you agree that the event should fire when "Up" is fired and the cursor is still over the button, and that the enterCount check is the way to go, I'll try and create a pull request on github.
  6. The current solution for marking a thread answered is to edit the first post and add an solved tag or edit the title to "[solved] How many vertices can be imported with Babylon.js?"
  7. Hi, I am using the great babylon gui for my latest project - just some simple buttons for level select so far. I noticed that there is no event that functions exactly as a button "click" event should behave. There are up and down events, but they don't quite hit the mark for the event that should trigger when you "click" a button. Most GUI trigger a button on the "up" event, but only if the cursor is still over the element. (Try it with any button element for example in the post editor of this forum, or any windows button - if you press the mouse button down but only release after moving the mouse outside of the element, it won't trigger) So my fix so far is (pure js): button.onPointerUpObservable.add( function() { if (this.btn._enterCount === 0) { return; } //Do "click" stuff }.bind({btn: button}) ); But this accesses a private variable (_enterCount). So I think there should either be a getter function to access _enterCount or there should be a onPointerClickObservable. Any thoughts?
  8. jpdev

    Stop animation The next parameter after framerate is a boolean for loop. So it's this.player.animations.add('atk', [529, 532, 535, 538, 541], 10, false); to not have it loop.
  9. Zampano, all the tips from rich and nesh108 only cover multiplayer games where there is server that manages everything. What this means is that the Javascript Part (the Phaser Game) that is running in the browser has to connect to a program running on a server and act only as the client. (Such a connection could be made via websocket or continues http request etc.) The server controls the game and only tells the clients what to display and the clients tell the server what the player wants to do. This is much more work than a normal web single player game. There is no way to stop players in single player client side javascript games from cheating.
  10. Hi, I think the problem was that you redefine the animations every frame and phaser doesn't like this. Here is your example working: Here is the slightly changed code: I move the animation creation to playerInit (and added a single frame stand animation). Ignore the changes in preloadImageAssets, that was to fit my image files. Edit1: There is another small problem with your code, If you walk in two direction (up & right) at the same time, your code switches the animation from up to right every frame - this way the animation never advances to the next frame. You should restructure getPlayerInput() in a way that manages to only call one at the end. You could create a variable in which you set the animation name during the key checks and then at the end call play with that value. Edit2: I changed the animation settting like I suggested in Edit1.
  11. +1 Added incentive for Rich to fix it: I will get one when they don't overlap long sentences anymore
  12. The problem now is, that while the world bounds are ok, the tilemap layer (context.floorLayer) only has a width of (in my debugging sesssion) 1280 pixels, while the game (on my browser) has a width of 1920.# That's the reason it cuts of to the right. For testing after creating it I set the width to 1920 (via breakpoint + console) and everything looks fine for that session. I am not sure, why the layer is created with the wrong width - please try to add: context.floorLayer.width = game.width; after creating it, and see if this fixes anything for you.
  13. The first parameter for addTileSetImage must match the name of the tileset in the map file. Here is your example working: (I also edited the level file to not only contain green tiles - I also changed path in the main.js because my server layout isn't the same.)
  14. Hi, layerwidth/layerheight is only the visible (rendered) part of the tilemap - so that's not the way to go to size the word. Layer.resizeWorld() resizes the world to exactly the tilemap size. To make it bigger try this: var layerWidth = context.floorLayer.layer.widthInPixels; var layerHeight = context.floorLayer.layer.heightInPixels;, -layerHeight, layerWidth * 2, layerHeight * 2);
  15. Hi PRSolucoes, Easy fix - this line sets the size of your world: layer.resizeWorld(); But it resizes it to the tilemap layer, this is way the camera is "trapped" within the tilemap. Instead of using the layer to resize your world do it yourself:, -1000, 2000, 2000); The map will still start at 0,0 but the camera will be able to show the space to the left and to the top of the map. Adjust the world size as needed.