Search found 1184 matches
- Tue Mar 12, 2024 6:26 am
- Forum: General
- Topic: Gradients (gradient as fill)
- Replies: 10
- Views: 3966
Re: Gradients (gradient as fill)
Hi, I have searched forums extensively as well as Stack Overflow to find out how to approach gradient drawing. I mostly need it for polygons at the moment, but I am sure it would be useful to have it for any shape. I know there was a discussion regarding this and the best method so far is to use a ...
- Sun Mar 10, 2024 5:27 pm
- Forum: General
- Topic: Code Doodles!
- Replies: 197
- Views: 277175
Re: Code Doodles!
Communique Quilts - https://www.google.com/search?q=Communique+Quilts&tbm=isch Examples to usage: city map; levels, that are more than one screen wide and/or more than one screen tall. love.window.setMode(1280, 800) -- Steam Deck resolution local function updatePatches () local index = math.rand...
- Sat Mar 09, 2024 9:18 pm
- Forum: General
- Topic: Code Doodles!
- Replies: 197
- Views: 277175
Re: Code Doodles!
First version of patchwork algorithm, it has gabs, but still good for using: Communique Quilts on pinterest: https://www.pinterest.de/search/pins/?q=Communique%20Quilts&rs=typed love.window.setMode(1280, 800) local function updatePatches () local index = math.random(#queue) local point = table.r...
- Mon Mar 04, 2024 9:16 am
- Forum: General
- Topic: help with snake game lua
- Replies: 8
- Views: 2669
Re: help with snake game lua
It's my old code : -- License CC0 (Creative Commons license) (c) darkfrei, 2022 UP, RIGHT, DOWN, LEFT = 1, 2, 3, 4 UpdateTime=0.200 Timer = 0 GridSize = 30 GridWidth, GridHeight = 20, 10 local directions = { [UP] = {x= 0, y=-1}, [RIGHT] = {x= 1, y= 0}, [DOWN] = {x= 0, y= 1}, [LEFT] = {x=-1, y= 0}, ...
- Fri Mar 01, 2024 8:56 am
- Forum: Support and Development
- Topic: 2.5D effect?
- Replies: 3
- Views: 2078
Re: 2.5D effect?
Pretty simple 2,5D: viewtopic.php?f=3&t=93766
- Thu Feb 29, 2024 1:41 pm
- Forum: General
- Topic: help with snake game lua
- Replies: 8
- Views: 2669
Re: help with snake game lua
I think that the code must be easier to calculate step as just 1 and just make it bigger in the love.draw() by scaling or multiplying by gridSize.
- Thu Feb 29, 2024 1:03 pm
- Forum: General
- Topic: help with snake game lua
- Replies: 8
- Views: 2669
Re: help with snake game lua
is it also a possible issue with my checkcollision code? can i send you it and you can let me know if it looks right or the full code if you need context? For the snake game will be enough to use grid as: grid={ {1,1,1,1,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,0,0,0,1}, {1,1,1,1,1}, } and you can check va...
- Thu Feb 29, 2024 12:08 pm
- Forum: General
- Topic: help with snake game lua
- Replies: 8
- Views: 2669
Re: help with snake game lua
I am currently having issues with my code as when i run it and play my snake game, the snake goes through the food without eating it and the score does not go up, anyone willing to help that may have a solution to this? Main logic must be: x, y = getNextPosition (headPosition, headDirection) if isW...
- Wed Feb 28, 2024 11:21 am
- Forum: Support and Development
- Topic: Finding which object in the table is closest
- Replies: 5
- Views: 2295
Re: Finding which object in the table is closest
Just sort table with special comparing function that compares square distances?
- Mon Feb 26, 2024 11:15 am
- Forum: Support and Development
- Topic: Trying to figure out collision with tiles in platformer game
- Replies: 11
- Views: 2255
Re: Trying to figure out collision with tiles in platformer game
Thanks! I'll keep it in mind to not fret too much over optimization at this stage! I got something sort of working now. It's still a bit wonky but at least going in the right direction now. I ended up checking the direction of the player velocity and then test the closest two tiles towards that dir...