A new "Player Contrast" setting has been added to the settings menu, enabled by default.
> #SFUI_Settings_PlayerConstrast_Enabled
> #SFUI_Settings_PlayerConstrast_Disabled
A new TicTacToe script now exists on Inferno. Located in csgo/scripts/vscripts/de_inferno/tictactoe.nut
(Yes .nut http://www.squirrel-lang.org/) A sound is played when a winner is determined and the playing field resets, nothing more happens.
Dust 2 doors have been swapped: https://twitter.com/CSGO/status/1270890390841724935
Commonly used? None, really. Lua is pretty dominant for being lightweight and mature (it's 24 years old).
But there are some other options:
Or if you're a crazy person you can use Mono to embed the entire CLR and use C#/VB.NET/etc as a scripting language.
Well good luck. I find the sources on the web pretty bad and misleading so don't be afraid of testing everything yourself.
The language version in csgo is Squirrel 2.2.3. You can find the language references here:
http://www.squirrel-lang.org/doc/squirrel2.html
http://www.squirrel-lang.org/mainsite/doc/sqstdlib2.html
When you get the hang of how everything works, you can use the library I wrote to aid you in your project. Especially in your case you're going to need to use eventlisteners and I've streamlined the process with this (seen in vs_events). Also added some notes on how to get them working.
Protip: restarting the round (mp_restartgame) reloads the entities and scripts. It doesn't reset player scope though.
Everyone can write their own AI (with the Squirrel language & the NoAI API), so the results vary a lot.
You can download new AIs using the online content downloader.
I tried to find it again without success, but about 15 years ago at university we used a BASIC-like programming language that was designed to solve constraint problems. It was really bad, because it couldn’t free memory used for strings at runtime, meaning that my string functions leaked memory all the time. I used strings a lot because it didn’t support structures. Unfortunately, I wasn’t able to recall the name, and it’s probably so bad that nobody ever mentions it online.
The second one that comes to mind is Squirrel, which is a compiled language designed to be embedded into other programs. It’s similar to lua in concept, but closer to C in syntax. I never did a lot with it, but I did learn it.
Squirrel looks like it might be a useful language to investigate for scripting, if you don't want to use Lua. I don't have much experience with it, but I've been meaning to look into it more.
That said, unless you have a very compelling reason to use a scripting language, it might not be worth the hassle.
Yeah, that's what I found the first time I searched for the interpreter. But no, regrettably, that's not what I need. I need something like gopher-lua, but for this scripting language.
> A new TicTacToe script now exists on Inferno. Located in csgo/scripts/vscripts/de_inferno/tictactoe.nut (Yes .nut http://www.squirrel-lang.org/) A sound is played when a winner is determined and the playing field resets, nothing more happens.
/r/truetictactoe just had its wildest dreams come true.
Time to start a Lua vs Squirrel war? (FWIW, Lua is so popular because it's easy to integrate into C or C++ code, and doesn't need many resources to run - great for games.)
Good work! This looks like a meaty project. Have you considered hosting the code/releases on GitHub/GitLab/some other VCS host? That would let you more obviously track issues and accept contributions than a custom website and a forum.
Have you heard of Squirrel? It looks a lot like what you've made. It's the only other language I'm aware of that also fits in the embeddable-scripting-language like Lua (I first saw it in OpenTTD).
Personally, I like Lua more than what you've created. I don't see lack of C-style syntax and 1-based indexing as a flaw that needs to be fixed. I (for the most part) like Lua's expressive for
loops. And I like that the language doesn't have complexity like inheritance built in (making a "class" in Lua is quite easy and I do it all the time).
Lua does need a +=
, *=
, etc. But ++
, I'm not a fan of.
Another one of my idiosyncrasies is that I generally think block comments are an anti-pattern, so I don't really mind the clunkiness of Lua's block-comments. Still, Lua has a great advantage over C-style block-comments, which is that it's very easy to embed code in them, whereas a stray */
in the middle of the comment isn't allowed.
I think using a single operator +
for both number-sums and string concatenation is a mistake in a dynamically typed language, and I think it's one of the nicest design decisions Lua made.
You should checkout squirrel lang. It is easy to compile into embedded code, and has very nice syntax, lambda functions, operator overloading. It's syntax is similar to c++ and related languages.