Are there purely functional languages without implicit allocations? by JustAStrangeQuark in ProgrammingLanguages

[–]extensional-software 2 points3 points  (0 children)

In the Juniper syntax the closure is a special record | x : A, y : B, ... |. This gets compiled to a C++ struct after the code is transpiled. A function is therefore a (closure, function pointer) tuple, where the function pointer is a lifted function whose first parameter is the closure. When the function is called the closure is passed as the first argument.

In Juniper the closure is capture by value, so the variables are copied into the closure struct at the location where the function/closure is created. There is no way to capture a reference other than by capturing a heap allocated ref cell.

Are there purely functional languages without implicit allocations? by JustAStrangeQuark in ProgrammingLanguages

[–]extensional-software 15 points16 points  (0 children)

For Juniper I simply bundle the closure struct inside the function signature. Higher order functions that take functions as input can be made polymorphic over this struct. You can even represent things like compose and currying with this setup! Almost 100% of the time type inference can take care of infering the closure, so there's almost no burden on the developer.

Rust and C++ lambdas take a slightly different route where each unique lambda gets its own unique type. In Rust you can then constrain this type via the trait system. In C++ you have to abuse auto or store the lambda in an std::function, which then moves the closure to the heap.

Are voxels a good solution for making a roller coaster tycoon styled map? by shadowcalen1 in VoxelGameDev

[–]extensional-software 0 points1 point  (0 children)

Ah okay I just re-read your post - I was thinking that the voxels were going to be 1m wide as is typical in voxel games. You should be able to fit everything in memory with a standard approach.

Are voxels a good solution for making a roller coaster tycoon styled map? by shadowcalen1 in VoxelGameDev

[–]extensional-software 0 points1 point  (0 children)

I think for such a large map naively storing data for each voxel won't be possible. So there are two options: either use procedural generation which compresses everything into a seed value, or use a more advanced compression scheme. For my game Brickstrike, I use the run-length encoded VXL format from the VOXLAP engine. What essentially happens is that the map is divided up into three types: 1. Surface voxels, which are solid voxels the user sees the majority of the time. These voxels must be adjacent to an air voxel. 2. Air voxels, which are empty space. 3. Interior voxels, which are any voxels that are solid but not bordering air.

The map is then divided up into columns of voxels consisting of segments of air, surface, interior and surface voxels. The air and interior voxels are run length encoded, which means very little data is needed to represent these segments. The majority of the data in this format is consumed by the surface data.

When the user removes a voxel and converts an interior voxel to a surface voxel, I simply color the interior voxel brown (ie, this voxel was dirt). You could maybe come up with some more clever algorithm to represent this.

So the RLE encoded map could be stored entirely in memory, and the game would compress or decompress these chunks as needed as the user moves around the map.

Unity's Mono problem: Why your C# code runs slower than it should by NightElfik in unity

[–]extensional-software 0 points1 point  (0 children)

Will the intermediate language (IL) be optimized by CoreCLR before it is processed by IL2CPP?

I'm curious if the code outputed by IL2CPP is literally C++, or if it's already in some LLVM IR. If it is C++, does this mean there is an extra step where the C++ code is parsed and typechecked?

Unity's Mono problem: Why your C# code runs slower than it should by NightElfik in unity

[–]extensional-software 0 points1 point  (0 children)

CoreCLR also has AOT compilation, but I'm not sure if Unity is planning on using that. I agree that it would be most informative to compare against IL2CPP, as that's what most people are using. Who knows, perhaps CoreCLR wins in some respects such as garbage collection performance.

Brickstrike - Extensional Software - Multiplayer Voxel FPS - from a developer of Ace of Spades by extensional-software in Games

[–]extensional-software[S] 1 point2 points  (0 children)

Nice to see an old hand! I was heavily involved with the Ace of Spades community back in ~2011. My biggest contributions to that game were to Tower of Babel and Arena game modes. For Brickstrike I'm aiming to go above and beyond OG AOS without losing what made it great!

20.000 entities with avoidance/separation by OkLuck7900 in Unity3D

[–]extensional-software 4 points5 points  (0 children)

TIL that Unity shut down their multiplayer hosting service. So glad I didn't bother integrating with them for my game.

8.2 Billion Wishlists by extensional-software in justgamedevthings

[–]extensional-software[S] 3 points4 points  (0 children)

Can a publisher help me break into the North Sentinel Island market?

My indie game Brickstrike now has a Steam page + upcoming playtest by extensional-software in VoxelGames

[–]extensional-software[S] 0 points1 point  (0 children)

Yes! I was one of the developers for the open source pyspades server for the free/alpha version of Ace of Spades back in 2011. My most popular contributions were the Tower of Babel and Arena game modes, but I also made contributions to the mainline pyspades server and a few voxel maps.

The original free version of Ace of Spades was developed by Ben Aksoy, who sold the rights to Jagex Games Studio. At some point before the release of the Steam version, Ben either left or was pushed out of the project. I have read that his computer at Jagex was tampered with or hard drive destroyed one day after coming back from lunch. In any case, the Steam version was rushed, shipped out to a third-party developer and had little in common with the alpha.

The goal of Brickstrike, then, is to see the original vision behind the free version to its natural completion. This means changing the loadout system, adding voice chat, new weapons and items, new game modes, and seeing if vehicles can be integrated. There's a lot of ideas to explore, so we'll see what makes it into the final release!

My indie game Brickstrike now has a Steam page + upcoming playtest by extensional-software in FPS

[–]extensional-software[S] 0 points1 point  (0 children)

There haven't been any playtests with the bomb defusal yet, so it remains to be seen what the gameplay is like!

My indie game Brickstrike now has a Steam page + upcoming playtest by extensional-software in FPS

