5
votes
Accepted
Love2D game and editor in two separate programs
Alright, found it !
I had to add this to the main.lua file in the editor folder and it worked :
package.path = package.path .. ";../?.lua"
require "core.engine"
4
votes
Accepted
Are there any practical applications for clearing the screen with a specific color?
Clearing the color buffer can be optional. For example, if you know that you're going to overwrite every pixel each frame, then you might decide to not clear at all. On the other hand, some drivers ...
3
votes
Create a game start-up menu screen with Lua/love 2d
There isn't a built-in menu system for love2d. The developers take a 'do-it-yourself' approach to a lot of such things.
Here's an example of how I ended up rigging my menu for my first time:
...
3
votes
Optimizing falling sand simulation
This is how I parallelized falling sand:
The screen is divided into cells, 1 per pixel
The first kernel computes the direction each sand cell wants to go. Let's call this "push".
The second ...
3
votes
Accepted
What does the phrase "Kinematic bodies do not collide with other kinematic or static bodies" mean?
Charanor's answer to your previous question already covered this point
https://gamedev.stackexchange.com/a/212552/174134
However for clarity in the video (you cited above):
Dynamic - Green
Kinematic -...
2
votes
How to express parabolic motion using delta time?
Disclaimer: You asked many different questions at once, which made your post too broad. Since this site is about making games, and parabolic motion in games is "objects falling due to gravity&...
2
votes
Accepted
Why check the ball and brick collision twice?
The double check aspect of the code is discussed at this point in the video.
The first check lets you know that some sort of collision occurred. However, in order to bounce the ball correctly, you ...
2
votes
How to deal with rapid acceleration/deceleration from physics forces?
in case anyone's curious, I think I figured it out. I calculated a "terminal velocity" for a given engineForce, that is the speed where drag and the engine would balance out (in this case ...
2
votes
Accepted
Drawing rectangle with line's causes join artifact with the graphics api
You are drawing independent and unconnected lines.
What you probably want is a polyline.
You can get a polyline by passing in more than two points to the line ...
1
vote
Implementing framerate independent friction with linear deceleration
The problem you're running into is that you're performing numeric integration with a varying step size. In all but the simplest case (movement at a constant speed), this produces results that vary ...
1
vote
Accepted
How to make object that moves with constant speed not overshoot the object it collides with?
At the moment you are checking for a collision between where the player is now and the goal square. Instead, you can define a rectangle which goes from where the player was last frame and where he is ...
1
vote
Is there a way to set a shader define in Löve?
No, there is no way to do that. However, you can prepend a #define macro to the shader code when creating the shader.
1
vote
Is there a way to set a shader define in Löve?
Shaders don't really work that way. Once the shader is compiled, any instance of the name you defined will be replaced with its value. If you want something that changes throughout your program, use a ...
1
vote
How can I properly render multiple layers/components in game?
My first idea was to create a screen/gamestate for each of these components, and stack them on top of each other so each is running/displaying at the same time. This feels like it's not a very proper ...
1
vote
Love2D STI library not drawing map at all (black screen)
I realized you need to be careful exporting lua maps from Tiled, because they are automatically named like "[your map name]..lua". I'm not sure why this is, but when I did Export As instead and named ...
1
vote
Love2D how to zoom out map?
This code just uses individual tile images that must each be 100x100 px. The zoom still needs a bit of tweaking.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
love2d × 75lua × 53
physics × 10
collision-detection × 9
box2d × 9
2d × 5
tilemap × 4
architecture × 3
optimization × 3
image × 3
noise × 3
shaders × 2
mathematics × 2
algorithm × 2
sprites × 2
graphics × 2
tiles × 2
pygame × 2
collision-resolution × 2
entity-system × 2
heightmap × 2
spritebatch × 2
tiled × 2
opengl × 1
android × 1