Answer the question
In order to leave comments, you need to log in
Backend + Frontend to create a solar system?
Purpose:
Create a "solar system" in space using C ++ (i.e. calculate everything necessary), then transfer the ready-made calculations to the client to build the "system".
What for?
I thought of such a move so that the user does not have to calculate everything on the device, especially on mobile devices.
Question:
Is it possible? And How?
Knowledge:
Javscirpt (es6), html5, css3 (all sorts of gadgets, such as preprocessors and frames), and initial knowledge of nodeJs, now switched to C ++ due to urgent need.
Answer the question
In order to leave comments, you need to log in
I don't know what you want to hear. Well, let's say so. For example.
1. We write a mathematical model in C ++ that will perform all calculations, hold objects, and calculate the movement of bodies. With the help of it, we will shove all this information into JSON.
2. Apparently it is necessary that the system could give information constantly at any time. Therefore, it is either written to files, for example, at each moment of time (with a difference of a second, let's say), a JSON file is created on the server with a census of all objects. Or, a server is launched as a separate thread, which, upon HTTP request, issues JSON.
3. Having received JSON on the browser side (I don’t know how you will do it, maybe a special site or service), we parse it and draw objects in the canvas.
4. ???
5. PROFIT!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question