Fork me on GitHub
#off-topic
<
2023-01-08
>
kulminaator13:01:40

any good hints on object collision detection implementation techniques or libraries (that play along well with clojure or are written in clojure)? 2d will suffice

Rupert (All Street)13:01:11

Afraid I don't have a link to a library, but this may be worth considering: Many games wrap bounding boxes (simple polygons) around objects to make collision detection more simple/fast. If you use rectangle bounding boxes around your objects, then it would be pretty easy to write the collision detection from scratch (ie check if 2 rectangles overlap at all). A naive algorithm could just iterate over every pair of rectangles and check if they overlap:

(for[a (all-bounding-boxes) b (all-bounding-boxes)]
   (when (and (not= a b) (check-overlap a b)) (collision-detected! a b))

ilmo14:01:22

If you are working with convex hulls then you could take a look at GJK.

Martynas Maciulevičius12:01:06

I used a clojure set in this tetris as I only needed pixels: http://github.com/invertisment/cljs-tetris But your game may be more complicated.

Ulises MC15:01:15

I'm implementing a bullet-hell game in Clojure, using LibGDX and its Rectangle class has some methods to check if they're overlapped. @UJVEQPAKS I tried to implement my own algorithm, but it's not as easy as it sounds, at the end you will be implementing something that has already been done by some library.

Martynas Maciulevičius16:01:43

I think libGDX must have something that's already been thought of and is performant :thinking_face:

Ulises MC18:01:53

@U028ART884X Yep, you're right. The problem is that you need to deal with their Classes/Objects, IDK what is @U6MHHF36J doing, but maybe including LibGDX in its project doesn't worth it

Martynas Maciulevičius20:01:24

It's possible that in this case there is a need to use OOP for performance. Maybe it's possible to design a pipeline, but why not create an abstraction on top of this fast OOP implementation instead?

kulminaator05:01:36

Thanks for the various input :-)

mauricio.szabo19:01:54

Folks, am I crazy or recently, Apple wants open-source developers to pay $99 a year and own a mac just to be able to generate a binary where they don't say it's "corrupted"? Is there some alternative? I mean, working "for free" is already bad enough...

borkdude19:01:38

if you download a binary through another program (e.g. zsh + curl, etc) those binaries won't be affected. only if you unzip them using Finder, etc

mauricio.szabo20:01:58

Well, my problem is that my app is offered as a DMG package

borkdude21:01:23

yeah, hm, ouch :)

adi07:01:47

Ouch indeed... I wonder: Is it possible to use hosted MacOs to make these builds? Or does AAPL demand some sort of user account tied to developer-owned device/hardware?

bru09:01:57

I never tried, but hosted "should" work: what rules is the developer's apple-id which is tied to all the bureaucratic paraphernalia (certs, keys, etc.)

vlaaad12:01:38

Maybe you could use some free github actions macos runner to notarize your dmg app?

Martynas Maciulevičius13:01:08

What do you think about not providing your software to them? 😄 They don't pay you for it anyway... why should you pay them? You're solving their problems and now you have to... pay for it. It seems like the community is somebody who is offered mercy by this company. Is it really this way? Maybe it's a message that they don't really want you there? I get it that you could probably hack your way out of it. But once they start seeing that somebody hacked their payment model... why not stop before it happens? You could say "Hey, apple didn't want to have me so my builds are signed only by my own key, sorry; This is my own key which you can use to verify the integrity on your own if you trust me; You could instead pay me $5 to download cowsay with correct signature on it"

mauricio.szabo14:01:30

The problem, @U47G49KHQ, is not the "process" of signing, but the fact that only if I pay $99 per year to have a certificate users' can install the app without any issue. I am not aware if I can simply not pay and users can at least install the app - it doesn't seem to be the case with Silicon macs anymore.

borkdude14:01:36

@U3Y18N0UC you can initially ask people to do this:

sudo xattr -r -d com.apple.quarantine 
and just not sign, until you figure it out or someone with an apple accounts volunteers

adi14:01:01

> only if I pay $99 per year to have a certificate users' can install the app without any issue Oh, that's a bummer. Walled gardens :face_with_rolling_eyes:

adi14:01:54

Presumably it is not an option to ship a standalone binary (hugo-like)?

mauricio.szabo14:01:15

@U04V15CAJ yes, that's what we've been telling users to do. Most of them don't read though laughcry

laughcry 2
mauricio.szabo14:01:17

@U051MHSEK it's for Pulsar (Atom fork), we're lucky we even were able to build a native Silicon Mac DMG 😄.

hidethepain 2
mauricio.szabo14:01:08

Now, what makes me mad is: why is this acceptable? I mean, for Intel macs it was a popup saying "Apple could not verify the identity of this file, it might be dangerous" etc etc... Silicon straight up says "This app is corrupted, you should move it to trash" unless you run that xattr command...

myguidingstar20:01:50

is distributing via homebrew or nixpkgs a viable option for your case? @U3Y18N0UC

borkdude20:01:20

perhaps as a brew cask

borkdude20:01:26

which is intended for ui things

mauricio.szabo20:01:30

@U0E2YV1UZ actually yes, it is 🙂

😄 2
mauricio.szabo02:01:12

So, is there a way to avoid $99 per year if I choose to distribute over homebrew?

adi06:01:38

I'd be surprised if a large loophole like that existed. I suppose the $99/year participation tax is Apple's way of saying "talk to us only if you're serious, where serious means business not fun not open source not playful creativity".

adi06:01:48

> it's for Pulsar (Atom fork) rad! :spock-hand:

Martynas Maciulevičius09:01:49

Let me correct your thought a little bit: "talk to us only if you're serious, community work isn't something serious" Also this: https://abopen.com/news/european-commission-report-declares-open-source-software-and-hardware-to-be-a-public-good/

lilactown23:01:56

seems like a good thing to solicit donations for

4