Search found 277 matches

by kraftman
Tue Mar 20, 2018 5:00 am
Forum: Support and Development
Topic: A few questions about controllers
Replies: 2
Views: 4071

Re: A few questions about controllers

Ahh, forgot to post my code: function love.draw() world:Draw() local joysticks = love.joystick.getJoysticks() for i, joystick in ipairs(joysticks) do love.graphics.print(joystick:getName(), 10, i * 20) love.graphics.print(joystick:getID(), 150, i * 20) end end So it's the first id, which shouldnt ch...
by kraftman
Tue Mar 20, 2018 3:48 am
Forum: Support and Development
Topic: A few questions about controllers
Replies: 2
Views: 4071

A few questions about controllers

Wow, apparently it's been 4 years since I last posted :( So anyway, https://love2d.org/wiki/Joystick:getID this says that the ID stays the same even if i disconnect/reconnect a joystick, but if i unplug one and plug in another, the new one gets the ID of the first. Am I missing something? Next, I ha...
by kraftman
Thu Nov 20, 2014 2:07 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1488719

Re: What's everyone working on? (tigsource inspired)

I'm back! It's been a while. I'm picking up where I left off with my terraria-esque game. Crafting Currently working on a new crafting system where the players pick up weapon templates, and fill them out using the materials they have collected. The positioning and materials used govern the weapon na...
by kraftman
Thu Nov 13, 2014 12:46 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 409902

Re: "Questions that don't deserve their own thread" thread

I'm making a 2d platformer with spells that can by fired and I want to add some effects to the spells.
Is the particle system viable for this or too overkill?
by kraftman
Thu Nov 13, 2014 11:51 am
Forum: Support and Development
Topic: contact box
Replies: 2
Views: 4045

Re: contact box

The problem is probably that you're storing the direction the player is moving in a single variable, so if they are moving both down and left then only one of those things will be assigned to l.s and checked against foe. I'd recommend moving the collision detection of the player into the player file...
by kraftman
Wed Nov 12, 2014 3:00 pm
Forum: Support and Development
Topic: Trouble understanding classes
Replies: 15
Views: 10035

Re: Trouble understanding classes

If you have access to pluralsight there's a nice intro to classes/inheritance and metatables called "Object Oriented Code Organization" here: http://www.pluralsight.com/courses/beginning-lua Otherwise, it's worth reading up a bit on object oriented coding and then metatables: http://www.lu...
by kraftman
Tue Nov 11, 2014 11:40 pm
Forum: Support and Development
Topic: Problem drawing when going from fullscreen to normal
Replies: 4
Views: 4754

Re: Problem drawing when going from fullscreen to normal

change the variable desktop to a string "desktop"

Code: Select all

love.window.setFullscreen(true, "desktop")
by kraftman
Wed Apr 25, 2012 11:57 pm
Forum: Support and Development
Topic: "Adding" a number to an variable
Replies: 12
Views: 8648

Re: "Adding" a number to an variable

Hello! I have a problem; Let's say i have an variable of the number 250. I want to modify this number by adding digits after it. Like, if i press my "1" button i have created, i want the variable to be 2501 (not 251). If i do variable+1, it will (of course) just become 251, which is not w...
by kraftman
Sun Apr 15, 2012 2:53 pm
Forum: Support and Development
Topic: Share a Shader!
Replies: 328
Views: 522705

Re: Share a Shader!

RPG wrote:Raycast is too slow. Look at shader toy demos, they are fast and pretty.
which shader toy demo's?
by kraftman
Fri Apr 13, 2012 4:44 pm
Forum: Libraries and Tools
Topic: ÖRGY
Replies: 18
Views: 9855

Re: ÖRGY

Keypressed, Mousepressed, event.push('q') and event.quit() don't work, and I don't know how to close a window... Other than that, it's really nice! yeh there's a lot of functions I havnt converted yet, each one needs to be individually rewritten to run in its own environment properly, it takes a wh...