Search found 124 matches

by Nelvin
Tue May 07, 2019 8:09 pm
Forum: Support and Development
Topic: random number without duplicate [SOLVED]
Replies: 6
Views: 4136

Re: random number without duplicate

Most simple/pragmatic solution

Code: Select all

local x = love.math.random(1, 4)
local y = love.math.random(1, 3)
if x == y then y = y + 1 end
by Nelvin
Mon Apr 29, 2019 2:13 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1503104

Re: What's everyone working on? (tigsource inspired)

Last week, our "team" (we're just two) met physically for the first time as we live about 600km away from each other. Had a great and pretty productive week. One of the features we worked on, were trees/forest tiles. Now our forest tiles are implemented as a randomized layer of trees (rand...
by Nelvin
Sun Apr 21, 2019 3:56 pm
Forum: General
Topic: Depth buffer and slanted sprites?
Replies: 14
Views: 16264

Re: Depth buffer and slanted sprites?

Thanks for the discard tip and sample. I know the issues with alphablending. CPU sorting in simple samples is of course easy but it is a much bigger problem and a performance issue in my case as it's a isometric game with a typical view of at least a few 1000 of tiles/objects and potentially hundred...
by Nelvin
Sun Apr 21, 2019 8:14 am
Forum: General
Topic: Depth buffer and slanted sprites?
Replies: 14
Views: 16264

Re: Depth buffer and slanted sprites?

Is there actually a way to handle alpha (well at least fully opaque/transparent pixels) in combination with the depth buffer, i.e. is there an option to only write to the depth buffer if a pixel is opaque? This would allow to render sprites out of order and doing so, improve batching a lot in games ...
by Nelvin
Thu Apr 04, 2019 7:38 pm
Forum: General
Topic: Game like Overwhelm
Replies: 11
Views: 16169

Re: Game like Overwhelm

No idea how they did it, but Tiled (https://www.mapeditor.org/) is always a decent option.
by Nelvin
Fri Mar 15, 2019 9:52 am
Forum: Games and Creations
Topic: Get mouse coordinates on a rotated "grid"
Replies: 15
Views: 22264

Re: Get mouse coordinates on a rotated "grid"

Hm so far haven't used it (my game is built using 0.10.2) but I've just tried a small hacky version and it seems to work as expected. See the .love file attached. It works both, using the transform object and the helper function of love.graphics. The one in love.graphics obviously only as long as it...
by Nelvin
Tue Mar 05, 2019 10:05 am
Forum: Support and Development
Topic: problem when cheking if somethings true (making powerup)
Replies: 3
Views: 3397

Re: problem when cheking if somethings true (making powerup)

It's just a minor logic issue. First thing you do, when you reach the powerup, is to activate and move it, whether it's currently active or not so the second codeblock to deactivate the powerup never has a chance to be executed. Removing a bit of redundancy in the code may help to make it simpler to...
by Nelvin
Mon Feb 25, 2019 6:50 am
Forum: Libraries and Tools
Topic: Luven - Minimalist light engine
Replies: 29
Views: 52779

Re: Luven - Minimalist light engine

Scaling the lightmaps width/height to 10% in this sample still does not look that bad and the number of pixels of the canvas was reduced by 99%, i.e. the update of the lightmap itself consumes very little bandwidth on the GPU. I tried to implement your idea of scaling but with, on top of that, a ca...
by Nelvin
Sun Feb 24, 2019 11:56 am
Forum: Libraries and Tools
Topic: Luven - Minimalist light engine
Replies: 29
Views: 52779

Re: Luven - Minimalist light engine

What I meant was a canvas of a size that's enough for your requirements, whatever that means depends on the game. I've just added the changes to grumps sample to show what I mean. local lg = love.graphics local gradient = love.image.newImageData(128, 128) gradient:mapPixel(function(x, y) local c = 1...