que

Members
  • Content count

    8
  • Joined

  • Last visited

About que

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi chriswa, sorry for the late reply, haven't had internet for the whole weekend. I'll have to check out mrdoob's stat.js. Perhaps it's not an FPS problem after all.. But I feel like it is, especially when throwing spears.. I read that it was good to have multiple canvases. Specially if one canvas needs quicker updates than the rest. My tile canvas could probably be optimized so that I just update one "line" of tiles every time I move. And If I stand still, I should be able to not update the tile-canvas but only update the player canvas. Although I do not utilize that as of now. But perhaps later on. Where on earth are you? The site is hosted on free-tier azure in EU, so there could be some delay for you when moving. Right now I don't load any more of the map until i hit an empty tile. THis can ofc be optimized so that I load the map further away from me Yeah as you see, currently its all server side movements that the client reacts on. I will try to implement some sort of client checking wether or not it's OK to move. Yeah I thought it was a good time to try out Vue, it's probably not up to par on vue-standards. But I really like Vue, simple, powerful and not in the way(!!!) Thanks alot for your reply.
  2. Hi, I'm currently developing a Tibia-like MMO for fun on my spare time. I didn't think alot of performance as I've seen / done some stuff with babylon.js which should be much more heavy than my game with 64x64 tiles. But the game is somewhat sluggish when moving. The networking is not optimal, but that is not the issue I'm focusing on right now. I'm using 3 html canvas stacked on each other: Tile-layer, the bottom layer which displays the 64x64 tiles Player-layer, displays all charachters/NPC's Effect-layer, displays effects such as arrows moving etc. I have my drawMap() javascript function that updates the tiles on each tick. I call it like this: setTimeout(function () { requestAnimationFrame(tiles.drawMap); }, 1000 / drawMapFpsTarget); In my drawMap() I loop through the height and width of the map that is currently on the users view like this: for (var x = 0; x < numTilesWidth; x++) { for (var y = 0; y < numTilesHeight; y++) { //draw tiles. } } I don't use a spritesheet as of now. Would that improve the rendering significantly? I mean, 64x64 can't be that heavy? Or am I missing something? This is my drawImage() function, which caches the .png's function drawImage(canvasX, canvasY, url, ctx) { let existingImage = cachedImages.get(url); if (existingImage != null) { ctx.drawImage(existingImage, Math.round(canvasX), Math.round(canvasY)); } else { let img = new Image(); img.ex = canvasX; img.ey = canvasY; img.onload = function () { ctx.drawImage(img, Math.round(img.ex), Math.round(img.ey)); }; img.src = url; cachedImages.set(url, img); } } Here is a quick video, but it looks more sluggish in the video as i think the fps is quite low in the video. https://i.gyazo.com/0cba3ac12a976f5d8882365b2869c204.mp4 Here is also a link to my game: http://tilegame.azurewebsites.net/ Works better in chrome than other browsers. You need to register with a valid email and atleast 6 letter password. Then refresh the page a few times after signing in. Thanks!
  3. Answer: canvas { user-select: none; } https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
  4. Hi, this is very annoying, why is this occuring? See this vid: https://i.gyazo.com/e6b3a40f04dd00ec45fe6d7d00ed7619.mp4 Why is this happening? Thanks in advance.
  5. Oh crap, this is in the wrong forum secion. Please remove..
  6. Hi, this is very annoying, why is this occuring? See this vid: https://i.gyazo.com/e6b3a40f04dd00ec45fe6d7d00ed7619.mp4 Why is this happening? Thanks in advance.
  7. Thanks alot Wingnut! Yeah it seems like whenever radius and y is the same, it calculates 10^2 - 10^2 which is 0 and Math.sqrt(0) is not going to work for obvious reasons
  8. Hello! I'm quite new here and just getting started with Babylon JS. I'm trying to create a shape like the one below: http://www.babylonjs-playground.com/#1JEOKR#0 However, CAP_ALL doesn't seem to work? Or what am I doing wrong? Thanks in advance