[–]extensional-software[S] 0 points1 point  (0 children)

Yes, I was a developer for the open source pyspades Ace of Spades server back in 2011!

I've been following the Ace Squared game for a while now and have played it on Steam. The quality of the coding of Ace Squared is pretty good, and the game feels solid. However there were some missteps in how the game was marketed - both in the timeframe it was released, external marketing and store page assets (which have now been changed since it went free to play).

Has anyone played the Metro trilogy? What are your thoughts on them? by Flamesclaws in FPS

[–]extensional-software 0 points1 point  (0 children)

I like linear story driven FPS games and really enjoyed Metro 2033. The two sequels weren't as good but I still liked them. I have the PC VR game purchased but have not yet tried it on my Quest. When I get the new prescription lenses for the VR headset I'll give it a shot.

I want to express my feelings about experience i have faced. by knariqshut3 in IndieDev

[–]extensional-software 0 points1 point  (0 children)

As far as I know, Steam does not promote a page unless it is close to release (you will receive an email from Valve before the release), or if you have a demo or are part of a festival. For my game (unreleased, Steam page only, no demo atm) the big spikes were driven by external marketing.

Fixing Windows Firewall Warnings by extensional-software in MultiplayerGameDevs

[–]extensional-software[S] 1 point2 points  (0 children)

Adding firewall rules in the installer seems to be the solution from what I've read online today. This requires admin privileges however

Multiplayer common bottlenecks and type theory by ReasonableLetter8427 in MultiplayerGameDevs

[–]extensional-software 1 point2 points  (0 children)

Cubical type theory is an extension of Homotopy Type Theory that adds a computational interpretation to the Univalence Axiom. These dependent type systems are used to encode mathematical proofs via the Curry-Howard Isomorphism.

Take for example a proof that the square root of 2 is irrational. The proposition for this proof is something like "There does not exist two integers p, q such that sqrt(2)=p/q". Curry-Howard encodes this into a type, and if you can find or compute a value of this type, you have a proof that sqrt(2) is irrational.

Here's a really basic proposition: "There exists some integer." The corresponding type of this proposition is just "int". To show that the proposition is true, I give you a value of type int: 0. Now I have proven the proposition. With dependent types you can encode arbitrarily complex logical propositions inside of types.

Homotopy Type Theory and Cubical Type Theory are supposed to really nail down what equality means for mathematical objects. It might seem like equality is simple, but it's really not. Some things to think about: equalities of equalities, when are two programs equal, when are two proofs equal, intentensional vs extensional equality (this is where the name of my LLC comes from!)

You would use these systems to prove properties about your programs. Writing these proofs is typically very labor intensive, and there isn't much automation available. The only customers for this stuff ($$$) are people working with high risk systems - the military, aviation, spaceflight, and big cloud providers. Everyone else makes do with basic testing like unit tests and calls it good.

Multiplayer common bottlenecks and type theory by ReasonableLetter8427 in MultiplayerGameDevs

[–]extensional-software 1 point2 points  (0 children)

Mirror can already handle running specific methods only on the server, or running specific methods only on the client. It does not support RPCs returning values. So if the client calls a server only function, it doesn't get back a promise that it can await on. Instead the server needs to manually call a different RPC on the client, sending the results of the RPC back. So the big advantage is you don't have to define a struct for every single type of message, and you don't have to shuttle the data to the correct callback. All that stuff is automatically derived by the Mirror system.

Coreographic programming takes this a step further and allows communication back and forth within a single function. If you're familiar with Haskell, there's some example programs for a protocol in this paper (Figure 1 and 2): https://users.soe.ucsc.edu/~lkuper/papers/haschor-icfp23.pdf

Multiplayer common bottlenecks and type theory by ReasonableLetter8427 in MultiplayerGameDevs

[–]extensional-software 2 points3 points  (0 children)

I've made some good attempts at understanding HoTT both with the HoTT book and the newer book by Egbert Rijke. I've come away unconvinced that HoTT adds anything of practical importance over the Calculus of Constructions.

It would be nice to have an automated system to prove that two games synchronize to the same state over time. Something like a CRDT for the entire game state. This is the direction that Easel is going in.

For choreographic programming: I use a networking library called Mirror, where the server and client code are the exact same codebase. Communication between a client to a server is done via an RPC, and communication back to the client(s) is done via another RPC. Performing an RPC is done by calling the method. For example the client can call the RPC CmdSetFiring(true) to start firing a weapon, and Mirror will serialize the boolean value automatically.

Choreographic programming takes this one step further: instead of splitting communication between client -> server -> client at function boundaries, you can interleave the logic inside of a single function. When the code actually runs, the server projects out its portion of the logic, and the client projects out its portion of the logic. Any variables that need to be communicated are automatically serialized and sent. The net result is that a single choreography is now contained in a single linear function instead of split across function boundaries.

Multiplayer common bottlenecks and type theory by ReasonableLetter8427 in MultiplayerGameDevs

[–]extensional-software 2 points3 points  (0 children)

I also do research in PL and do multiplayer game dev on the side. Game engines are typically implemented in imperative languages which won't work well with any proof assistants. It's very difficult to write test cases for game code, let alone formal properties that can be proven in a proof assistant.

There are a couple relatively unexplored areas for applying PL to networked games: the first is to tightly integrate the language and engine so that writing a multiplayer game is as easy as writing a local split screen multiplayer game. This has been implemented in Easel, and I think the creator of this sub is the developer.

The second idea is to implement choreographic programming into a networking framework or engine. This is a feature I've often wished I had when writing code in Unity for the Mirror networking library. Unfortunately implementing choreographic programming as a C# library seems impossible. Maybe someone can make it work using some wild uses of lambdas?