Search found 25 matches

by hamberge
Sat Oct 21, 2017 10:38 am
Forum: General
Topic: collision problem
Replies: 6
Views: 1484

Re: collision problem

Can you post the code that uses this? I.e., a love file? Also it'd be easier to read w proper indentation.
by hamberge
Fri Oct 20, 2017 7:25 pm
Forum: General
Topic: love.load vs stuff at top of main.lua
Replies: 10
Views: 3292

Re: love.load vs stuff at top of main.lua

I get the feeling that love.load only exists because that's how other game frameworks do it, even those in languages where code cannot be executed outside of a function or classes. Load() would be necessary in such languages, but effectively is not necessary in lua. For example, you could just put e...
by hamberge
Fri Oct 20, 2017 5:49 pm
Forum: General
Topic: love.load vs stuff at top of main.lua
Replies: 10
Views: 3292

love.load vs stuff at top of main.lua

Is there any effective difference between putting stuff in love.load() versus just putting stuff in the beginning of main.lua? Why would you choose one over the other?

Thanks!
by hamberge
Fri Oct 20, 2017 1:49 am
Forum: Libraries and Tools
Topic: toboolean function
Replies: 22
Views: 4847

Re: toboolean function

"Extremely" robust.
by hamberge
Thu Oct 19, 2017 7:53 pm
Forum: Libraries and Tools
Topic: toboolean function
Replies: 22
Views: 4847

Re: a small toboolean function

Well... I think there is such a thing as bad code. For example, it is possible to overcomplicate things, especially for programmers who are naturally systematizers. One example is "Fizz-Buzz Enterprise Edition." https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition Fizz-Buzz is a basi...
by hamberge
Thu Oct 19, 2017 5:55 pm
Forum: Libraries and Tools
Topic: toboolean function
Replies: 22
Views: 4847

Re: a small toboolean function

Hah... aww, c'mon guys, that's mean-spirited.

I want to know which Love forums poster is Hans_Meiser_Koeln.

Also, this bad code forum looks interesting.
by hamberge
Wed Oct 18, 2017 7:15 pm
Forum: Support and Development
Topic: [SOLVED] Accessing shift+<...> scancodes?
Replies: 2
Views: 706

Re: Accessing shift+<...> scancodes?

I think scancodes are dependent on the specific keys pressed and are independent of which particular keyboard layout you have or whether modifier keys like shift, ctrl, whatever, is pressed. For example, the . key on a US keyboard will produce the same scancode regardless of whether shift, ctrl, wha...
by hamberge
Wed Oct 18, 2017 11:15 am
Forum: General
Topic: how to reduce CPU usage ?
Replies: 8
Views: 2204

Re: how to reduce CPU usage ?

How long is your code?
by hamberge
Mon Oct 16, 2017 8:05 pm
Forum: General
Topic: [SOLVED] Help with saving level data
Replies: 6
Views: 1281

Re: Help with saving level data

look up a serialization library such as:

https://love2d.org/wiki/Tserial

It'll convert your day into a string which you can write to a file and will convert a string back to a table for loading from a file.
by hamberge
Sun Oct 15, 2017 3:30 pm
Forum: General
Topic: making a platform game with destructible terrain?
Replies: 4
Views: 1357

Re: making a platform game with destructible terrain?

Well... I think you should start with the easiest thing and build out the system from there. Maybe start with a player represented by a table with an x and y position. Every frame update the position based on input. Then add gravity and floor collision detection. Then add a data representation to re...