Search found 191 matches
- Mon Feb 27, 2017 7:48 pm
- Forum: General
- Topic: Is there a way to group lines of code in Löve?
- Replies: 18
- Views: 12431
Re: Is there a way to group lines of code in Löve?
I really think that embedding such functionalities in a language itself is just meaningless; it's equivalent (from a code perspective) to comments; also see this: http://softwareengineering.stackexchange.com/questions/53086/are-regions-an-antipattern-or-code-smell That's just my opinion though. Wel...
- Mon Feb 27, 2017 7:30 pm
- Forum: General
- Topic: Is there a way to group lines of code in Löve?
- Replies: 18
- Views: 12431
Re: Is there a way to group lines of code in Löve?
More functions! ;) It's just my opinion, but this sounds like a sign that your functions are doing too much work. I'd break them up into smaller functions, not try to hide the stuff inside. well you're partly true, right now I'm trying to get back to LÖVE after not using it for approx. 2 years and ...
- Mon Feb 27, 2017 7:25 pm
- Forum: General
- Topic: Is there a way to group lines of code in Löve?
- Replies: 18
- Views: 12431
Re: Is there a way to group lines of code in Löve?
but if there's code inside the function that I want to group?
- Mon Feb 27, 2017 7:10 pm
- Forum: General
- Topic: Is there a way to group lines of code in Löve?
- Replies: 18
- Views: 12431
Is there a way to group lines of code in Löve?
So I'm currently using Unity and C# at school a lot so in the recent days I've been pretty spoiled by using regions. For those of you that doesn't know what region is: #region Let's hide our super fun code here // Totally cool and legit code right here #endregion By using regions in a project you ca...
- Thu Feb 23, 2017 6:48 pm
- Forum: General
- Topic: Haven't touched Löve2D in like 2 years, What's changed?
- Replies: 13
- Views: 6673
Re: Haven't touched Löve2D in like 2 years, What's changed?
Generally you shouldn't need tutorials altogether, so it's not relevant. Well learning new thing is always nice in my opinion If you want tutorials I always recommend Sheepolution's since they are always up to date. But yeah... learning by yourself is always better I found Sheepolution's a while ba...
- Wed Feb 22, 2017 8:39 pm
- Forum: General
- Topic: [SOLVED]Help: How to randomize background color every frame
- Replies: 6
- Views: 3443
Re: Help: How to randomize background color every frame
Yes, major comprehension failure, in fact. :3 don't take it too hard though, it happens As he said, you want to put both parts of my code into your love.draw function. So I didn't understand that you were supposed to put both parts of the code inside the same function: function love.draw() -- Backg...
- Wed Feb 22, 2017 8:29 pm
- Forum: General
- Topic: [SOLVED]Help: How to randomize background color every frame
- Replies: 6
- Views: 3443
Re: Help: How to randomize background color
love.draw() is called every frame. If you put the code that zorg gave you in there, it should produce the seizure-inducing effect you want. Well then I must be missing something because right now it only changes color once when I run the program the first time: function love.load() -- Cake stuff ca...
- Wed Feb 22, 2017 7:46 pm
- Forum: General
- Topic: [SOLVED]Help: How to randomize background color every frame
- Replies: 6
- Views: 3443
Re: Help: How to randomize background color
It works but is there a way to make it change color every frame?
- Wed Feb 22, 2017 7:30 pm
- Forum: General
- Topic: [SOLVED]Help: How to randomize background color every frame
- Replies: 6
- Views: 3443
[SOLVED]Help: How to randomize background color every frame
So I familiarizing myself with Löve2D and lua again and right now I have a small project where I want to randomize the background color (for fun) and this is what I currently have: function love.load() cake = love.graphics.newImage("cake.png") pos1 = 400 pos2 = 400 rad = 0 scaleX = 1 scale...
- Wed Feb 22, 2017 6:30 pm
- Forum: General
- Topic: Haven't touched Löve2D in like 2 years, What's changed?
- Replies: 13
- Views: 6673
Re: Haven't touched Löve2D in like 2 years, What's changed?
By the way, I'm going through Löv2D:s tutorials, are there any that I should do in order? or are there other tutorials that I should take a look at?