Answer the question
In order to leave comments, you need to log in
Is the structure and development process of a browser game correct?
In general, we are planning a small browser game with multiplayer and slu.. goodies =)
Input:
I have experience of commercial development in C#. Hence, JS in its pure form with a prototype-based style is not appealing, the TypeScript syntax is more to my liking . Well, and as an IDE, respectively, painfully familiar Visual Studio Community .
The project itself is logically divided into 3 child projects:
- the client part (most likely in the form of a single-page application) - Backbone.JS
- the server part on sockets - Node.JS
- the game client (it will be loaded by the client part, but to simplify the development process I take it out as a separate project ) - Phaser
How it works:
The user logs in to the site, and then goes to the page with the game. When authorizing, we open a socket connection, which we subsequently "pick up" in the game.
I see the project structure as follows:
Solution/
--libs/
----typings/
----node_modules/
--client/
----app/
------static/
------views/
------models/
------collections/
------app.ts
----index.html
--server/
--game/
----states/
----prefabs/
----app.ts
--client/
----app/
------modules/
--------demo-module/
----------static/
----------views/
----------models/
----------collections/
------app.ts
----index.html
Answer the question
In order to leave comments, you need to log in
1. on the server side, we make Api (for everything where web sockets are not required) + web sockets. I would advise you a compiled language if the game plans to have 100k+ (for example, the wonderful golang language)
2. Phaser is replaced with a set of js classes that work with your API
3. If you need a "fast interface" then use libcanvas + nativeJS jquery case) + learning to use open source.
4. The folder structure is not particularly important.
In general, a one-pager can be done in an evening. And we do all the animations with css or libcanvas
The structure is approximately standard, the client can be divided into modules. Phaser is not quite a professional tool, but it is possible. As for the backbone, it depends on the amount of client logic, and the planned support, and also on the size of the team. The more logic and the smaller the command, the worse BB will behave (then you need to choose a framework, Angular is not the only solution). The folder structure is not so important, correct it in the process of refactoring.
Vladimir Grabko : Phaser is not for API, but for rendering, physics, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question