Most active commenters
  • solcloud(16)
  • (4)
  • modeless(3)

217 points solcloud | 69 comments | | HN request time: 1.956s | source | bottom
1. josephcsible ◴[] No.41916141[source]
Can you add a license file?
replies(1): >>41916703 #
2. dfox ◴[] No.41916309[source]
Making FPS game with Electron client and PHP server is an interesting choice of technologies to say the least.
replies(5): >>41916324 #>>41916332 #>>41916425 #>>41916828 #>>41919033 #
3. ◴[] No.41916324[source]
4. diggan ◴[] No.41916327[source]
The GitHub languages thing shows it's 82% PHP, 15% JS and some sprinkles with HTML/CSS. But what is the actual client made with? Is it in a different repository? Or is it all implemented in PHP? Impressive if so.

> This is low violence game

I love this description for a game that is all about shooting others in face, planting/defusing bombs and trying to survive while being shot at.

As a side-note, has the OP ever seen a football field? :) Seems to have a bunch of crosses and other out-of-place lines, but I guess the football isn't the focus so probably matters the least :)

replies(4): >>41916385 #>>41916519 #>>41916912 #>>41917855 #
5. giancarlostoro ◴[] No.41916332[source]
I was unphased by Electron, but PHP for Counter-Strike? I'm hoping its using regular websockets.
replies(3): >>41916641 #>>41916696 #>>41916859 #
6. dietr1ch ◴[] No.41916385[source]
Well, no one says you need to shoot, maybe you can go the charisma route and convince the terrorists not to get the bomb down.
replies(3): >>41916989 #>>41917320 #>>41917724 #
7. munk-a ◴[] No.41916425[source]
PHP 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.

replies(1): >>41917021 #
8. evanwalsh ◴[] No.41916519[source]
You can see the client code in `www`: https://github.com/solcloud/Counter-Strike/tree/master/www

The client is a lot of JavaScript (with graphics via Three.js)

replies(1): >>41916938 #
9. camtarn ◴[] No.41916589[source]
Having Counterstrike in the name of the repo and title of the game might not be the best idea, as it's a trademark.

It's also ... not an awful lot like CS at the moment. Mostly the size and complexity of the map.

replies(2): >>41916663 #>>41917008 #
10. cuu508 ◴[] No.41916641{3}[source]
*unfazed
11. ◴[] No.41916663[source]
12. hu3 ◴[] No.41916696{3}[source]
Yep.

Server UDP:

https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d...

Client Websocket:

https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d...

13. solcloud ◴[] No.41916703[source]
I guess I can, but I am not a lawyer and I don't really want to go on date with Gaben and his lawyers (date with Gabe, gooseman and Jess is ok for me), but if you have any suggestions please share
replies(4): >>41916709 #>>41916908 #>>41917805 #>>41918333 #
14. solcloud ◴[] No.41916709{3}[source]
source code is all written from scratch and it is free for anybody
replies(3): >>41916909 #>>41917062 #>>41917184 #
15. therein ◴[] No.41916788[source]
You would think it would run in browser. Why are the clients packaged electron applications?
replies(1): >>41917051 #
16. solcloud ◴[] No.41916828[source]
thank 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)
17. solcloud ◴[] No.41916859{3}[source]
server 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
18. cAtte_ ◴[] No.41916908{3}[source]
even if you were infringing on Valve's copyrights (which you probably aren't, you're just using one of their trademarks), licensing your project or not wouldn't change that at all. but more importantly, by not including a license file in your repository, you are asking everyone to assume that your project is not licensed, therefore all rights are reserved, therefore it's not actually open-source (a comment on HN is sadly not enough): https://docs.github.com/en/repositories/managing-your-reposi....
19. JTyQZSnP3cQGa8B ◴[] No.41916909{4}[source]
That’s not a valid license. Without a file or statement in the repository, I guess it’s a proprietary piece of software that people cannot legally fork.
replies(1): >>41920151 #
20. solcloud ◴[] No.41916912[source]
yes that is correct, all code is in this monorepo, yeah I get little hyped with that animal destroying description :D for that sidenote crosses - love your note - my sense of humor is kinda weird I guess or maybe because I grow up in Europe while watching America movies with football players wearing helmets idk :D

on more humor side there is also php cli interface (https://github.com/solcloud/Counter-Strike/blob/master/cli/c...), but unless you have fancy matrix like font in your terminal emulator you probably do not see woman in red dress laying on pitch :)

21. solcloud ◴[] No.41916938{3}[source]
yes, client code is JavaScript using Three.js (https://threejs.org/) library, but since server and client is decoupled, client code can be implemented using anything, there is also php cli interactive interface, but most users prefer javascript one which is currently only one with real gui
22. rzzzt ◴[] No.41916989{3}[source]
Negotiator selected!
replies(1): >>41917097 #
23. solcloud ◴[] No.41917008[source]
maybe like a said I am not lawyer, I am just a peaceful person :)

for audio/visuals the game is currently pretty basic because I am not wearing all the game development hats, and 3D graphics/audio/animation is not my favorite things (but PR queue is open if anybody is interested), but it can be scaled to more complex map, I actually convert old "real" dust2 map to this game a _year_ ago and record video of playing it https://www.youtube.com/watch?v=aIBVGZanVvU

24. kak3a ◴[] No.41917021{3}[source]
Ditto. 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.
25. solcloud ◴[] No.41917051[source]
actually game can be run using any modern web browser with websocket (without needing to use electron), I just provide electron as it have better performance (nodejs supports udp so no websocket bridge is needed) and key shortcut like Ctrl-W do not close tab instead you move forward while crouching :)
replies(1): >>41918078 #
26. sqeaky ◴[] No.41917062{4}[source]
So this code is free!?

