willnationsdev
u/willnationsdev
I'm wanting to build a game where players draw on a canvas with full undo/redo functionality (and gesture recognition across multiple strokes, but that's a separate task). I was experimenting with the new DrawableTexture2D in Godot 4.7 beta 2 since it's supposed to help with players drawing on stuff; however, I'm unsure how to add undo/redo functionality.
I observed some Godot code from the Sprite Painter plugin that adds undo functionality by creating copies of the underlying Image and restoring from that by overwriting the textu
Only been playing since the 2.0 update. Beat the game (+ cleanup) on regular while save scumming. Now I'm trying to do it again on hard with no retries.
I get that you gotta apply tactics to avoid getting hit and successfully concuss and/or disarm enemies in order to successfully salvage their parts. But throughout all of my battles in the 1st and 2nd provinces, I've only managed to successfully salvage a couple parts because the pilot damage doesn't seem to deal as much as advertised (shotgun esp.) and I all too frequently just end up outright destroying mechs before I manage to knock out their pilots.
I think I need a better idea of how you're supposed to do this. I take severe risks t
I have a L8 Engineer with Prestige 3, and they can still gain experience and continue leveling up, but it's unclear to me what stats, if any, continue to improve for the pilot. Does leveling beyond L6 on Prestige 3 convey any benefit at all?
TLDR: What's the justification for why distributors and ratings boards haven't been legally required to provide clear & transparent citations for their product judgments/evaluations in all the decades the games industry has existed?
I read this TWIVG article about the game Horses & it reminded me of similar stories I've heard from devs struggling to get approval for console publishing. If the distributor says, "no," or if a ratings board (ESRB/PEGI/etc.) gives a rating greater than what you were aiming for, it stands to reason that the rejection should come with a citation of which specific s
I have a large monorepo with several projects spanning apps, tools, libraries, and tests targeting multiple frameworks. When I look at the top of the Solution Explorer in Visual Studio, it says that it is displaying 127 of 88 projects.
- What do each of these numbers mean (it doesn't appear to say in the docs)?
- What circumstances could lead to the left number being GREATER than the right number?
Still learning JS a bit, coming from C++/C#. Been tinkering with JS almost a year now.
I was trying to understand how svelte-forms-lib works and came across this snippet of code (copied below):
function set(object, path, value) {
if (new Object(object) !== object) return object; // <-- right here
// ...omitted
}
The purpose of this function seems to be to abstract away the complexity of parsing nested paths into sub-arrays/objects to assign the value.
How does this comparison work? It seems like it's trying to filter out primitive objects fo
I've been working on a project where I create web components using Svelte Components.
The standard HTMLSlotElement only tells you when its content has changed, but not how that content has changed. To correct that, I wrote a SmartSlot component that gives more precise feedback. This one tells you when any given slotted node was added/removed or when its slot attribute was directly renamed to something else.
Note that the linked REPL page doesn't actually work since it uses a Svelte custom element, but it should work just fine if you copy/paste the code into your own project and give it a shot.
My first time
Say we have AppServer, DataServer, and AuthServer. Users visit the AppServer which serves them a static site (App). In order to contact the DataServer, the App POSTs to the AppServer which, in turn, authenticates against the AuthServer and thereby gets a token that grants them access to the DataServer which serves as a headless CMS.
My ~intermediate understanding of web security gives me the impression that any request to the DataServer can only securely be made from the AppServer, not the App since anything sent from the App could be subject to manipulation by custom JS like Chrome extensions or Firefox plugins, etc. Furthermore, the AppServer's private cre
When Rozemyne starts to look at the "praise" messages from Ferdinand, he warns her that she must listen to them in the private room by herself, or else the messages will self delete.
If you actually think about it, having the kind of technology that can achieve that without destroying the magic tool itself or rendering it inoperable means that Ferdinand actually invented something supremely revolutionary.
- The device has digital/magical memory that can be erased without an analog component (and which could presumably be filled back up / overwritten).
- The device has hardcoded instructions that nonetheless grant it the ability to directly modify its own internal memory.
- The instructi
(Edit: solved for the most part. Something wonky w/ a legacy theme's code)
TLDR: adding event listener to anchor's click works in jQuery's ready and the later-executed Window's load, but not in Document's DOMContentLoaded, despite compiling and running smoothly. Any explanation for why/how this happens?
I have some code like this:
<a id="add-btn" role="button">Add</a>
I wanted to dynamically attach a click event to it in a separate JS script tag.
<script>
$(document).ready(() => {
let btn = document.getElementById("add-btn");
btn.addEventListener("click", ev => {
console.log("'Add' clicked!");
})
TLDR: What do you do if the slot elements have to be filled by server-side code in other languages that are consuming a precompiled Svelte "dom" component library?
I have multiple CMS platforms w/ various tech/languages and am consolidating UI code between them using Svelte by compiling a static component library ahead-of-time and importing bundled .js/.css files into each respective platform's theme. How should those platforms' server-side templates go about injecting markup into the components' slots?
I think I need to use the "dom" compilation process since I need global styles (so no custom elements) and the JS inside each component (so no server-side rendering).
However, the [API
Hello all. Apologies if I should ask this somewhere else, but I've been debugging this for 3 days now and am lost.
TLDR: How do you get Tailwind to compile styles in Storybook for Svelte?
Learning to use Svelte with Vite (which I've gotten working alongside Tailwind JIT), but I recently discovered Storybook and would like to integrate it with that as well. Having some trouble.
- Followed this to initialize Storybook using the new Vite builder.
- Followed this to install the PostCSS support for Storybook.
- Followed [this](https://tailwindcss.com/docs/installation#post-css-7-co

