News for hackers. Stuff that matters.

flinkerflitzer

Here is some footage of the program for those interested: https://www.youtube.com/watch?v=9iWu4ArbD5Q
Sure!

The brush stroke accept/reject algorithm looks at the axis-aligned bounding box that surrounds each candidate brush stroke's affected area. It calculates the cumulative pixel color similarity between the input image and the painting over this area, before and after the candidate brush stroke.

Pixel color similarity is the sum of the absolute difference of each RGB color channel divided by 3.

The candidate brush stroke is accepted and kept by the painting if and only if it represents an improvement in similarity over its affected area AABB.

Show HN: Painterly – Turn pictures into digital paintings without generative AI

https://github.com/jbunke/painterly

Painterly is an application that "paints" input images stroke by stroke to produce digital paintings. GenAI is not used in any part of the production pipeline.There is a free demo available under Releases on the GitHub repo.Let me know what you think!

( Read More... | 5 comments | 11 points | on HN )

Show HN: I made the ultimate pixel art character customization program [video]

https://www.youtube.com/watch?v=jqZTsHniSUE

I'm Jordan, the developer of Top Down Sprite Maker. Like the name suggests, my program is a pixel art character customizer. But wait, there's more! Unlike pretty much every other program in that niche, my program supports multiple "sprite styles", and let's you create and share your own. A "sprite style" combines an art style, supported directions (whether 4, 6, or 8), animations, layers and...

( Read More... | no comments | on HN )

Show HN: I'm making the ultimate pixel art character creator – Get involved

https://github.com/jbunke/tdsm

Top Down Sprite Maker is the perfect pixel art character creator for developers that care about the finer details.Smart layer combination rules. Multiple sprite styles. Fully configurable sprite sheets. Exports sprite sheet to PNG, metadata to JSON, and optionally exports a layer-separated sprite sheet as a Stipple Effect project file.

( Read More... | no comments | on HN )

Show HN: DeltaScript – scripting language skeleton to be extended into DSLs

https://github.com/jbunke/deltascript

DeltaScript is a lightweight scripting language skeleton that is designed to be easily extended for the specification and implementation of domain-specific languages with a shared syntax.v0.1.0: https://github.com/jbunke/deltascript/releases/tag/v0.1.0Includes the language specification and the official language implementation (an interpreter targeting Java)

( Read More... | no comments | 3 points | on HN )
Re:When to Say When: Reinventing the Switch Statement on Thursday January 16, 2025 @06:34AM (#42723999)
I designed and implemented my own scripting language, which features a control flow structure I wanted to get some feedback on!

The `when` statement in DeltaScript extends the traditional `switch` statement with types of cases for pattern matching and testing the control variable against a boolean function (predicate). It also does away with fallthrough.

Read about the semantics in detail: https://github.com/jbunke/deltascript/blob/master/docs/ls-5-... Download the entire language specification and/or play with the Java interpreter: https://github.com/jbunke/deltascript/releases/tag/v0.1.0

That's an interesting observation. Thanks for taking the time to think critically about my implementation. I posted about this on Reddit and someone pointed out something similar.

I'll link that post for reference: https://www.reddit.com/r/ProgrammingLanguages/comments/1fb5y...

The gist (hehe) was that a full lambda expression in a `passes` case could often feel like overkill. This was the possible solution I suggested:

    What I could do is similar to what you suggested in another comment and similar to what C# does, where I add a third type of case that implicitly substitutes the control expression into a longer expression. Something like this, tentatively using the keyword `matches`:

    int x = rand(0, 11);
    
    when (x + 2) {
        matches _ < 5 || _ > 9 -> { /* body */ }
    }
Here is a structural matching example:

    orientation(image img -> string) {
        when (img) {
            matches _.width == _.height -> return "square";
            matches _.width > _.height -> return "landscape";
            otherwise -> return "portrait";
        }
    }

Show HN: Switch statement + lambdas = pattern matching in DeltaScript

https://gist.github.com/jbunke/60d7b7ba9779f8a44e96f2735ddd460e

DeltaScript is a skeletal scripting language that can be easily extended with types and function bindings. These extensions then constitute dialects, and are effectively DSLs in their own right.I have been developing DeltaScript for the scriptable pixel art editor that I am working on, but I have plans to reuse it for other projects with entirely separate scopes in the future.I have implemented...

( Read More... | 2 comments | on HN )
That was a common clause that I encountered while researching the licenses for software with similar distribution models to the one I was targeting.

As far as I can tell, stipulating that end users must be running a validly licensed OS helps protect the licensor (me) in situations where a cracked OS with malware corrupts my software or compromises the whole system.

I get your point in principle, but even if I were inclined to get litigious in a situation like that (which I'm not), I don't see how such an argument would have any legs for anything other than the most niche algorithms in the codebase that concern features or systems are more or less unique to Stipple Effect.

I will reflect on this though. This is my first time commercially distributing software, and my priorities for the license were for it to protect my IP without being overly restrictive. However, I've had a few people in separate spaces raise concerns with it, and I want my software to be as accessible as possible without compromising my ability to profit from it or expose myself to liability or "theft".

I'm the sole developer of Stipple Effect, so I can update the license with a future release if I feel compelled to do so.

Thank you!

That's a really interesting idea, but unfortunately I don't think it would be feasible to implement.

3D model texture mappings are one thing. It is quite straightforward to create a bijection to edit either the texture or the model with the texture applied and have the changes propagate to the other. For my program, 1) this 2D UV mapping texture to animation workflow is only one specific application of preview scripting, and 2) you would have to take additional factors into account besides the texture and the animation in order to implement a two-way function between the texture and animation in 2D. This is because a pixel coordinate from the texture may map to multiple pixels in the animation. These correspondent pixels in the animation may have different color data, and so propagating a change back to the texture would have to account for which pixel was overridden most recently, or a different type of heuristic.

