Skip to main content
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"
Antoine Thiry's user avatar
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 ...
Maximus Minimus's user avatar
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: ...
M. Angler's user avatar
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 ...
huseyin tugrul buyukisik's user avatar
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 -...
DavidT's user avatar
  • 853
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&...
liggiorgio's user avatar
  • 5,544
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 ...
Pikalek's user avatar
  • 13.4k
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 ...
Adam L.'s user avatar
  • 41
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 ...
medecau's user avatar
  • 36
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 ...
Mark's user avatar
  • 352
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 ...
ScienceSnake's user avatar
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.
Emily's user avatar
  • 111
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 ...
steVeRoll's user avatar
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 ...
idbrii's user avatar
  • 1,088
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 ...
Alexis Purslane's user avatar
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. ...
Unspecified's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible