LoveDebug - A whole new way of debugging your game

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: LoveDebug - A whole new way of debugging your game

Post by s-ol »

Sulunia wrote:So, i tried to use this nice script in my game. However...

For some odd reason, luafft now returns me an error, bragging about some debugging function not existing, when in fact it does.

With that error, the game splashcreen just stalls. I can hover at the button, but clicking it does nothing.

Actually, looking at the source code of both lovedebug and luafft i found the problem...

You guys use a variable named "msg" whilst luafft uses it as a "function"

What should i do? I really didn't plan on messing around with the source code of none of the external libs i used. I don't even know if i'm allowed to do so.
you are. thats what licenses are for.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: LoveDebug - A whole new way of debugging your game

Post by Sulunia »

Allright, managed to get everything working. Using this in addiction to some debug helper stuff i made really looks neat now. Awesome!
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
pgimeno
Party member
Posts: 3672
Joined: Sun Oct 18, 2015 2:58 pm

Re: LoveDebug - A whole new way of debugging your game

Post by pgimeno »

Actually, that's a great example of what kind of problems arise when you don't define your variables and functions as local.

Looking at the code, it looks like an oversight in this case. Using strict.lua or static analysis can catch these problems.
beuz
Prole
Posts: 3
Joined: Thu Apr 28, 2016 2:17 am

Re: LoveDebug - A whole new way of debugging your game

Post by beuz »

Hi. Awesome work on this, it's really great!
Tho... I'm having a problem with the background color on my game. no matter what I set it to be, it gets replaced by 0,0,0 by LoveDebug. How can I change this?
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

I'll try to fix this once I get home, it should be an easy fix.

EDIT: Fixed, just redownload the latest version from the first post and everything should be fine :)
There was a line in love.run that cleared the background color to the current background color in 0.9.2 but this was changed to clear to transparent black (0, 0, 0, 0) if no arguments are provided in LÖVE 0.10.0.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
beuz
Prole
Posts: 3
Joined: Thu Apr 28, 2016 2:17 am

Re: LoveDebug - A whole new way of debugging your game

Post by beuz »

Hey, thank you for answering, that was fast!
So, the background color isn't changing now.
I'm not sure if I'm doing anything wrong but the overlay isn't being drawn anymore.
EDIT:
Nevermind, I got it, just needed to uncomment line 806/807. Thanks again!
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

Damn, sorry about that, I totally forgot about those xD
Nice work fixing it, the next update will be in your name.
I'll update it in a few hours, you can make a pull request to the repo if you want
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Zireael
Party member
Posts: 139
Joined: Fri Sep 02, 2016 10:52 am

Re: LoveDebug - A whole new way of debugging your game

Post by Zireael »

Was the comment thing fixed or do I need to do it if I just downloaded the latest unofficial version?
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: LoveDebug - A whole new way of debugging your game

Post by Ranguna259 »

Zireael wrote:Was the comment thing fixed or do I need to do it if I just downloaded the latest unofficial version?
The commented lines were uncommented on the latest unofficial version, 1.4.4 by beuz, just download it from the first page or from github.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests