C
C
cyberlain2018-02-03 23:38:46
JavaScript
cyberlain, 2018-02-03 23:38:46

How to start writing toys in js?

Please do not ban this seemingly simple question. I know Javascript poorly and apart from scripts and Ajax requests for the implementation of any interactivity on sites, I haven’t written anything else. I decided to make a simple toy like a arkanoid. First of all, of course, I looked at the implementations on codepen and jsfiddle.
1. I see what can be done both on divs, on pure js in canvas and using ready-made libraries. As I understand it, it's better on canvas, because the performance is higher. Take a ready-made library like fabricjs and learn to use it? or right from scratch learning to render buttons, interfaces on the canvas?
2. Suppose that in the future several players will play the created arkanoid. Again, how is it now customary to do it correctly? I know that on websockets. From scratch to write bicycles or take ready-made solutions?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Larin, 2018-02-03
@fanrok

I would recommend starting with tutorials on YouTube. For example, according to the arkanoid -tyts

E
Ernest Faizullin, 2018-02-04
@erniesto77

perhaps it will be useful
Mathematics for game development. What do you advise?
I’ll also add, choose a framework, for example phaser https://www.youtube.com/results?search_query=phase... or a similar framework
, everything was invented before us. If you are not a super pro in this matter, then it is better to use frameworks

X
xmoonlight, 2018-02-04
@xmoonlight

Depends on the purpose. There may be two.
1. Understand the general mechanics of games (game loop, interaction of objects, etc.).
2. Make money by selling the game that will be created in the learning process.
If item 1 - I advise Crafty.js (there is support for scenes, physics and convenient access to object properties)
If item 2 - I advise Unity.

When creating content for the web, you may need to link to other elements on your web page. Or you can implement functionality using web APIs that Unity doesn't provide by default. In both cases, you need to interact directly with the browser's JavaScript engine. Unity WebGL provides various methods for this.
(translated from the text from the Unity official documentation
page) In addition to deploying the application to different platforms, Unity provides good 3-way integration between: Javascript, C # and C ++.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question