So I can take it and reuse it exactly as is and claim it's my own and sell it on Steam for $60 a pop?

So I can take it and use your name that is surely somewhere in the code and fill it with swastikas and hate speech and say that this represents your views?

Or more reasonably since I don't see a license this is copy written reserving All Rights and anything said here is just a trap you're just waiting for me to do something cool with it then hit me with a lawsuit and take my money, right?

But more seriously head over to the open source initiative read up on a couple of licenses and pick one. Almost any license will prevent people from using your name but let other people use the code if that's a thing you want.

If you just want to protect your name and let people use the code for whatever even making money consider an MIT or BSD Style license.

If you want (to protect your name and for) other people to be able to use the code but need to share their changes consider a GPL style license. This will complicate other people making money but doesn't strictly prohibit it.

If you don't want (the previous stuff and for) other people to be able to prevent people from selling it you might want to use something like a Creative Commons non-commercial license, I won't be perfect but there are flowcharts you can follow to figure out which license works for you.

replies(2): >>41917341 #>>41919667 #
27. solcloud ◴[] No.41917097{4}[source]
unfortunetely voice chat is currently not supported :D
28. kurisufag ◴[] No.41917184{4}[source]
this may be what you're looking for

http://www.wtfpl.net/about/

replies(1): >>41917625 #
29. peppertree ◴[] No.41917190[source]
FYI client side is under www/assets. https://github.com/solcloud/Counter-Strike/tree/master/www/a...

There are no dependencies besides threejs. No typescript or build pipeline. Actually fun to just read the code.

replies(1): >>41917469 #
30. bilekas ◴[] No.41917247[source]
This is wild... PHP server with electron client.. I'm genuinely impressed. It's been many years since I worked with PHP. Back in the days before proper namespaces etc. This just blows my mind. What an incredible effort, I will definitely be helping with this project in my free time. We need more crazy projects like this!
replies(3): >>41917616 #>>41917775 #>>41920240 #
31. swyx ◴[] No.41917320{3}[source]
ah, talk-no-jutsu, the most powerful weapon in a main character arsenal.
32. airstrike ◴[] No.41917341{5}[source]
> So I can take it and use your name that is surely somewhere in the code and fill it with swastikas and hate speech and say that this represents your views?

That has nothing to do with the game being free. If you dedicate source code to public domain and someone slaps swastikas on it, it doesn't represent OP's views all of a sudden

33. solcloud ◴[] No.41917469[source]
thank you, yes like you said all client-side dependencies are "bundled" inside repository, for reading client code start.js is good starting point (https://github.com/solcloud/Counter-Strike/blob/master/www/a...), for server side starting point is server.php (https://github.com/solcloud/Counter-Strike/blob/master/cli/s...)
34. doctorpangloss ◴[] No.41917616[source]
“Make games that are fun to make.”
35. wyldfire ◴[] No.41917625{5}[source]
Don't use that license, use something similar like MIT, BSD or Apache instead.
replies(2): >>41917987 #>>41918264 #
36. no_wizard ◴[] No.41917724{3}[source]
Its like a pacifist run in the old Fallout games
37. solcloud ◴[] No.41917775[source]
thank you for kind words :)
38. fragmede ◴[] No.41917805{3}[source]
Please do. This is your code so you get to decide exactly how free you want it to be, but without a license, it's "source available" which means that people can't do more than look at it and say "that's nice". If you want to let other people actually do something with it, then it needs a license. I can't decide for you which one to choose, but MIT is popular, let's other people take your code as long as they say where it came from. For web projects that you want to remain free, AGPL is a license that says you can use this code, but any changes you make to it also have to be free. It's a tricky topic that this comment is far too short to cover, but it's worth a hour or two of your time to consider as what you think of as okay to with your source won't align with what everyone else might consider to do with your source.
39. wormlord ◴[] No.41917810[source]
Open-sourcing this is awesome! What a great jumping off point for people wanting to do 3D game dev.
replies(1): >>41918612 #
40. ◴[] No.41917855[source]
41. NoboruWataya ◴[] No.41917982[source]
Very cool. As an aside, it (the screenshot at least) reminds me a lot of "Extreme Paintbrawl", a game released for PC in the 90s. I used to love playing it when I was a kid. Some years later I found out that it is "considered to be one of the worst video games ever made". :D

