Jump to content


  • 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

2943 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: http://jppresents.net/static/egghunt (see below for instructions) It's written in js using only babylon.js as a library. I did the modelling and levels i
  2. I tried to integrate it, here is a link to the pr: https://github.com/BabylonJS/Babylon.js/pull/3816
  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: https://github.com/BabylonJS/Babylon.js/tree/master/Tools/Gulp 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 readme.md 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 readme.md, but
  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="https://preview.babylo
  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 https://developer.mozilla.org/en-US/docs/Web/Events/click) 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 rele
  8. https://photonstorm.github.io/phaser-ce/Phaser.AnimationManager.html 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 play
  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: http://jppresents.net/static/examples/walk/ Here is the slightly changed code: http://jppresents.net/static/examples/walk/walk.js 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
  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: http://jppresents.net/static/examples/tilemap/ http://jppresents.net/static/examples/tilemap/main.js (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; game.world.setBounds(-layerWidth, -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: this.game.world.setBounds(-1000, -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.
  • Create New...