• Content Count

  • Joined

  • Last visited

Everything posted by dmarques42

  1. Thanks for trying again. It was a careless mistake, one spot I missed in a Google analytics upgrade.
  2. Thanks for finding this bug. I found and fixed a bug that I am pretty sure caused this, from an upgrade in Google analytics, a spot that I missed in the upgrade. There was also a timing bug in the Facebook connection that I fixed also. I am pretty sure this is solved. Thank you.
  3. These are 6 new simple games (built with Phaser), all using the same content in different ways. Each game has 7-10 topics including history, science, literature, art. My intent is to create a framework for education use that can be loaded with student-created content -- allow students (or teachers, or anyone, really) to create a game with their own content. New content can be loaded in a few hours. The framework will be released free to the education community if it proves useful. The games are simple, can each be played in 10-15 minutes, or even less. High scorers can post their achievement to Facebook. Let me know what you think.
  4. Thank you, that is useful, though I wish I could do it dynamically -- that is, create the div and then before display in the browser, make it a sprite. Otherwise, just using Photoshop works fine. The reason for my wanting to create sprites on the fly from parameters is that I scale and change layout to suit each browser/device, and scaling of images is not quite as nice as making divs to the correct size, and changing layout (portrait/landscape) for images requires 2 images (or distortion on resizing). The reason I want them as sprites instead of just divs is that I typically use these for backgrounds of interactive objects, and I can't push a div behind anything else on the canvas, and can't pass mouse/touch events through the div.
  5. Thank you for the explanation, I thought that was the case. I was more hoping for a way to put CSS styling (or like it) on a sprite, eg rounded corners and dashed border on a rectangle.
  6. Sorry I wasn't clear. I can position the floating div over the game, no problem there. But there are 2 problems: I can not put it between other elements (eg, under a button) and any other object in the same space does not get events, as you say, even if the div is transparent. That is a problem for me. I can process mouse/touch events for the floating div, but then that processing is different from the event handling of the sprites, though I can get that to work, of course. What I would like is to either make the floating div behave as a sprite (insert in z-position relative to other objects either based on order of build or based on bringToTop(), and use the Phaser drag&drop mechanisms) or apply css style (eg, border) to geometry objects. Another option for some situations would be a mechanism to pass through mouse/touch events to objects under, but Phaser (or canvas) does not appear to have a mechanism to do this. But that wouldn't work for what I need in this instance. The biggest problem is the z-plane, getting a floating div behind a button or other object. That doesn't seem to be possible.
  7. I am a recent (about 4 months) user of Phaser, and have successfully built 4 games, not too complex. I have been struggling with putting up geometrical objects without making an image and loading that. The easiest way (that I know) to dynamically create the geometries I want (eg, rounded rectangle with dashed border) is a div with CSS styling specifying the border and position. This works from inside the javascript code fine, but then I cannot specify the Z-plane (to make it appear at all I need to do position:absolute and then it is always on top, and buttons beneath it do not get touch/click events) and I cannot enable drag. Is there a good solution for this within a Phaser game? If I can get this mix of CSS styling and sprites to work, there are a lot of things I could do with them. The attempt: objBack = document.createElement("div"); objBack.setAttribute("id", "objectBackground"); var xoff = WIDTH/2-obhalfx var yoff = HEIGHT-butLoc objBack.setAttribute("style", "position:absolute;float:center;left:"+xoff+"px;top:"+yoff+"px;color=#77ccff;width:800px;height:200px;border-radius: 5px 5px 5px 5px;-moz-border-radius: 5px 5px 5px 5px;-webkit-border-radius: 5px 5px 5px 5px;border: 2px dashed #8a888a;") var gameDiv = document.getElementById("game"); gameDiv.appendChild(objBack);