Search found 1027 matches

by tentus
Thu Mar 15, 2018 1:09 pm
Forum: Support and Development
Topic: What gives with character support in L2D? [SOLVED]
Replies: 32
Views: 3621

Re: What gives with character support in L2D? [SOLVED]

I suspect part of the reason there is not a fallback system is that the dev team doesn't want to open the support floodgates with this. Not to put words in their mouths, of course, but I certainly wouldn't want to deal with constant questions about "my text looks fine on this windows but my friend o...
by tentus
Wed Mar 14, 2018 9:37 pm
Forum: Support and Development
Topic: Change default font?
Replies: 6
Views: 877

Re: Change default font?

Is there no way to select a font using the functions for custom fonts? Even selecting a font by name that is already in the system? Seems weird not to have it. If you can't choose then what in fact is the font normally used by default? As far as I can see it's Vera: https://bitbucket.org/rude/love/...
by tentus
Sun Mar 11, 2018 7:32 pm
Forum: Support and Development
Topic: Change default font?
Replies: 6
Views: 877

Re: Change default font?

The cross-section of universally available fonts is laughable, so you're best off distributing your fonts with your project. For some code examples to get you going, probably start here:
https://love2d.org/wiki/love.graphics.newFont
by tentus
Sat Mar 10, 2018 7:50 pm
Forum: General
Topic: LOVE users map
Replies: 182
Views: 34073

Re: LOVE users map

Charlottesville, Virginia, USA
by tentus
Thu Mar 08, 2018 11:07 pm
Forum: Support and Development
Topic: Best way to index out-of-bounds?
Replies: 8
Views: 774

Re: Best way to index out-of-bounds?

In my last game I used the first tile of the map as a default, and drew a screen-sized spritebatch of it underneath the map, modulo'd to the same partial tile offset as the player. What this mean was that even we were looking over the edge of the map (or even if the map had partially transparent til...
by tentus
Wed May 02, 2012 5:09 pm
Forum: Support and Development
Topic: Math: Get Just the Sign
Replies: 3
Views: 1696

Math: Get Just the Sign

You know how math.abs returns a variable, sans its sign? Does anyone there a neat trick for doing the opposite, short of using the below:

Code: Select all

function sign(x)
  if x < 0 then
    return -1
  end
  return 1
end
(And before anyone suggests it, we do not want 0.)
by tentus
Fri Apr 27, 2012 3:12 pm
Forum: Support and Development
Topic: "Adding" a number to an variable
Replies: 12
Views: 2528

Re: "Adding" a number to an variable

It's very marginally faster to do the concat way (100,000 reps each comes to .066 seconds for the multiply and add, while it only took .044 for the concat). But beyond that I dunno. Source: function love.load() x = 0 sx = love.timer.getTime() for i=1,100000 do x = (x * 10) + 1 end ex = love.timer.ge...
by tentus
Wed Apr 25, 2012 11:54 pm
Forum: Support and Development
Topic: "Adding" a number to an variable
Replies: 12
Views: 2528

Re: "Adding" a number to an variable

You mean like this?

Code: Select all

function love.load()
	x = 0
end
function love.draw()
  love.graphics.print(x, 5, 5) 
end
function love.keyreleased(key)
	if tonumber(key) then
		x = (x * 10) + tonumber(key)
	end
end
by tentus
Mon Apr 23, 2012 2:39 am
Forum: Support and Development
Topic: Merging Physics Objects
Replies: 8
Views: 1695

Re: Merging Physics Objects

Edit 2: Solved the problem by changing the following line in love.draw: love.graphics.circle("fill", ball.body:getX(), ball.body:getY(), ball.shape:getRadius()) To this: love.graphics.circle("fill", ball.body:getX(), ball.body:getY(), ball.fixture:getShape():getRadius()) Wow, that is... not lovely....
by tentus
Sun Apr 22, 2012 2:10 pm
Forum: Support and Development
Topic: Not equals to (number to number)
Replies: 7
Views: 2763

Re: Not equals to (number to number)

mickeyjm wrote: Wont that be trur if x is larger than 16 OR less than 20 meaning that anything would return true
Eg. 5<20 therefore continue if statement
True.