Search found 3550 matches

by pgimeno
Fri Dec 20, 2019 4:05 pm
Forum: Support and Development
Topic: Help to create enemies
Replies: 5
Views: 5421

Re: Help to create enemies

That question is pretty broad. "Follow you" can be as simple as go straight towards you as in Drazzard https://love2d.org/forums/viewtopic.php?f=14&t=80655, or as complex as using a path finding algorithm, which is an advanced topic for which a good understanding of graph theory and re...
by pgimeno
Fri Dec 20, 2019 3:53 pm
Forum: Support and Development
Topic: Mobile scaling
Replies: 5
Views: 4023

Re: Mobile scaling

In 0.10.x you need to scale manually, using love.window.getPixelScale() for the scaling factor.

In 11.x, scaling is handled automatically, and getPixelScale has been renamed to getDPIScale.
by pgimeno
Thu Dec 19, 2019 9:29 pm
Forum: Support and Development
Topic: How to use the texure's Wrap Modes?
Replies: 5
Views: 4291

Re: How to use the texure's Wrap Modes?

I don't know what size your image is. If your image is bigger than 161x218, the wrap won't work. See attached example. A sprite batch can be drawn at any size, see love.draw . Anyway, you need to add the image to the sprite batch multiple times at multiple positions, not just one. The sprite batch i...
by pgimeno
Thu Dec 19, 2019 7:59 pm
Forum: Support and Development
Topic: How to use the texure's Wrap Modes?
Replies: 5
Views: 4291

Re: How to use the texure's Wrap Modes?

Wrapping only works for full-size images, not for quads from an image atlas. You need to create a quad bigger than the image, and it will repeat. If that's not suitable to your purpose, you can still use a spritebatch, or draw all images in a row to rely on autobatching (if you're using Löve 11.0 or...
by pgimeno
Thu Dec 19, 2019 2:22 am
Forum: Games and Creations
Topic: SolfeGuido
Replies: 2
Views: 4521

Re: SolfeGuido

Great! Wish I had this when I learned. Also, nice polish.

In my desktop I miss the possibility of being able to use the keyboard as a piano: QWERTYU -> CDEFGAB.
by pgimeno
Wed Dec 18, 2019 1:24 am
Forum: Support and Development
Topic: Why does flipping on y axis (using y scaling) cause a shift up in location?
Replies: 3
Views: 3546

Re: Why does flipping on y axis (using y scaling) cause a shift up in location?

Scaling also has a centre. The default origin of the image is (0, 0) which is the top left, therefore when you scale, the scaling operation takes the top left as the scaling centre. You can change the centre by manipulating the ox, oy parameters in love.draw. Setting them to the bottom left of the i...
by pgimeno
Mon Dec 16, 2019 10:03 pm
Forum: General
Topic: Rounding mode
Replies: 11
Views: 10934

Re: Rounding mode

I just want to be able to rely on the use of a certain rounding mode, nothing else. See the above SO post for an example of its usefulness. I don't want to change the rounding mode from Lua, I'm asking for the engine to enable it. Oh, that. Well AFAIK there's no way to do this from plain Lua because...
by pgimeno
Mon Dec 16, 2019 4:20 pm
Forum: General
Topic: Rounding mode
Replies: 11
Views: 10934

Re: Rounding mode

Are you talking about Lua or GL? In Lua there's no rounding, only flooring and ceiling. I'm talking about Lua. Lua floating-point operations are subject to rounding. See e.g. https://stackoverflow.com/questions/18313171/lua-rounding-numbers-and-then-truncate#58411671 What I'm seeking is for Löve to...
by pgimeno
Mon Dec 16, 2019 12:59 pm
Forum: General
Topic: Rounding mode
Replies: 11
Views: 10934

Rounding mode

Is the rounding mode guaranteed to be round-to-nearest in all platforms?

If not, could the engine please set it explicitly to FE_TONEAREST?
by pgimeno
Mon Dec 16, 2019 12:34 pm
Forum: Support and Development
Topic: Can't start the simple script
Replies: 3
Views: 4440

Re: Can't start the simple script

My suspicion is that LÖVE is being started passing the full path of the Lua file, instead of the folder where main.lua is as it should.