Search found 14 matches

by Charlie Gallie
Mon Jul 06, 2020 10:38 pm
Forum: Support and Development
Topic: How to detect a collision between two points in an array and a rotating line?
Replies: 2
Views: 2200

Re: How to detect a collision between two points in an array and a rotating line?

A line can be described as "y * sin(a) + x * cos(a) - p = 0". If the line goes through the origin, you can ignore the "-p". If you know the angle (a), just fill in the x value from your point, then solve for y (or vice versa). y = (x * cos(a)) / (- sin(a)) If y is close to your ...
by Charlie Gallie
Sat Jul 04, 2020 10:49 pm
Forum: Support and Development
Topic: How to detect a collision between two points in an array and a rotating line?
Replies: 2
Views: 2200

How to detect a collision between two points in an array and a rotating line?

Hey, I'm just wondering how I could go about detecting the collision between a line and set of two points within an array/table. I say array/table because honestly I'm not sure what the correct terms are. Once the line and point intersects, I'd like it to return the X and Y position of the point. De...
by Charlie Gallie
Sat Jul 04, 2020 9:05 pm
Forum: Support and Development
Topic: Drawing a line where a circle goes
Replies: 3
Views: 4274

Re: Drawing a line where a circle goes

raidho36 wrote: Wed May 29, 2019 9:28 pm Record positions of the circle in all relevant moments, then draw short lines through all of these points consecutively.
Damn I've not logged in for ages but I think it's still worth saying thank you for your suggestion. That'd work perfectly.
by Charlie Gallie
Wed May 29, 2019 7:49 pm
Forum: Support and Development
Topic: Drawing a line where a circle goes
Replies: 3
Views: 4274

Drawing a line where a circle goes

Hello, I was just wondering, how would I go about drawing a line where a circle has already been, a bit this picture of where the ISS has been. I've attached a copy of the code. I also feel obligated to tell you that this isn't my code, which is also part of the reason I don't know how to do this. I...
by Charlie Gallie
Thu Feb 21, 2019 10:05 pm
Forum: Support and Development
Topic: [SOLVED cause im stupid] I don't even know what to title this, sorry.
Replies: 2
Views: 3419

Re: I don't even know what to title this, sorry.

I think you might mean: if key == 'escape' then if escKey == 0 then escKey = 1 music:pause() bgm:play() love.mouse.setVisible(true) --PAUSE THE GAME else escKey = 0 music:resume() love.audio.stop(bgm) love.mouse.setVisible(false) --CONTINUE THE GAME end end Thank you very much sir! Wow, what takes ...
by Charlie Gallie
Thu Feb 21, 2019 9:28 pm
Forum: Support and Development
Topic: [SOLVED cause im stupid] I don't even know what to title this, sorry.
Replies: 2
Views: 3419

[SOLVED cause im stupid] I don't even know what to title this, sorry.

I have an extremely strange issue which I haven't been able to solve for about two weeks now. I have 6 .lua files, each a different screen for parts of my game. When I get moved to deathScreen.lua (which is normal) and press any key, my music goes silent (not normal). I do have other files and I'll ...
by Charlie Gallie
Thu Feb 21, 2019 4:59 pm
Forum: Support and Development
Topic: Opposite colors to the background
Replies: 10
Views: 7422

Re: Opposite colors to the background

Yep, would be nice if these would be options; not sure whether GL and GL ES version intercompatibility is the barrier to this or not though. https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBlendFuncSeparate.xml https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBlendEquat...
by Charlie Gallie
Thu Feb 21, 2019 2:41 pm
Forum: Support and Development
Topic: Opposite colors to the background
Replies: 10
Views: 7422

Re: Opposite colors to the background

An 'invert' blendmode would be useful to have. This is by far the easiest way to do it and it doesn't require shaders. It should be possible using the "subtract" blend mode but I've never been able to get it working in Love2D. Yeah, but the code he's given me works perfectly for what I ne...
by Charlie Gallie
Thu Feb 21, 2019 1:15 pm
Forum: Libraries and Tools
Topic: 3D engine
Replies: 23
Views: 23038

Re: 3D engine

zorg wrote: Thu Feb 21, 2019 7:44 am
Charlie Gallie wrote: Thu Feb 21, 2019 3:35 am ...
Please don't necro old threads, 2011 was 8 years ago.
Why does it matter when I reply? I'm just quoting my thoughts, I don't see the problem.
by Charlie Gallie
Thu Feb 21, 2019 1:13 pm
Forum: Support and Development
Topic: Opposite colors to the background
Replies: 10
Views: 7422

Re: Opposite colors to the background

Edit: Oops, ninja'd by grump :nyu: You need a shader. If your background is not an image, you also need a canvas where you draw the background. The shader would be like this: local shader = love.graphics.newShader[[ extern Image background; vec4 effect(vec4 colour, Image texture, vec2 texpos, vec2 ...