Will

Members
  • Content Count

    51
  • Joined

  • Last visited

About Will

  • Rank
    Advanced Member
  • Birthday 04/08/1999

Contact Methods

  • Website URL
    http://willhuxtable.com
  • Twitter
    HuckleberryWill

Profile Information

  • Gender
    Male
  • Location
    England.
  • Interests
    Code!
  1. There isn't really a perfect method. Yes, you could indeed obfuscate it, but that wouldn't deter someone determined enough.
  2. Hardly. HTML5 is powerful - it would not be safe if just any JavaScript from any file sitting on your drive could be ran. Hence you have to start a local web server.
  3. I recently bought a monitor desk mount arm - this one - and set up one of my monitors with it. I flipped it so that it was portrait, and it was so much better! Web pages look a lot better, and I can see about 150 lines of code without scrolling. By far the best thing is that I can also see all of the Google Search results without scrolling. What about you guys? What monitor set up do you have? Pictures would be nice.
  4. +1 Digital Ocean is very good. They also have a lot of tutorials on getting set up with things, setting up the nginx server, etc.
  5. Certainly does help! Thanks a bunch, I understand things a bit better now, though I will give those articles a more thorough read through when I'm less tired.
  6. Thanks for that! The FPS dip does still happen - though I know it is when the leftover time in the buffer gets to the point where the while loop runs twice - though it also happens less often. Can you recommend anything for learning how to keep the garbage collector happy? Yeah, I was just doing that so I can refer to the delta time as "dt" instead of core.time.delta. It's no big deal. With Pixi, you have to write all the loop stuff, it doesn't appear to matter how, as long as core.renderer.render(core.stage);gets called to render all the stuff.
  7. Node Webkit, happens in Chrome too. Though, I think I might have fixed it now! core.logic = (function(){ var logic = {}; var target = 1000 / 60; logic.leftOver = 0; logic.buffer = 0; logic.tick = function(dt){ core.time.tick();//Update the delta time. requestAnimationFrame(function(){ core.logic.tick(core.time.delta); }); if(1 / (core.time.delta / 1000) < 30){ console.warn("FPS DIP! " + 1 / (core.time.delta / 1000) + " " + Date() + " " + logic.buffer + " " + core.time.delta) } logic.buffer += dt; while(logic.buffer >= target){ logic.update(dt / 1000); logic.buffer -= target; } core.render(); }; logic.update = function(dt){ //core.square.rotation += 0.01; if(core.square.x < 1240){ core.square.x += 1; } else{ core.square.x = 0; } }; logic.lerp = function(a, b, x){ return a + x * (b - a); }; return logic;})();However, the framerate goes down a fair bit when the buffer gets to the point of having to update twice, though only every couple of minutes, also barely noticeable as it goes right up again. The motion of the square is silky smooth!
  8. core.logic = (function(){ var logic = {}; var target = 1000 / 60; logic.leftOver = 0; logic.buffer = 0; logic.tick = function(dt){ core.time.tick();//Update the delta time. requestAnimationFrame(function(){ core.logic.tick(core.time.delta); }); logic.buffer += dt; if(logic.buffer >= target){ logic.update(dt / 1000); logic.buffer = 0; } core.render(); }; logic.update = function(dt){ core.square.x += 75 * dt; }; logic.lerp = function(a, b, x){ return a + x * (b - a); }; return logic;})();It doesn't jitter by very much (at all), and perhaps animation would make it barely noticeable, but it annoys the hell out of me. (Though, my 11 year old brother noticed it without me pointing it out, so I do need to fix it really.)
  9. Thanks, I have seen that before, but never really knew why. Care to enlighten me? Thanks, that works! But, the jittering occurs as soon as I start multiplying values by delta time. I know how to lerp, but what values should I lerp? And by how much?
  10. Okay, though seeing as I use requestAnimationFrame anyway for the render loop, and very very few people have 120hz monitors, then surely it would be limited to 60fps or lower either way? I would prefer it to be a constant value. I'm using node-webkit, so I guess the window blurring would be less likely to occur. Is it not possible to "smooth" the update? With setTimeout, there still appears to be small variations in the update speed (not my PC, it is fast ), resulting in a tiny jittering effect by the time rendering happens.
  11. Hey there, I searched about and couldn't find much about this, so here I am. With Pixi, how do you guys write your timestep (in specific the update/logic and physics part of it)? Any advice? I would prefer not to have a variable update loop, though of course I use requestAnimationFrame for the render loop. setTimeout seems to sometimes jump a bit, and isn't very smooth. Same thing if I multiply values by the delta time.
  12. Ok, just making a new post so I can mark it as the answer. When loading a tilemap from a CSV, phaser doesn't like having commas on the end of the line. So 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, Would throw an error, but 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1Would not.
  13. Hey there Been having some trouble with Phaser and rendering CSV tilemaps. I have basically copied the code from the CSV example, in an attempt to get CSV rendering to actually work. Things work (kinda) well when the tile size is 32x32, if I change the tile size to 16x16 as soon as the game loads I get a "Cannot read property 2 of undefined" from line 50,363. I'm using Phaser 2.0.2. Also, the same problem happens when I scroll the camera to the far right of the map, same error thrown, even with tile size 32x32. My tilemaps look like this - 0, 1, 1, 1, 1, 1, 0,1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1But a whole lot bigger. Only contains zeros and ones, though the tileset has 4 tiles in it. EDIT: Just tried Phaser 2.0.3, get the same error. EDIT2: I recoded most of it, hadn't done a lot. It then accepted 16x16 tiles fine, still threw the error when I scrolled right. Decided to use the assets from the example, and it all worked fine! Not sure why, but I'm gonna have a mess with my assets until this works... Is there an exact specification to what they have to be like?
  14. How would one use a canvas as a sprite texture?