Rex Rhino

  • Content Count

  • Joined

  • Last visited

About Rex Rhino

  • Rank

Profile Information

  • Gender
  • Location
    Toronto, Canada
  1. I don't know if that fixed was merged in or not, but I am using the latest dev version of pixi, with the latest version of cocoonjs, and I am able to use xml bitmap fonts without any issues. I have not made any fixes or changes or workarounds, it just seems to work OK now. My guess is that Ludei have fixed the problem on their end. Edit: Oops, this is an old thread, and I wasn't paying attention close enough when I received this in my email... it works with pixi and cocoonjs, but I haven't yet tested with phaser. I apologize for posting erroneous information. Sorry guys!
  2. You create a 'model' for the dungeon (most likely a javascript object containing a two dimensional array of integer values, with each integer representing a specific tile type). You model wouldn't contain any display logic, it would simply be a representation of your dungeon. This object would also contain a method that would populate the arrays with dungeon data using whatever algorithm you see fit. Then, you create a 'view' that renders your model (by iterating through your model array, and drawing a tile for each location in the array). So, it would look at location 0x0, see that it contains the integer 5 (which might be rock), it would look up the integer '5' in either some sort of array lookup table, or a switch statement, and find the image of a rock defined there, and then draw it. Is that what you are asking?
  3. I have to agree with plicatabu ... Asking this question in an HTML5 forums, you know what the answer is going to be already. Maybe a better question would be "Why have you chosen HTML5 over Unity?". For myself, there are several reasons: 1. HTML5 is a marketable skill outside game making. My day job is senior UI developer - Which means I make a pretty good living doing non-game HTML5 development. My game development hobby helps make be better in my day job, and my day job makes me better at my game development hobby. 2. HTML5 is an open technology, not owned by any one company. It makes me nervous to invest too much time and effort into a technology entirely owned by a company which may go out of business, make decisions about the technology that I don't like, etc. 3. Unity is highly integrated with their 3D editing environment. I come from a programming background, so the the whole interface is a bit alien to me... it is probably a fantastic interface for someone who is coming from Flash, or a 3D modelling background... but I like to build everything from code. I just can wrap my head around the work environment. That being said, Unity has been used to make some fantastic games, the company behind Unity seems like good people. Unity isn't necessarily a bad option, it is really a matter of preference.
  4. Can you post some of the code where you are multiplying the delta time?
  5. You need to make your calculations based on the delta, even if requestAnimationFrame will most likely be ~60fps, because not ALL devices are 60fps. And in the future, when all devices are 120hz, people might still be playing your game! The logic for frame limiting in requestAnimationFrame is as simple as this: elapsedTimeSinceUpdate = elapsedTimeSinceUpdate + deltaTime; // add the time since last refresh to the elapsed time since the last updateif (elapsedTimeSinceUpdate > 16.6666666) { //60fps = ~16.666666 milisecs update(elapsedTimeSinceUpdate); //update logic is called here elapsedTimeSinceUpdate = 0; // reset the time because we are calling the logic}render(deltaTime); // call the render code every frameYou will still need to use the delta/elapsedTime in your render/update calculations, because while this code guarantees that update will not be called faster than 60fps, it could be slower than 60fps. Yeah, I guess that I am a little bit guilty of using hyperbole when saying never, never, never use setTimeout... But from what I understand about the question, I would say in this case it isn't a good idea. In fact, if he is using node-webkit, he could even use something like workers:
  6. I base mine entirely on delta time, and I have no problems with it. As long as your update requires less time than the requestAnimationFrame interval it should work fine. I would recommend using delta in most cases. But, if like you say, you don't want a variable update loop, I would still keep track of delta time, and I would sum it until you reach your desired minimum time step and then update (for example, you would update your game world only if more than 1/60th of a second has passed... essentially limiting it to 60 fps or fewer). I would never, ever, use setTimeout if requestAnimationFrame is available.
  7. GregP: Would you mind including an example font JSON that you are using? I am having trouble with the code, and want to see if I am converting the JSON incorrectly.
  8. GregP, that is really cool! I am hoping to test this later today!
  9. Thanks for your help Benny! I am using the dev version of Phaser, which has a different version of PIXI, so it doesn't map perfectly to your functions, but hopefully I can figure it out.
  10. Hey all, Right now, Ludei Cocoonjs doesn't load and parse XML files... Which means that we can't load bitmap font data. I am wondering if anyone else has figured out a workaround to this issue?
  11. I am wondering if/how it is possible to scale the stage, in order to get a zoom effect on the game world. I have tried a whole slew of things, I have looked over the source code, but I still can't figure it out. Any help would be greatly appreciated!
  12. I am trying to do something similar to this... In this example, how would you scale the Stage in which everything lives? Thanks for your help!
  13. Sorry for not updating this in a while. Ludei replied to me almost immediately, but I have been so busy I haven't had time to post their response until now:
  14. Cool game! I purchased the HD version of the game for my iPad. It seemed to run as fast and smooth as any other iPad game I have played. Can you give us more details on the sorts of performance problems you experienced?
  15. There is a workaround on this thread: It doesn't address the canvas rendering error... But when using the webgl rendering, they suggest making the canvas the size of the innerWidth and innerHeight of the window, then making the stuff you want to draw a child of an element that is scaled to the quotient of the window dimension divided by the desired resolution. From their example: scaler.scale.x = window.innerWidth / appWidth;scaler.scale.y = window.innerHeight / appHeight;They are using Pixi, and not Phaser... but I will rewrite it with Phaser and post the source code and my results.