7 ms·
Show HN: Open-source Counter-Strike-like game
- modeless 2y agoThe client runs in Electron, but there is no web version? Why not?
- beepbooptheory 2y agoJust run `python -m http.server 4000` inside the www directory! Seems to be working for me.
- modeless 2y agoThere 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.
- solcloud 2y agothere 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 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
- artemonster 2y agoNo UDP in browser?
- modeless 2y agoNot true anymore! Here's my port of Quake III with UDP multiplayer: https://thelongestyard.link/ https://thelongestyard.link/ It uses WebRTC DataChannel for UDP. The code is here: https://github.com/jdarpinian/ioq3 https://github.com/jdarpinian/ioq3
- josephcsible 2y agoCan you add a license file?
- solcloud 2y agoI 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
- solcloud 2y agosource code is all written from scratch and it is free for anybody
- JTyQZSnP3cQGa8B 2y agoThat’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.
- droideqa 2y agoIt is public domain if there is no license.
- ClassyJacket 2y agoThe opposite is true. Even if you publish the source, if you don't add a licence, you still have full copyright and all rights to it.
- recursive 2y agoThat is not true.
- droideqa 2y agoI checked; you are right.
- dfox 2y agoMaking 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.
- diggan 2y agoThe 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 :)
- dietr1ch 2y agoWell, no one says you need to shoot, maybe you can go the charisma route and convince the terrorists not to get the bomb down.
- rzzzt 2y agoNegotiator selected!
- solcloud 2y agounfortunetely voice chat is currently not supported :D
- swyx 2y agoah, talk-no-jutsu, the most powerful weapon in a main character arsenal.
- xanderlewis 2y agoErm, actually, it’s kaiwajutsu.
- no_wizard 2y agoIts like a pacifist run in the old Fallout games
- evanwalsh 2y ago
- camtarn 2y agoHaving 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.
- deleted 2y ago[deleted]
- solcloud 2y agomaybe 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 https://www.youtube.com/watch?v=aIBVGZanVvU
- camtarn 2y agoThis is a much better demo! Thank you for the link.
- solcloud 2y agothank you, no problem, I was recording videos as development was going to record progress
- ghosty141 2y agoI think all he is saying remove the references to „Counter-Strike“ and you are all good! How about Sol-Strike? ;)
- solcloud 2y agothat actually sounds kinda cool, but do I have a permission to use it from you, or now anybody can trademark it so I have to be first to register in German with GmbH or smth :D
- therein 2y agoYou would think it would run in browser. Why are the clients packaged electron applications?
- solcloud 2y agoactually 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 :)
- modeless 2y agoCtrl-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 https://github.com/jdarpinian/ioq3, you can test UDP multiplayer and Ctrl-W live in your browser here: https://thelongestyard.link/ https://thelongestyard.link/
- solcloud 2y agoI 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)
- peppertree 2y agoFYI client side is under www/assets. https://github.com/solcloud/Counter-Strike/tree/master/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.
- solcloud 2y agothank 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/assets/js/start.js 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/server.php https://github.com/solcloud/Counter-Strike/blob/master/cli/s...)
- maxloh 2y agoWhat is the reason behind wrapping code inside an IIFE (Immediately Invoked Function Expression)? JavaScript modules are scoped, so nothing can be accessed outside unless explicitly exported. FYI, you don't even need an IIFE. ES modules are block-scoped by default. // Instead of, let foo (function() { const bar = 1 foo = bar })() // `bar` is out of scope here // You can just, let foo { const bar = 1 foo = bar } // `bar` is out of scope here too
- solcloud 2y agoI guess history reasons
- bilekas 2y agoThis 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!
- fefferkorn 2y agoYeah, same,.. Real time game server written in PHP is really interessting. I also know PHP from the old days and now only from certain CMS systems, but not realtime projects. Im amazed! Nice! :)))
- doctorpangloss 2y ago“Make games that are fun to make.”
- solcloud 2y agothank you for kind words :)
- calvinmorrison 2y agoPhp is basically runtime Java these days. It's so much better than ye olden days
- ARandomerDude 2y ago> Php is basically runtime Java these days I don't know enough about PHP to understand this comment. Can you elaborate?
- oliverwinton 2y ago[dead]
- wormlord 2y agoOpen-sourcing this is awesome! What a great jumping off point for people wanting to do 3D game dev.
- solcloud 2y agothank you!
- NoboruWataya 2y agoVery 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 https://en.wikipedia.org/wiki/Extreme_PaintBrawl
- justusthane 2y agoOh man, my buddy had this game and we had a great time with it!
- solcloud 2y agothank you! very cool, love is specific thing indeed, well we can always brawl for that rank one spot :D
- mclau156 2y agonow re-make it in Godot?
- solcloud 2y agoIf anybody is interested in in go for it, you can use server from repository and only code client side in godot than purchase bunch of cool assets and AAA game is born
- maxwelljoslyn 2y agoForget FC '25: this is the football game I really want! Good stuff, solcloud. Keep following your heart.
- de_elusive 2y agoThere is also play-cs.com which is the real counter strike 1.6 in browser.
- DeathArrow 2y agoOpen source code is fine and dandy, but what games really need is open art. Most open source games struggle with the way they look and feel.
- solcloud 2y agoI agree, but being good both at programming and art is quite unique skill, then there is also whole audio category, animations,...
- squarefoot 2y agoThe gaming world badly needs a central repository of art, only art (graphics, music, scenery, world maps, objects, ...) sort of a highly specialized Github. It should promote using well known file formats and structures to ease importing this or that object into a game project. And possibly allow the use of the torrent protocol to avoid clogging central servers as data files usually represent the heaviest load for a server.
- loufe 2y agoThere are some seriously impressive open source games out there. One of my friend groups into gaming got me into BAR (Beyond All Reason) last year and it is seriously impressive in terms of depth, graphics, and optimisation. This part of the future I love.
- diggan 2y agoBAR is pretty awesome indeed (make sure to check it out if you like games like Total Annihilation/Supreme Commander) and makes it really easy to mod the game via Lua. Seems to have a pretty large community for being a FOSS game too.
- klakierr 2y agoAlso discovered BAR couple of weeks ago and even though I'm not really a gamer anymore, and was never really into rts games, I've already have > 50 in game hours I was very impressed with the level of detail and meticulous implementation. The level of control and posible automation is high, I feel that it should reasonate with most tech oriented ppl If anyone wants to play my in game username is [ZWD]_jaan, just add me as a friend and I can intro you to the basic concepts (im still a noob tho), we can play a coop game or find a noob lobby :)
- tokai 2y agoStill not open source many hours later after multiple people said to put a license on it. Calling something open source when its not is really not okay, and it is hurting free and open source software.
- dangsux 2y ago[dead]
- ivanvanderbyl 2y agoWhat would you call it? Source available?
- croes 2y agoYes
- tokai 2y agoI would personally just called it a video game. Free and Open source a issue of copy right. If there's still full copyright (and there's copy right on everything published nomatter if it is explicitly claimed or not) with no license on a piece of software, it has nothing to do with open source. But source available would be the term to use if one wants to point out that the source is on github.
- meiraleal 2y agoOpen-source game has a literal meaning.
- tokai 2y agoThe code is not open source. It is not an open source game. This is not open to interpretation, as there is no license given.
- shortrounddev2 2y ago
- hauxir 2y agoSomething I'd love to have is a version of counter strike 1.6 with open source assets. Something similar to OpenArena for quake but for cs 1.6. Could be built on top of https://github.com/Velaron/cs16-client https://github.com/Velaron/cs16-client
- indulona 2y ago+1
- oakesa 2y agoI came here for the cstrike and stayed for the 'open source' toxic popcorn. Please keep me in the screenshot when this gets picked up by all the news sites. And great project.
- solcloud 2y agowe have a bit of both here thank you