Search found 439 matches

by Doctory
Mon Feb 18, 2019 11:15 am
Forum: Support and Development
Topic: Converting imageData:getPixel() numbers to the 0-255 range
Replies: 2
Views: 62

Re: Converting imageData:getPixel() numbers to the 0-255 range

grump wrote:
Mon Feb 18, 2019 10:15 am
-snip-
Cindy worked perfectly, thanks for the recommendation
by Doctory
Mon Feb 18, 2019 9:51 am
Forum: Support and Development
Topic: Converting imageData:getPixel() numbers to the 0-255 range
Replies: 2
Views: 62

Converting imageData:getPixel() numbers to the 0-255 range

So I recently came back to love after quite some time and decided to look at my old project. For some reason it didn't work and the culprit is imageData:getPixel() returning numbers from 0-1 instead of 0-255. This is a big deal because I created maps from reading image files and it depended on the c...
by Doctory
Sun Dec 11, 2016 5:26 pm
Forum: General
Topic: Your Love-ing Style
Replies: 16
Views: 4643

Re: Your Love-ing Style

I use Atom. Its a great editor and it is very customizable. I use gruvbox as the syntax theme and the Atom Material as the UI theme.
Image
by Doctory
Sun Nov 20, 2016 9:16 am
Forum: Support and Development
Topic: Finding out what tile is next to the player
Replies: 4
Views: 1448

Re: Finding out what tile is next to the player

Doctory, how about: local floor = math.floor local tilesize = painter.tilesize function painter.positionToTile(x, y) return floor(x/tilesize), floor(y/tilesize) -- no rounding -- return floor(x/tilesize + .5), floor(y/tilesize + .5) -- with rounding end function painter.tileToPosition(tx, ty) retur...
by Doctory
Sat Nov 19, 2016 7:06 pm
Forum: Support and Development
Topic: Finding out what tile is next to the player
Replies: 4
Views: 1448

Finding out what tile is next to the player

hello everyone, im having a problem figuring out what tile is next to player. i need to figure out if a tile right, left, up or down to the player is for ex. a wall or a water tile. ive tried everything i could think of but it just wont work. here is what im doing right now: for k, v in ipairs(paint...
by Doctory
Sat Nov 12, 2016 8:10 pm
Forum: Support and Development
Topic: dt is a table value?
Replies: 2
Views: 1125

Re: dt is a table value?

i cant even use the library i made properly, thanks for the help!
by Doctory
Sat Nov 12, 2016 7:47 pm
Forum: Support and Development
Topic: dt is a table value?
Replies: 2
Views: 1125

dt is a table value?

hello everyone,
im having a problem when trying to use dt to preform an arithmetic with it, but love throws an error on me saying its a table function:
Image

hope anyone here is able to fix it. thanks in advance. .love is attached.
by Doctory
Wed Aug 31, 2016 6:22 pm
Forum: Libraries and Tools
Topic: simple quest system
Replies: 0
Views: 1714

simple quest system

Hello everyone. I made a very simple quest system. It doesn't deal with drawing, only managing quests.
You can find more info on the github page: https://github.com/stefankoxd/simple-quest-system
by Doctory
Tue Aug 30, 2016 12:52 pm
Forum: Support and Development
Topic: Local variables and global variables
Replies: 40
Views: 6575

Re: Local variables and global variables

So If I put return varname in my second file, it's scope will also be extended to the file that called that file? (in this case main.lua) Why are we initializing variables just there and not in love.load() as it is said in love2d beginner tutorial? If I do local varname in love.load, does it mean I...