jamessimo

Members
  • Content Count

    47
  • Joined

  • Last visited

About jamessimo

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.jamessimo.com
  • Twitter
    @james_simo

Profile Information

  • Gender
    Male
  • Location
    Shanghai, China

Recent Profile Visitors

790 profile views
  1. jamessimo

    In-game loading bar

    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 }
  2. jamessimo

    In-game loading bar

    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)
  3. jamessimo

    In-game loading bar

    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 this using debug.text, html span and a phaser ext object. My entire game just locks up when processing stuff but I would like a hook that could be independent and update a number at core intervals.
  4. jamessimo

    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?
  5. 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?
  6. 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.
  7. jamessimo

    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
  8. jamessimo

    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);
  9. jamessimo

    Grid Material

    Been waiting for this for a while! Great work!
  10. jamessimo

    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
  11. jamessimo

    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!
  12. jamessimo

    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!
  13. jamessimo

    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!
  14. 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.
  15. jamessimo

    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?