• Content count

  • Joined

  • Last visited

About jamessimo

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location
    Shanghai, China

Recent Profile Visitors

571 profile views
  1. Ignore missing images

    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?
  2. 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?
  3. 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.
  4. Emitter particles following parent

    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
  5. Emitter particles following parent

    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 shoots a weapon. emitter.position.x = player.position.x; emitter.position.y = player.position.y; emitter.start(true, 1000, 500, 1, true);
  6. Grid Material

    Been waiting for this for a while! Great work!
  7. Reach for the Star!

    Hahah thats great to hear I will push a demo up once my publisher sorts out the iOS and Android releases
  8. Reach for the Star!

    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!
  9. Reach for the Star!

    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!
  10. Drag and drop without clicking

    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 = pickResult.pickedMesh; if (pickedMesh.name == "buyButton") { /* THIS WOULD NEVER GET CALLED IF THE BUTTON WAS HTML */ //Place the mesh over the mouse and set BUY to TRUE } } }}So this solution is not ideal as most html5 game UI is made with either Markup or a canvas object, this implementation requires the BABYLON mouse event to be fired over a mesh (to extract the mouse coords from the event). Would it be better to ignore the onPointerUp function and some how after I click my HTML button to first create the bought object, then some how force the scene.pick(evt.clientX, evt.clientY); On the newly created object? Is this possible? or am I over thinking it? Any feedback would be appreciated!
  11. 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 on the mesh I want to move. Has any one expanded the drag drop to work with and without a click event or do I have to make a second set of functions to do this? Cheers for any help you can pass my way.
  12. convert whole scene to ToFlatShadedMesh

    Cheers, I thought of doing this but wanted to check to make sure that there wasn't an automated system to do it, am I correct in saying that setting the blender shading mode doesn't translate into your exported .babylon file?
  13. Hey guys, I have made a basic scene in blender with some lights and textures. I have set the shading to FLAT in blender however the scene in babylonjs is smooth, I know for individual meshes I can use the convertToFlatShadedMesh() function but that doesn't seem to work on a scene object. My question is, is there a way to make the whole scene use flat shading? I don't want the scene to be smooth shaded and I cant find a way to set this in the scene api.
  14. Need advice

    So that's quite a list you have made of features you will need. For any game that wants to go online multiplayer I would focus on making a core game first then look into making it online. https://github.com/huytd/agar.io-clone/wiki/Game-Architecture This is a good example of how a game and server communicate.
  15. Solar Crusaders (Performance Improvements)

    This is really rad, love what you are doing with webGL, runs like a dream.