• Content Count

  • Joined

  • Last visited

About AndyTyurin

  • Rank

Recent Profile Visitors

1614 profile views
  1. Yes, but try to use POST with JSON and GET with queries. Hopefully it will help you, write if not.
  2. I didn't say to reach out, just it's not right, it also can be because of bad parameters which server-side can't handle or accept. Did you try to post JSON data instead of query? Did you try to use GET method?
  3. First I will focus your attention to 400, you didn't make right request to server, it's not a server-side problem. Then mean that you did a mistake on your request. Try to add onerror in your code to detect the error itself.
  4. Man, if you want to get a specific answer, show your code to us first, otherwise I can say: "just to solve it"
  5. Hi man! Pixi.js I think best player here. Phaser is a little bit overhead in my opinion. From my experience, I started to work with Pixi, but after some time, I realized that is quite old (I want to use ES7 babel by clear way, also there are a lot of stuff which is not needed to me and a lot of stuff that is needed but hard to implement with current engine), I wrote my own rendering engine from scratch, only for my purposes for one month. I can easily scale my rendering engine and I didn't have something that is not needed. Of course, this rendering engine only for my game, I didn't make it to be absolute. 1) Write by yourself or just use Pixi, it's not big overhead. 2) I have a twitch stream where I'm discussing my game development, maybe you can watch and ask appropriate questions and I will help you. 3) Depends on what do you want to use, webgl or canvas. Right now I'm working with webgl only and have good practices how to make the game by using famous libraries such as React along with server-side rendering. And also I know how to write minimal rendering engine which will work fine. I apologise that didn't answer your questions by clear way, but you need to describe your problems, otherwise answers will be abstract. Because you can use any frameworks you want, you can use OOP, functional programming, MVC or event-based model, server-side or just client-side – you know.
  6. Hi man. 1. You would like to have an opportunity sending JSON file to the server, parsing to map and using as a level of other players in your game, right? If yes, all that you need is to have node.js server (you can use any frameworks, for example Express or Koa), create REST and handle POST with your json data. Then you need to keep the data somewhere, for example you can save your json file on the server and use next time. When client will be loaded he need to get parsed JSON data (maybe it will be another json data) and generate game scene (graphics and playable content). 2. WebGL works faster, but it's quite harder to manage, if you are quite new in javascript, maybe better to use engines such as Pixi/Phaser/Three.js. WebGL is not works anywhere, only where context is available (for example not works in PS4, blocked my developers), it can be also less performant on mobile devices. Better to say usually webgl works well on webkit based modern browsers. Beside you need to have well enough math background of Linear Algebra to work with matrices and vectors (in a case if you want to write on pure webgl without libraries). At the end recently I wrote my own rendering engine on WebGL for my own game, I have a twitch where I stream my progress, there you can ask questions. If you want I can share with link.
  7. If you would like to have explosions, bright graphic or even 3D or maybe lightning and other complex things, better to use Three.js. Otherwise if it will be 2D only, you can use any engines you want, Pixi.js/Phaser almost popular.
  8. Hey man, I didn't familiar with Pixi.js a lot, but I did my own implementation of lag interpolation in my game. Maybe it will help you some how. const MAX_FPS_MS = 1000 / 60 // some class implementation below. class Renderer { _fpsThresholdInMs = MAX_FPS_MS; // 60 fps in ms ~16.66666ms _accumulator = 0; // Accumulates delta times. render() { let dt = this._timer.checkpoint(); // Will get delta between current and prev frames. this._accumulator += dt; // Add delta time to accumulator. dt = Math.max(dt, this._fpsThresholdInMs); // Set top threshold to 60 FPS. if (this._accumulator >= this._fpsThresholdInMs) { // RENDER FRAME HERE. this._accumulator -= this._fpsThresholdInMs; // Usually we have delta time equal to 16.6666ms // In a case if more, that would be lag or frame degradation. // We need to scale speed by lag to predict transformation. const dtInterpolationFactor = dt / MAX_FPS_MS; // Multiply interpolation factor for any of your game objects transformations. scene.update(dtInterpolationFactor); } // SKIP FRAME. } } I apologise for content quality, I just copied some lines from my project.
  9. AndyTyurin

    Framework or Canvas

    Try to make your first experiments in Pixi / Phaser as Ivan mentioned. You can also endeavour Canvas API where you can start to draw primitives as a first step. Next, if you feel comfortable with JS, try to create simple games like Arkanoid.
  10. I tried read it twice, but still didn't understand correctly your message. But as I understood you want to have game objects on your scene and would like to have access by reference. Maybe better to use library such as Pixi or Phaser? Otherwise it will be not easy to interact with game objects, you need manually to write logic.
  11. Some time ago I started my own twitch channel where I have been working at 2D space massive multiplayer game development. I try to utilise my roadmap task by task, telling about what I'm doing. I have using javascript, node.js and top-notch technologies such as service workers, websockets, server-side rendering, webgl and famous libraries & frameworks like React, Webpack, Koa. And finally the question, does anybody interested in watching Twitch to improve their skills in gamedev and programming based on real game projects? I'm free to welcome other developers, answer for any technical questions. For me it's basically chance to meet new developers, increase of motivation, extra opportunity to find anyone who can help me in gamedev as well. Thank you!
  12. Hi man! – You can attach addEventListener with 'resize' event to 'Window' object and handle resizing of your canvas manually when window's size changes. – You can easily scale any DIV blocks by changing 'width' and 'height' properties of the object. You can also change style of your object by javascript. Write me in a case if you need examples.
  13. Hello guys! Recently I made several updates to improve UI, beside I started to work with sprite re-sizing feature. Design still in progress, but you can already see changes.
  14. Thanks for a link, looks like it not works in my country, but I have opened through VPN. Yeah, it has basic functionality, but usage will be absolutely different, beside extra functionality around.