New Horizons - Jimmy
I wrote some fancy code that lets us extend the world super far into the distance. The horizon looks much better now, and it no longer gets closer when you move closer to it.
[previewyoutube=8tSXiUXTHhY;full][/previewyoutube]
Logic Scripting - Felipe
Mods in Logic World are mainly made in C#, including the code behind custom components logic. However, it can be a bit overkill having to compile an entire C# library for making a single NAND component, not to mention insecure as C# code can do pretty much anything. This is the reason I came up with
LogicScript, a
domain-specific language built for programming pure logic components, like logic gates, memory cells, etc.
Heres a snippet showing off the languages current features:
when in = 1010
# Set individual output bits
out[0] = 1
out[2] = 0
out[1] = in[2]
# Set all the output bits
out = 1010
out = 14' #The ' denotes that it's a decimal number instead of a binary one
end
# Other example case statements:
# when in = (1, 0, in[1], 1)
# when in = 12'
# when (in[0], in[1]) = 10
# when (in[2], in[1]) = 3'
I also plan on adding binary operators and some kind of memory registers for storing numbers.
The library as-is can execute the above script in 0.0003 ms, thus it can run 3,333,333 times per second. This means that, while it probably wont be as fast as hard-coded C#, its still pretty damn fast. Even then, I still have a lot to do to optimize it, so that number will probably go up.
LogicScript will make it easy and fast to add new logic components, and it will make for more trustworthy mods, as theres no way for LogicScript code to install a virus on your computer. Well still support C# logic components if you need to do something really crazy -- LogicScript isnt a replacement, its an additional option.
AND, AND, and AND- Jimmy
This week I added two new AND gates to Logic World.
[previewyoutube=ePVDzZw8Mgc;full][/previewyoutube]
Thanks to our beta testers for noticing this gap in logic capabilities. Anti-thanks for the serpentine creatures for interrupting production on that video several times.
I also modified the logic code for AND gates to support any number of inputs. This makes it super easy to mod in AND gates with even more inputs.
---------------------------------------------
We'll keep releasing these weekly updates right up until the game comes out. To make sure you don't miss them, you can
sign up for our newsletter or join the
official Discord, and of course you can wishlist and follow the game right here on Steam.
See you next Wednesday!
View this post on logicworld.net.
More Logic World Wednesdays
https://store.steampowered.com/app/1054340/Logic_World/
[ 2020-04-02 01:26:10 CET ] [ Original post ]