420 points · by solcloud · 2y ago · 168 comments
You could make asynchronous servers using socket_select(), which was added in PHP 4.1.
https://www.php.net/manual/en/function.socket-select.php
There was also a third party extension that added threads to PHP 15 years ago, although it was buggy.
Reminds me of ReactPHP (no, not that React) that allowed you to do non-blocking I/O in PHP back in like 2012-2013 sometime. Maybe that's the library you're referring to actually?
Seems they still have the docs up: https://www.php.net/manual/en/book.pthreads.php
I don't know enough about PHP to understand this comment. Can you elaborate?
There are no dependencies besides threejs. No typescript or build pipeline. Actually fun to just read the code.
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> 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 :)
Sorry, small tangent. This project is still super impressive and I have played thousands of hours of CS so it's cool to see.
This is overly dismissive, and the sort of thing I'd expect on Reddit.
If you look at the most critically praised and fan praised AAA game of the last.. decade? It's Baldur's Gate 3. In the AAA-budget-quality space there's enough games out there released in the last few years without guns to keep you busy - Disco Elysium, Stardew Valley, Elden Ring, Minecraft, Persona, Witcher, Total War, Alan Wake(*) Stellaris are all in my "recently played" and there's no guns. Generally RPG, Strategy, racing, platformer style games avoid guns for the most part.
You've got AAA games that have guns in them that aren't focused on shooting - Xcom, Fallout come to mind where the guns are just a visual representation of a dice roll.
I know you mentioned "big budget gaming", but there's oodles of small budget games to play too. Balatro, Pacific Drive, Against the Storm, Dredge, Inscryption are all games I've played this year with no guns in them.
Fallout might not be ‘focused on shooting’, but it still has the look of a typical FPS game. It’s as if game developers have mostly converged on a standard game design. There are exceptions, but there’s still so much untapped room to be more creative.
I think it is true that most money in the games industry goes into making games that heavily feature guns. Films are the same; even the seemingly non-violent premises apparently have to involve constant peril and frequent (gun) violence. Maybe it’s a particularly American thing.
Again, not opposed just bored. I seek out non-violent games not for the lack of violence but because they have interesting mechanics. Violence/combat is the majority of top selling games, top played games. That has been true for decades.
Pacific Drive was a gem and the level of creativity I hope more studios to aim for. Another great example was Jusant. There is indeed no shortage of great indie games with what I am after. Sim games, farming/life games, factory/automation games, puzzle games are all great examples of non-combat genres with decent budgets too. But you do find there's usually just one or two big hitters, as it's a smaller market.
four of the most successful (perhaps iconic) games in history do not exactly meet your description in any meaningful way: baldurs gate franchise, warcraft franchise, different mmo franchises, diablo franchise.
but let's take your description and apply them to iconic fps over the years:
doom, ok shooty mc shooty goes shootin -- doomguy agrees. but theres a lot more to doom than just shooting.
cs source: nah sorry tactical strategy is not shooty mc shooty goes shootin.
quake world up to quake live/quake champions: nah sorry tactical strategy and fps-chess (duel) is not shooty mc shooty goes shootin.
halo franchise: epic sci-fi campaign story which was differentiating at the time AND tactical strategy -- while it sorta fits your description, it also sorta bucks it in the face because it was praised for its campaign as well as its online play.
overwatch: role-based tactical strategy.
battle royal genre: kinda shooty mc shootin goes shooting, but on hard mode with variance and.. tactical strategy requirement.
i mean the list goes on. reducing the surface area of FPS games historically to just some reddit meme bc it gets a lot of updoots makes me think you do not have a ton of experience playing shooters historically or otherwise (happy to be proven wrong here).
marketing is strong.
I have been playing FPS, guns or no guns, for 25 years. I also vehemently seek nuanced, interesting and intelligent game mechanics, and there is certainly many amazing games that fit the bill.
I am well informed, this is just my desire and not a fact or what I think should happen.
At any rate, the comments in defense so far have told me some of the most popular games are not shooters, and then that there are shooters with depth. No dispute there. I probably should have not been so pithy and stated it's combat in general, not shooters.
I also make games in my spare time, so I am at least practising what I preach. I think combat is a crutch for the gaming industry, and I would love to see more mechanics be explored with the budget a typical combat focused game gets. Gimme a AAA first person puzzle explorer ala Obduction, Pacific Drive, Viewfinder. Imagine a Fallout scale narrative exploration game that doesn't require combat to fill in the gameplay.
Cyberpunk is a fantastic story and exploration game, with interludes of stat based combat. I have spent hours just wandering the city and finding the cool hidden stories, but most 90% turn into 5 minute combat crescendos that add nothing to the story, while super obvious mechanics that would match the story go unexplored. That's more or less what annoys me, it's not a big deal I just find it a shame.
Again, I don't exactly care what other people play or do, this is just what I want.
The client is a lot of JavaScript (with graphics via Three.js)
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 :)
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.
free software is software you don't have to pay money to use, it doesn't matter if you have access to the code or not.
source available means the source is available on request and with restrictions to keep it private. doesn't matter if the software is free or not.
But source available would be the term to use if one wants to point out that the source is on github.
Not a great response. Do you know where you are right now?
Something similar to OpenArena for quake but for cs 1.6.
Could be built on top of https://github.com/Velaron/cs16-client
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 :)
Good stuff, solcloud. Keep following your heart.
In CS 1.6/GO there have been community versions of actual football but unfortunately CS2 has killed them off completely.
I think most users will build from source or use provided pre-build binaries
It uses WebRTC DataChannel for UDP. The code is here: https://github.com/jdarpinian/ioq3
There are definitely issues with getting fine grained memory control in a performant manner but for general processing it's pretty competitive.
Server UDP:
https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d...
Client Websocket:
https://github.com/solcloud/Counter-Strike/blob/7dab1533ec4d...
I guess if the client is Electron, they're stuck with the web stack.
I don’t see any correlation.
And great project.
thank you
It's also ... not an awful lot like CS at the moment. Mostly the size and complexity of the map.
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
Can't see how that trade mark could stand against a challenge (in UK/EU)?
See eg Art.4, Art.7(1)(c) of EUTMR.
IANAL, these are my personal opinions and unrelated to my employment.
I am also not a lawyer, but I would not like to step into a trademark dispute just because it 'seems perfectly fine'.
Albeit in this case you're most likely to just get a cease and desist rather than getting sued.