Search found 119 matches

by steVeRoll
Fri Oct 23, 2020 10:37 am
Forum: Support and Development
Topic: Using a string with variables such as string = "5a+9b"
Replies: 3
Views: 107

Re: Using a string with variables such as string = "5a+9b"

Yes, this is possible using Lua's loadstring function, although it would require a bit more work with function environments and such...
What exactly do you want to achieve with this?
by steVeRoll
Sun Oct 04, 2020 2:21 pm
Forum: Support and Development
Topic: How to move a part of a canvas
Replies: 4
Views: 484

Re: How to move a part of a canvas

Then clear the canvas and redraw it, with the image in the new coordinates.
by steVeRoll
Sat Aug 22, 2020 8:44 pm
Forum: General
Topic: How to get the size of rendered text?
Replies: 1
Views: 2648

Re: How to get the size of rendered text?

If you use love.graphics.print You can use Font:getHeight to get the height of a single line, and Font:getWidth together with the text you're printing to get its width (wrapping isn't taken into account). ‎ If you use Text objects (recommended) Use Text:getWidth and Text:getHeight .
by steVeRoll
Tue Jul 21, 2020 11:26 am
Forum: Games and Creations
Topic: H0ard3() Rel0aded - a hectic top-down shooter
Replies: 5
Views: 3817

Re: H0ard3() Rel0aded - a hectic top-down shooter

A very fun game! Sadly, I got this error in the middle of gameplay: Error bin/enemies.lua:350: attempt to index a nil value Traceback bin/enemies.lua:350: in function 'getClosestEnemyDist' bin/enemies.lua:317: in function 'updateEnemies' main.lua:170: in function 'update' [C]: in function 'xpcall'
by steVeRoll
Thu Jun 18, 2020 3:57 pm
Forum: Support and Development
Topic: Can I use spritesheets with löve
Replies: 5
Views: 1706

Re: Can I use spritesheets with löve

zorg wrote:
Wed Jun 17, 2020 5:07 am
https://love2d.org/wiki/SpriteBatch <- This is what you want.
I think they meant sprite sheets, as in drawing parts of an image.

You can do just that using Quads. First, you create the quads, then you draw the original image with the quad as the second parameter.
by steVeRoll
Wed May 27, 2020 7:30 pm
Forum: General
Topic: Optikon: A WYSIWYG Level Designer for LÖVE
Replies: 22
Views: 14995

Re: Optikon: A WYSIWYG Level Designer for LÖVE

I don't think you should be calling this a "level designer." If anything, it should be called a game engine based on löve. 'Tiled', for example, is a general-purpose level editor because it eventually exports to level files, and the programmer can choose how to interpret the data in those files. Her...
by steVeRoll
Thu Apr 23, 2020 11:57 am
Forum: Support and Development
Topic: Do i need to learn lua before learning löve? Or can I learn it both at the same time?
Replies: 13
Views: 1959

Re: Do i need to learn lua before learning löve? Or can I learn it both at the same time?

The code you posted doesn't seem to have any syntax errors. The error was that love.audio.newSource expects a second argument, which is the source type ("static" or "stream"). In previous versions of love it defaulted to some value, but in the newer versions you have to specify it yourself (usually ...
by steVeRoll
Thu Apr 23, 2020 11:47 am
Forum: Support and Development
Topic: table wont work help me pls
Replies: 3
Views: 753

Re: table wont work help me pls

If you want a table to be an array, you don't define its entries with names (Block1, Block2) - just put them one after another. So, BlockTable should become this: local BlockTable = { { x = 181,width = 409,y = 220,height = 220}, { x = 9999,width = 9999,y = 462,height = 462}, { x = 9999,width = 9999,...
by steVeRoll
Wed Apr 22, 2020 12:05 pm
Forum: General
Topic: Is there a way to completly develop on Android ?(Tablet)
Replies: 4
Views: 1118

Re: Is there a way to completly develop on Android ?(Tablet)

running your game will be messy, because you will need to find the way to script it Actually, there is an easy way to run your game with the app. You can create a folder called "lovegame" in the root of your filesystem, and put main.lua and other files in there. The app will automatically launch ma...
by steVeRoll
Wed Apr 08, 2020 12:16 pm
Forum: General
Topic: Sprite pixel on the bottom left are glitched
Replies: 6
Views: 1799

Re: Sprite pixel on the bottom left are glitched

In your drawing code, try putting the coordinates in the math.floor function.

Also, in the future, please ask questions in the Support and Development forum.