I have this picture with this file:
https://github.com/darkfrei/love2d-lua- ... ut-03.love
Search found 1179 matches
- Fri Apr 28, 2023 2:51 pm
- Forum: Support and Development
- Topic: What's up with gamepad axes?
- Replies: 13
- Views: 2192
- Fri Apr 28, 2023 1:17 pm
- Forum: Support and Development
- Topic: How could I implement tilemap collisions for my platformer?
- Replies: 5
- Views: 746
Re: How could I implement tilemap collisions for my platformer?
Yes, you can change it as you will, but I've never used STI and cannot help you with it.
But this method works here: viewtopic.php?p=246641#p246641
- Fri Apr 28, 2023 11:21 am
- Forum: Support and Development
- Topic: How could I implement tilemap collisions for my platformer?
- Replies: 5
- Views: 746
Re: How could I implement tilemap collisions for my platformer?
It's just the collision layer value, the collision can be just be the 1 as wall or floor:
Code: Select all
if grid[gy][gx] == 1 then
return true -- collision
end
- Fri Apr 28, 2023 7:18 am
- Forum: Support and Development
- Topic: How could I implement tilemap collisions for my platformer?
- Replies: 5
- Views: 746
Re: How could I implement tilemap collisions for my platformer?
I found many tutorials relating to this topic but most of them had to deal with box2d and windfield. I heard I can implement this using a Grid but I am not familiar with this method at all. I don't plan to use box2d or windfield since I don't want realistic physics in my game, but I'm not sure what...
- Fri Apr 28, 2023 7:10 am
- Forum: Libraries and Tools
- Topic: Dithering with matrix
- Replies: 8
- Views: 6788
Re: Dithering with matrix
The gradient can be much smooth: function projectPointOnLineSegment(aX, aY, aZ, bX, bY, bZ, cX, cY, cZ) local dx, dy, dz = bX - aX, bY - aY, bZ - aZ local len2 = (dx*dx + dy*dy + dz*dz) if len2 == 0 then return 0 end local dot = (cX - aX)*dx + (cY - aY)*dy + (cZ - aZ)*dz local t = dot / len2^0.5 -- ...
- Fri Apr 28, 2023 6:50 am
- Forum: Libraries and Tools
- Topic: Dithering with matrix
- Replies: 8
- Views: 6788
Re: Dithering with matrix
The color dithering. 1. Find 2 nearest palette colors (point 1 and point 2) in 3D space to the current pixel color: function nearestColorIndex(r, g, b, palette) local firstIndex = 1 local secondIndex = 1 local min1 = math.huge local min2 = math.huge for index, color in ipairs(palette) do local dr = ...
- Tue Apr 25, 2023 10:10 am
- Forum: Libraries and Tools
- Topic: Pixelfont
- Replies: 1
- Views: 1794
Re: Pixelfont
The font with monowidth:
- Tue Apr 25, 2023 9:40 am
- Forum: Libraries and Tools
- Topic: Pixelfont
- Replies: 1
- Views: 1794
Pixelfont
Hi all! Here is a small tool to create ImageFont from given font: -- License CC0 (Creative Commons license) (c) darkfrei, 2023 love.window.setMode(2200, 200) function createFont (fontSize) local drawSeparator = function (x, h) love.graphics.setColor (1,0,1,1) love.graphics.setLineStyle( "rough&...
- Mon Apr 24, 2023 7:27 am
- Forum: Games and Creations
- Topic: Published: Formula Speed - tabletop car racing
- Replies: 6
- Views: 1255
Re: Published: Formula Speed - tabletop car racing
File FormulaSpeed.love Pressed "Restart career" error: Error race.lua:339: attempt to get length of global 'trackknowledge' (a nil value) Traceback race.lua:339: in function 'loadRaceTrack' race.lua:1744: in function 'update' main.lua:172: in function 'update' [C]: in function 'xpcall' 202...
- Thu Apr 20, 2023 3:22 pm
- Forum: Support and Development
- Topic: How can i draw a line in this [SOLVED]
- Replies: 3
- Views: 1780
Re: How can i draw a line in this
Just use the zig zag function function zigzag (t, p, a) p = p or 2 a = a or 1 return math.abs (t/p - math.floor (t/p - 0.5) -1) * 2*a end Where a is width or height without picture dimensions, p is period value, for example twice the a t is global time value The zigzag function generates a zigzaggin...