Search found 41 matches

by duaner
Thu Apr 27, 2023 12:21 am
Forum: Support and Development
Topic: Can I add c/c++ or possibly c# to my love2d game?
Replies: 6
Views: 2341

Re: Can I add c/c++ or possibly c# to my love2d game?

I'd be shocked if lua on luajit doesn't run as fast as compiled c#. The last time I benchmarked luajit against c code, it was about half as fast, on average, which is extraordinary for a scripting language. Even vanilla lua is extremely fast on my system. I don't usually bother with luajit.
by duaner
Sat Jan 30, 2021 4:05 am
Forum: Support and Development
Topic: question about Love.js security
Replies: 42
Views: 32083

Re: question about Love.js security

https://www.gameacademy.com/why-do-some-indie-games-fail/ I feel that this author never wrote a single line of code of his life. Which, of course, begs the question, how much does coding have to do with the success of a game (vs. art, marketing, concept, and pure luck)? :) Sorry, off-topic.
by duaner
Sun Jul 05, 2020 8:49 pm
Forum: Support and Development
Topic: How to create an 'interpreter'? Or some other term closely related..
Replies: 6
Views: 3610

Re: How to create an 'interpreter'? Or some other term closely related..

I wrote a markup interpreter in python, years ago. It was very simple. All I did was store a dozen or so regular expressions in a table and run them on each line of text in a series of if statements. This would be even easier in lua, since the pattern-matching is easier (at least for me) to use. In ...
by duaner
Sun Jul 05, 2020 2:53 am
Forum: Support and Development
Topic: How to detect a collision between two points in an array and a rotating line?
Replies: 2
Views: 2218

Re: How to detect a collision between two points in an array and a rotating line?

A line can be described as "y * sin(a) + x * cos(a) - p = 0". If the line goes through the origin, you can ignore the "-p". If you know the angle (a), just fill in the x value from your point, then solve for y (or vice versa). y = (x * cos(a)) / (- sin(a)) If y is close to your p...
by duaner
Wed Jun 24, 2020 11:30 pm
Forum: Support and Development
Topic: Problem with buttons when changing screen resolution
Replies: 6
Views: 5025

Re: Problem with buttons when changing screen resolution

Here's what I did: function screen_class:redraw() ... love.graphics.scale(self.graphic_scale, self.graphic_scale) ... -- draw stuff ... love.graphics.scale(1, 1) ... end function love.mousereleased(x, y, button, istouch, presses) game:mouse_input(x, y) end function game_class:mouse_input(ix, iy) -- ...
by duaner
Tue Jun 23, 2020 9:48 pm
Forum: Support and Development
Topic: Problem with buttons when changing screen resolution
Replies: 6
Views: 5025

Re: Problem with buttons when changing screen resolution

Are you scaling your mouse input coordinates by the same factor as the screen has been scaled?
by duaner
Mon Jun 22, 2020 12:21 am
Forum: Support and Development
Topic: Problem from start...
Replies: 2
Views: 2568

Re: Problem from start...

You should probably check out the wiki:

https://love2d.org/wiki/Getting_Started
by duaner
Sat Jun 20, 2020 9:00 pm
Forum: Support and Development
Topic: Game random crash on a start
Replies: 5
Views: 4786

Re: Game random crash on a start

I don't think you've got exactly the same symptoms I did. However, the last time I ran into a random crash like that, it turned out that I was starting the game before my editor had actually finished saving it. Love was trying to run the project with a missing or partial file (with hilarious consequ...
by duaner
Fri May 29, 2020 7:06 pm
Forum: Support and Development
Topic: Code/game examples
Replies: 2
Views: 3482

Re: Code/game examples

by duaner
Fri May 29, 2020 12:20 am
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1796
Views: 1562863

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

A baby roguelike.