I hope that makes sense.

Fair enough; thanks for giving me something to think about!
I hear you, but I think people often overlook that developers have practical considerations to take into account. I've gone full tilt with Stipple Effect this whole year, and I have living expenses to consider.

I also don't see how the license prohibits you from doing what you expressed, though that may be an oversight on my part. I'm happy to be educated or listen to what specific concerns you have about how the license or distribution model limits what you would hope to get out of the program.

That's fair enough. I guess the additional benefit that I am going for here is that the preview behaviors literally are real-time. The preview window re-computes a preview script's output every time the project state changes in Stipple Effect, so you'll see the effects of a brush stroke on your preview milliseconds after releasing the mouse. That way you don't have to save the file, switch contexts, and see the updated result. But I respect that your current workflow may be your preference.

How does looking at the code expose you to potential legal liabilities? I'm a bit confused by that.

Thanks for your interest.

Not presently, but it's definitely something I can look into adding. I haven't used Godot much, but I see the momentum it has behind it (especially since the Unity scandal a few months ago) and it seems like Godot integration will become a more and more coveted feature.

For the time being, I welcome you to drop a comment about it in the feedback section at the bottom of the store page or to submit a feature request here: https://github.com/jbunke/stipple-effect/issues/new/choose

Thank you for your trust and for the compliment!
I linked the GitHub repository in my post; you may also be interested in the following links:

Store page: https://flinkerflitzer.itch.io/stipple-effect

Scripting API: https://github.com/jbunke/stipple-effect/wiki/Scripting

Thanks, I appreciate it!

I am by no means a talented artist, and programming comes much easier to me than pixel art. That's a big part of the reason why I made Stipple Effect, which is essentially a program that you can get the most out of when you leverage your skill as a programmer to make making art faster/better/less painstaking.

Hahaha, I've grown to love this question over the past few weeks. I'm a huge fan of Aseprite, and I don't have a bad word to say about it.

However, I could attempt to make the case for Stipple Effect over Aseprite a few ways.

In terms of what Stipple Effect can do better than Aseprite, or what it can do that Aseprite can't, I'd highlight some specific applications of the scripting system. If you are a game developer making a 2D pixel art game with a lot of animated assets of the same form (physical shape, dimensions, pose, etc.), Stipple Effect can really expedite the art process.

Imagine you are making a game with tons of NPCs, each of which has to have idle animations, walking animations, and a certain number of action animations. Or a game with significant character customization in the form of clothing and vanity items. At present, you would probably have to individually animate every NPC and every clothing item for each animation. Using Stipple Effect, however, you can spend a bit of time configuring a lookup relationship between a single texture and an animated UV lookup asset, and map the texture to the animation via a preview script. In the long run, this will save hundreds of hours of tedious work, as you will only have to draw a single texture for each item/NPC you are adding to your game.

See this video for a visual aid: https://www.youtube.com/watch?v=Bj1foXYcHl4

Besides that, Stipple Effect is much younger than Aseprite. David has been working on Aseprite for over 20 years as far as I know, while I have been working on Stipple Effect for just over eight months. The program is improving at a much more rapid rate, and will likely receive more substantive updates more often than Aseprite will.

Stipple Effect is only a quarter of the price of Aseprite presently to reflect that it is still a nascent program with less polish, so there is an economic incentive as well.

In summary, I would say you should decide whether Stipple Effect is the best fit for your individual needs, and whether you're willing to take a chance on less proven software with a huge potential upside.

Cheers!

Hi abetusk! The first tool I implemented in the program was the Stipple Pencil, which is a variant of the pencil that only colors over the target pixel when the mouse is pressed down, even if the cursor is dragged over other pixels thereafter. The pun was meant to be on that and the term "ripple effect".

However, if I could go back, I'd probably change the name to something more fitting to what the program actually is.