4 ms·
Making FPS game with Electron client and PHP server is an interesting choice of technologies to say the least.
by dfox 2y ago
Making FPS game with Electron client and PHP server is an interesting choice of technologies to say the least.
- deleted 2y ago[deleted]
- giancarlostoro 2y agoI was unphased by Electron, but PHP for Counter-Strike? I'm hoping its using regular websockets.
- cuu508 2y ago*unfazed
- hu3 2y agoYep. Server UDP: https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d0394a054ce323b9a7e07be989084/cli/server.php#L16 https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d... Client Websocket: https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d0394a054ce323b9a7e07be989084/www/assets/js/WebSocketConnector.js https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d...
- solcloud 2y agoserver is written in PHP listening on udp, for client you can use modern web browser with websocket-udp bridge (provided in repo), or use nodejs (electron), I also provide prebuild binaries for some systems on itch https://solcloud.itch.io/counter-strike-football#download https://solcloud.itch.io/counter-strike-football#download
- munk-a 2y agoPHP is a pretty strong language these days - don't knock it until you try it. There are definitely issues with getting fine grained memory control in a performant manner but for general processing it's pretty competitive.
- kak3a 2y agoDitto. Today's PHP is not your what your grandfather used to use. It's a much matured and evolving language. Python only got so popular due to Google's use and AI. It's like the new Perl.
- solcloud 2y agothank you I guess, I started with php because of rapid development and TDD, but now you can transcode php to C++ or WebAssembly pretty easily, so using vkphp or once wasm socket will be in spec than it is free easy transcode (or using Emscripten), or second option since code is quite simple it will take like barely one week to rewrite it in c++ or other languages which is my plan once the game is future complete and stable (hopefully I will not have to develop my own language :D)
- klaussilveira 2y agoPHP is _fast_. That is a pretty good reason, specially for this type of game.
- krapp 2y agoPHP is fast for rendering websites, but I doubt it's faster than any other language a game this could be implemented in. I guess if the client is Electron, they're stuck with the web stack.
- wiseowise 2y ago> I guess if the client is Electron, they're stuck with the web stack. I don’t see any correlation.