Search found 204 matches

by ReFreezed
Sat Nov 14, 2020 11:55 am
Forum: Support and Development
Topic: Scaling and scaling xy values?
Replies: 3
Views: 1633

Re: Scaling and scaling xy values?

The default program loop (love.run) resets the coordinate system (with love.graphics.origin) each frame, so your love.graphics.scale() in love.load() doesn't actually affect any drawing operations. You should call love.graphics.scale() right before drawing, together with what norubal said.
by ReFreezed
Mon Nov 09, 2020 9:16 am
Forum: Support and Development
Topic: Cannot print() from lua code to windows 10 powershell
Replies: 3
Views: 2017

Re: Cannot print() from lua code to windows 10 powershell

What exactly are you trying to do? PowerShell is just a command line tool - you don't print "to" it. If you just want to see the output of your program in a console window, run lovec.exe instead of love.exe (the former being the console version of LÖVE - in Windows there's a distinction between cons...
by ReFreezed
Sat Oct 24, 2020 6:31 pm
Forum: Support and Development
Topic: simple particle question
Replies: 7
Views: 2844

Re: simple particle question

However, what if the object, in this matter is a ball that is a rectangle drawn with love.graphics.newRectangle rather than a sprite/img, how can I feed Particle System to use that data? In my example, it's the particles that use the image - not the player/ball/whatever. Anyway, just replace player...
by ReFreezed
Fri Oct 23, 2020 11:34 pm
Forum: Support and Development
Topic: simple particle question
Replies: 7
Views: 2844

Re: simple particle question

This can easily be achieved with LÖVE's built-in particle system functionality. local playerX = 300 local playerY = 300 local particleSystem function love.load() -- Create a simple image with a single white pixel to use for the particles. -- We could load an image from the hard drive but this is jus...
by ReFreezed
Mon Oct 19, 2020 12:41 am
Forum: General
Topic: Optimization entry in wiki
Replies: 4
Views: 3555

Re: Optimization entry in wiki

I don't think that page has any serious problems. Using locals is generally faster than having table lookups. I did a little testing too and my results regarding math.sin is similar to yours, i.e. it doesn't seem to matter if 'sin' is local or not - it's basically the same speed. It might have somet...
by ReFreezed
Fri Oct 09, 2020 12:18 pm
Forum: Support and Development
Topic: Created .exe, when running .exe error unable to load audio file
Replies: 26
Views: 6531

Re: Created .exe, when running .exe error unable to load audio file

Make sure the audio files are in the .love file. All files for your game, except the .dll files, should be in the .love file.
by ReFreezed
Sat Oct 03, 2020 4:05 pm
Forum: Support and Development
Topic: How to move a part of a canvas
Replies: 4
Views: 1698

Re: How to move a part of a canvas

Just draw 'image' to different coordinates?

Code: Select all

canvas:renderTo(function()
	love.graphics.draw(image, 100, 100)
end)
by ReFreezed
Mon Sep 28, 2020 1:21 am
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 25
Views: 21069

Re: LuaPreprocess

I know what you mean, but unlike C/C++ there's only one language here. There are other preprocessors for Lua that has like a separate language for the "metaprogram" but that is something I specifically wanted to avoid. It's all Lua here. Another difference to C/C++ is that actual human-readable Lua ...
by ReFreezed
Sun Sep 27, 2020 2:41 pm
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 25
Views: 21069

Re: LuaPreprocess

@ivan I don't agree that unnecessary complexity is being added. I've used the library in multiple projects now and I've found that it makes a bunch of different tasks easier to do, and other tasks that weren't even possible before now becoming possible, without saying anything specific. (That exampl...
by ReFreezed
Sat Sep 26, 2020 11:35 pm
Forum: Libraries and Tools
Topic: LuaPreprocess
Replies: 25
Views: 21069

Re: LuaPreprocess

Update 1.11.1 Changes since 1.11: Library: Huge numbers are now outputted as '1/0' instead of 'math.huge'. Fixed newToken("pp_keyword",...) not accepting all preprocessor keywords. Better error message for unescaped newlines in string literals. Other: Preprocess.cmd returns %ERRORLEVEL%. ---- More ...