[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can someone explain how people are supposed to learn this shit

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 31
Thread images: 2

File: zz.png (72KB, 300x300px) Image search: [Google]
zz.png
72KB, 300x300px
Can someone explain how people are supposed to learn this shit when there are a shit ton of APIs, frameworks and tools based off of it that you also probably need?
Its fucking cancer I just want to make a good looking interface jesus fucking christ.
>>
>>61568769
You don't need those tools and frameworks. Just make something yourself first.
>>
>>61568855
Plus it sounds like you haven't mastered css yet if you just want to make an interface with Javascript and struggle with it.
>>
There's only one API, Mozilla MDN
There are multiple framework, but u start by the most famous, try, if they sucks for you you can try the next on the list.
It's confusing at first, because everyone is bothered about spending so much time choosing, but that's the price of competition I suppose.
>>
>>61568983
>but that's the price of competition
What exactly do you mean?
>>
>>61568855
Just don't make another framework
>>
>>61569020
How can I make a game where the logic/backend is handled by C++ and the UI/frontend is handled by JS?
>>
>>61569000
Maybe competition is not the right word. It could be "choice", or more specifically forks, different ideas, different focus. Each framework has its downside. You start using the most popular, understand it's limit, and if you like it u keep it, otherwise u look for a different experience. But that's a greedy algorithm for not wasting too much time comparing frameworks.
It's like for similar product you know, they all do the same but differently.
>>
>>61569040
With C++ binding and pure Js
>>
>>61569040
You mean, like, in a browser? Emscripten.
You mean, like, a desktop game? Electron, I guess, though personally I'd rather kill myself in that situation.
>>
>>61569172
>Electron
Ok I know about this but I don't understand how you would make it work with C++.
Like if I am making chess, I would need JS to constantly be pinging C++ with the piece positions and C++ needs to ping back if the game is over or if the king is in check or if a piece is pinned.
I don't know how to set up that interaction.

>though personally I'd rather kill myself in that situation
Explain
>>
>>61569228
If you use Electron you can mix back and front end. And since the back end is nodejs you can use wrappers for your C++ code. At the end you will write your game/criticals in C++ which you wrap so you can call them from nodejs as native code.
>>
>>61569228
Electron is pure cancer. Sure, let's just run an instance of Chrome and two instances of V8 just for our application, why the fuck not? Everyone has 32GB RAM these days anyway lol.

You'd obviously need some sort of IPC between the C++ part of your game and the web browser you're running the frontend in. I'm not sure what facilities Electron has for this. If you really want to go this route it's probably a better idea to use Qt's WebView or something similar.

For chess, all interaction is driven by the frontend anyway. Your JS would just send a message to the engine every time the user does something. The engine thinks for a while and then calls a JS callback to update the game's state.
>>
>>61569228
So you want a two-ways channels between a browser and a server? Gee, if only there was such a standardised and widely implemented protocol that would be initialized over HTTP(S), it would be great. We could even give it a nice name, such as web-sockets or something.
>>
>>61569337
You can't call it "web-sockets", you idiot. When do you think you are, the 80s? You need to make it sound more modern and hip. Why not "WebSockets"?
>>
>>61569332
I mean if you think this is stupid what suggestion do you have for making a good looking modern interface?
Can't do it in C++ or Python as far as I know. JS actually has tools to make stuff look good.
>>
>>61569383
Unless you need complex animations, client-side processing of data or store data directly in the browser (sadly even for a meager boolean javascript will be necessary), CSS is enough and has been gaining nifty features recently. If you want to structure your CSS more neatly use a preprocessor such as less, stylus or sass and distribute the compiled CSS to browsers.
>>
>>61569419
Wait, just re-read the message you replied to. Is this low-tier trolling or do you actually think you can only do good interfaces in javascript? Unless you've only ever used tk-based interfaces this is ridiculous.
>>
>>61569332
>32GB
there is no electron program in existence that can't run smoothly on 8GB. I always use VSCode and I rarely break the 4GB mark even with a dozen chrome tabs open.
>>
>>61569383
If by "JS" you mean "my web browser", sure, I guess. You can embed JS in your game using something like V8, JSC or Duktape and it won't really help you much.
What kind of game do you want to make? Most games aren't really GUI-driven.
>>
>>61569376
>WebSockets
WebSockets.io
>>
>>61569419
And I'm assuming I would just use QT to do this right?

>>61569457
No I don't want to constrict the game into a web browser. It has to be standalone and work offline. I am saying I just wanted to use html/css/js to make the visuals of the game since those look good.
But as the other anon said, it would be much simpler to just use html and css.
Right now I feel like making a fully fledged Chess application would be a good first project.

Maybe I'm thinking about this whole thing incorrectly. I don't know.

https://lichess.org/

This site is pretty much exactly what I want to do. Except that I want it to run in a standalone window without using internet, and I want to code it in C++ instead of Scala.
>>
>>61569585
If you want to go the safe route and stick to what you know (i.e. webshit), use QWebView or GtkWebView to embed a browser into your game.
If you want to be mildly hardcore, write your game's interface in Qt. Maybe look at the source code for KDE's various games, I dunno.
If you want to be fully hardcore, write your game's interface by hand. Look into immediate mode GUIs. Learn to embrace the Spartan beauty of building your game from scratch in pure C. Become enlightened.
>>
>>61569669
>If you want to be fully hardcore, write your game's interface by hand. Look into immediate mode GUIs. Learn to embrace the Spartan beauty of building your game from scratch in pure C. Become enlightened

I wasn't really aware this was an option at all but I guess I will go with this now since I feel like it actually allow to grow as a programmer.
That said I don't understand why I have to use C and not C++.
>>
guys, which is beter, react, vue, angular or ember js?
>>
>>61569713
Feel free to use whatever C++ features make your life better, just not indiscriminately or because you fell for the OOP and template memes.
>>
>>61569748
All of them are shit. Why do you ask?
>>
>>61568769
javascript fatigue is a real thing. learn only what you need, and learn how to learn fast. there is a reason why javascript jobs pay well.
>>61569774
irrelevant to his question.
>>61569748
react is the most compact, while angular is the most used. so if you want to get a job go with angular. react has jobs too but they are fewer.
the other two are memes
>>
The thing about javascript is that you dont need to be very smart, educated or tidy.

You type in some god awful code. It works and you call your self a web developer and coder.

Slap some love for technology and geek stuff in your facebook profile and there you go. Eventually add some god awful js framework that will be obsolete in six months and add that to your list of loves as well.

Drive the price of work down because theres so many of you cancerous fuck out there and continue making beautiful and exciting apps.
>>
>>61569748
Angularjs is widely used. React will prob replace it because of react native.
>>
File: gaddafi-wtf.jpg (120KB, 456x337px) Image search: [Google]
gaddafi-wtf.jpg
120KB, 456x337px
>>61568769
>>61569972
stop shilling your hipster deprecated frameworks hier. OP, go jquery/boostrap4/css3. thats all you need
Thread posts: 31
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.