Jump to content


  • Content Count

  • Joined

  • Last visited

About jamessimo

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
    Shanghai, China

Recent Profile Visitors

1437 profile views
  1. I am making a large game world like a tile map. The issue I have is my tile map is at least 250x250 tiles (could be 500x500) so if I use var grid = { 'h' : 250, 'w' : 250 }; var tiledGround = new BABYLON.MeshBuilder.CreateTiledGround("Tiled Ground", {xmin: -1, zmin: -1, xmax: 1, zmax: 1, subdivisions: grid}, scene); It crashes Babylonjs or runs at 1FPS if I am lucky However if I use var ground = BABYLON.MeshBuilder.CreateGround("gd", {width: 8000, height: 8000, subdivsions: 250}, scene); it runs just fine, so my plan was to make a ground mesh an
  2. Cheers @samme, I think I will have to break up my monster function and break it up into chunks. Would having somthing like this be ok? init(){ loading++ setTimeout(){function(){ //Do massive task loading++; },0} setTimeout(){function(){ //Do another massive task loading++; },100} setTimeout(){function(){ //Do another! another massive task loading++; },200} } update(){ //update UI with var loading }
  3. Hi Adel, I use setPreload sprite when loading all my assets. My issue is not loading assets, its after my game has loaded everything but has a very heavy load function internally (math mathematical calculations and bitmap rendering)
  4. Hey guys, I have made a game that needs to parse and render large save files. The issue I have is that whiles the javascript in Phaser is doing its thing all I can do is show a gif spinner in html whiles the player waits for the game to load. I would like to show a progress bar, I have made a global var that basically ticks up at key intervals in the loading process. The problem is is that the number does increment however the UI in phaser does not update as well as the HTML (in html I just made a update tick and read the loadingProgress var every tick) . I have tested thi
  5. I am making a level viewer for a game using phaser, I loop through a large array representing the game grid and take the item names from the game save and place them in my phaser world in a loop. I take whatever the game name for the item is and map it to a phaser image, my issue is that I don't want to map every possible item type to an image, if phaser askes for an image that i have not loaded, can I just ignore it without the green texture being plastered over it?
  6. Hey guys, I made a game on my Macbook pro, I use scale.set() in many places and use the screens height/width to help place sprites. The problem is that my Macbook has a retina screen (which has a pixel density of 2.0). When I play my game on a non-retina (normal 1.0) screen the game is blown up to look massive. The way to fix it would be to divide any numbers I use for size/position by the pixel density. This however seems weird as I have to have this everywhere somevar * game.device.pixelRatio Is there a way to do this better?
  7. I think your player movement should be grid/tile based. So you tell the player to go forward 1 tile and the player sprite will LERP towards that sprite so you are not just setting the tile x/y I recommend this because the game will be very frustrating because the player may be 0.001 pixel too close to an explosion and will get killed, if the player moves on a grid they are either Safe or not safe.
  8. Thanks guys, the emitX/Y thing worked, also had a weird bug where I scaled the particle emitter and it caused the position to be incorrect. I am using a weapon @drhayes, Just need a cartoony muzzle flash using particles
  9. Hey guys, I have 2 questions. 1. Why can't a particle emitter follow a sprite using trackSprite? emitter.trackSprite(player, 48, 24); 2. Currently my emitter follows the parent (player) by setting the emitters position on every step as mentioned here http://www.html5gamedevs.com/topic/5549-anchor-emitter-to-sprite/ The problem is that all the particles follows my sprite after it is emitted. I have attached the exact code I used below. I don't want the emitted to share their local coordinates with the emitter after it has been fired. //Called every time my character shoot
  10. Been waiting for this for a while! Great work!
  11. Hahah thats great to hear I will push a demo up once my publisher sorts out the iOS and Android releases
  12. Thanks for the feedback! I think I may change the launguge as I think your right about people not wanting to be told what to do!
  13. Hey guys! this is the trailer for my newest game Reach for the Star! It was built using HTML5 Canvas and Javascript with the iioEngine http://iio.js.org/ I have ported it to iOS and Android however I cant share the web build until the iOS and android builds are published. Any feedback on the trailer would be awesome!
  14. So looking at your code I see that you have a global buy bool that gets set if you click the buy button, then it simply maps the buyMesh's X Y to your on mouse move X Y. This is fine inside a Babylon scene but would this not work if your buy button was made with HTML& CSS and lived outside the BABYLON Scene. var onPointerUp = function(evt) { /* THIS WOULD NEVER GET CALLED IF THE BUTTON WAS HTML */ pickResult = scene.pick(evt.clientX, evt.clientY); if (buy) { //.... } else { if (pickResult.hit) { /* THIS WOULD NEVER GET CALLED IF THE BUTTON WAS HTML */ //.... pickedMesh =
  15. Hey guys, so im building a tycoon game were you can buy furniture and place it in your house. I have implemented the drag drop system from the playground (http://www.babylonjs-playground.com) and it works for objects which have been placed on the scene. My issue is is that I now want to click a button to BUY an object (mesh) and as soon as I mouse up from the button the mesh would follow my mouse (like the drag and drop) and stop after I click again to place the object. I have tried to expand the drag drop to allow this but in its current implementation it has to have a click/pick event
  • Create New...