Search found 36 matches

by Eglaios
Wed Oct 06, 2021 10:55 pm
Forum: Support and Development
Topic: Any subset sum calculator that considers multiplication? [clarified]
Replies: 5
Views: 2499

Re: Any subset sub calculator that considers multiplication?

One way to understand it is similar to a TV contest where contestants need to get as close as possible to a given number, by using only a set of numbers and using the four classic arithmetic operators on them Uuuh actually you're pretty close... I'm playing on a minecraft server (shame on me :ehem:...
by Eglaios
Wed Oct 06, 2021 10:09 pm
Forum: Support and Development
Topic: Any subset sum calculator that considers multiplication? [clarified]
Replies: 5
Views: 2499

Re: Any subset sub calculator that considers multiplication? [clarified]

Edited, I sure should have been more precise... Sorry...
by Eglaios
Wed Oct 06, 2021 7:50 pm
Forum: Support and Development
Topic: Any subset sum calculator that considers multiplication? [clarified]
Replies: 5
Views: 2499

Any subset sum calculator that considers multiplication? [clarified]

I'm searching for some code that would allow me to do the following : (it's just for myself to check values, I only need to use this alone) [EDIT] Rules : 1. User inputs an array of @numbers, and a @goal 2. The code searches for sums of @numbers that would match @goal value, following these rules : ...
by Eglaios
Wed Oct 06, 2021 5:13 pm
Forum: Support and Development
Topic: Function to find these 4 points? (simple math problem)
Replies: 9
Views: 3164

Re: Function to find these 4 points? (simple math problem)

for i = 1, 4 do point.x, point.y = -50*math.cos(i*math.pi/2), 50*math.sin(i*math.pi/2) point.otherData = [...] table.insert(points, point) end Looks perfect for me! All the operations are written next to x and y without touching the loop :awesome: But positive y is bottom, not at the top. I actuall...
by Eglaios
Wed Oct 06, 2021 5:00 pm
Forum: Support and Development
Topic: What sites do you recommend for hosting your screenshots and game? [RESOLVED]
Replies: 13
Views: 6284

Re: What sites do you recommend for hosting your screenshots and game?

ImageBB urls don't directly link to the images.
You have to get on your image's page, then "open the image in a new tab".
If there's the file extension at the end of the url, then this is the right one.
by Eglaios
Wed Oct 06, 2021 9:20 am
Forum: Support and Development
Topic: Function to find these 4 points? (simple math problem)
Replies: 9
Views: 3164

Re: Function to find these 4 points? (simple math problem)

Are you planning to add more points later? These are particles, and the full loop looks like this : function particleEvent(x,y) for i=1, 4 do table.insert(particles,{ posX = x + (50*i-150)%100, posY = y + (50*i-100)%100, particleData = ..., particleData2 = ..., etc. }) end end I could simply have d...
by Eglaios
Wed Oct 06, 2021 6:00 am
Forum: Support and Development
Topic: Function to find these 4 points? (simple math problem)
Replies: 9
Views: 3164

Function to find these 4 points? (simple math problem)

I have a point A (x,y), and want to generate 4 points around, like this : https://i.ibb.co/NLR9Jm1/prob.png (A here is [0,0], but could have different coords) I want to generate them from a for() loop into a table, so it would look like this : function genPoints(x,y) --Coords of A local points = {} ...
by Eglaios
Tue Oct 05, 2021 6:42 am
Forum: Support and Development
Topic: What's best to keep a value for only 1 frame?
Replies: 2
Views: 2274

Re: What's best to keep a value for only 1 frame?

zorg wrote: Tue Oct 05, 2021 5:43 am if you'd press multiple during one frame, only one of them would be saved.
Guess I'll use a table for that then... hopefuly, there're not many places in my game where I have to change this (so far...)
by Eglaios
Tue Oct 05, 2021 4:32 am
Forum: Support and Development
Topic: What's best to keep a value for only 1 frame?
Replies: 2
Views: 2274

What's best to keep a value for only 1 frame?

I'm storing keypresses detected from love.keypressed() into the var "KEY" (for other functions), but only need it for 1 frame, and so I added "KEY = nil" at the end of love.update. So, is it better to have "KEY = nil" there, or "if KEY then KEY = nil end"? Wou...
by Eglaios
Thu Sep 23, 2021 10:17 pm
Forum: Support and Development
Topic: Other ways than shaders for transparent color?
Replies: 5
Views: 2264

Re: Other ways than shaders for transparent color?

BrotSagtMist wrote: Thu Sep 23, 2021 10:11 pm It happens we just had that already too: https://love2d.org/forums/viewtopic.php?f=14&t=92033
Thank you for pointing it out, I didn't read that far into this...
Should I delete this topic, then?