https://en.wikipedia.org/wiki/Extreme_PaintBrawl

replies(1): >>41918512 #
42. kurisufag ◴[] No.41917987{6}[source]
would you mind pointing out why?

those are very dissimilar licenses in the sense that wtfpl is basically a cute way of putting something into the public domain, while MIT et. al. do actually have (albeit minor and reasonable) restrictions on the conduct of people using the code.

replies(2): >>41918662 #>>41919459 #
43. modeless ◴[] No.41918003[source]
The client runs in Electron, but there is no web version? Why not?
replies(1): >>41918471 #
44. modeless ◴[] No.41918078{3}[source]
Ctrl-W is fixed in fullscreen, and WebRTC DataChannel provides UDP (both client-server and peer-to-peer). Check my port of Quake III: https://github.com/jdarpinian/ioq3, you can test UDP multiplayer and Ctrl-W live in your browser here: https://thelongestyard.link/
replies(1): >>41918696 #
45. dokyun ◴[] No.41918264{6}[source]
WTFPL is a fine license. It's even FSF approved.
replies(1): >>41918502 #
46. soufron ◴[] No.41918333{3}[source]
If you need some pro bono legal help for choosing your license and avoisine trouble, just contact me :)
replies(1): >>41919476 #
47. beepbooptheory ◴[] No.41918471[source]
Just run `python -m http.server 4000` inside the www directory! Seems to be working for me.
replies(1): >>41918499 #
48. modeless ◴[] No.41918499{3}[source]
There should be a hosted demo at least. The web's big advantage is instant distribution with no installation on any platform. I think it's a shame to build using web tech and then throw away your biggest advantage by requiring platform-specific local installation.
replies(1): >>41918580 #
49. josephcsible ◴[] No.41918502{7}[source]
The FSF certifies that it's a free software license that's compatible with the GPL, but they recommend against using it: https://www.gnu.org/licenses/license-list.en.html#WTFPL
50. solcloud ◴[] No.41918512[source]
thank you! very cool, love is specific thing indeed, well we can always brawl for that rank one spot :D
51. solcloud ◴[] No.41918580{4}[source]
there is indeed a web version like others mentions, I also provided a prebuild binaries for lots of os/arch at https://solcloud.itch.io/counter-strike-football (and anybody can open PR for more), for hosted webpage demo I can for sure hosted somewhere on public internet as can anybody else, so I will leave that as a optional exercise for a reader to host community server :)

I think most users will build from source or use provided pre-build binaries

52. solcloud ◴[] No.41918612[source]
thank you!
53. poizan42 ◴[] No.41918662{7}[source]
There is no disclaimer of liability and implied warranty. You may be on the hook for damages if someone uses your code under the WTFPL and there is a bug that causes them to lose money.
54. solcloud ◴[] No.41918696{4}[source]
I am fox on fire so Ctrl-W is tab close for me :) but yeah, there are ways (hacks) to make it run in web browser "natively" but only to some extend, I mean you can for sure rebind ctrl-w and other stuff or use chromium, but for me currently real LAN party is playing on electron :) web browser version is for testing and developing (for me at least)
55. mclau156 ◴[] No.41919019[source]
now re-make it in Godot?
56. klaussilveira ◴[] No.41919033[source]
PHP is _fast_. That is a pretty good reason, specially for this type of game.
replies(1): >>41919892 #
57. leni536 ◴[] No.41919459{7}[source]
You can use zero-clause BSD[1] or MIT no-attribution[2].

[1] https://opensource.org/license/0bsd

[2] https://opensource.org/license/mit-0

58. keyle ◴[] No.41919476{4}[source]
That is nice of you to offer, but your profile nor this message provide any way of contacting you.
replies(1): >>41919952 #
59. dankwizard ◴[] No.41919667{5}[source]
You've never worked in open source and it shows
60. krapp ◴[] No.41919892{3}[source]
PHP 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.

61. debugnik ◴[] No.41919952{5}[source]
True, but googling soufron brings up a popular lawyer with that last name, whose social media and website use the same handle, and even has a wikipedia page. So I'm assuming he knows he's easy to find.
replies(1): >>41921060 #
62. droideqa ◴[] No.41920151{5}[source]
It is public domain if there is no license.
replies(1): >>41920229 #
63. recursive ◴[] No.41920229{6}[source]
That is not true.
replies(1): >>41920383 #
64. calvinmorrison ◴[] No.41920240[source]
Php is basically runtime Java these days. It's so much better than ye olden days
replies(1): >>41920707 #
65. droideqa ◴[] No.41920383{7}[source]
I checked; you are right.
66. ARandomerDude ◴[] No.41920707{3}[source]
> Php is basically runtime Java these days

I don't know enough about PHP to understand this comment. Can you elaborate?

replies(1): >>41921194 #
67. ◴[] No.41921060{6}[source]
68. mikeweiss ◴[] No.41921194{4}[source]
I think they're just saying its a lot like Java if Java was a interpreted language and not a compiled language.