Search found 45 matches

by keharriso
Tue Mar 19, 2019 5:10 pm
Forum: Libraries and Tools
Topic: HEXAGÖN - A library for drawing hexagonal grids
Replies: 6
Views: 299

Re: HEXAGÖN - A library for drawing hexagonal grids

There's still:
  • offset
  • xA
  • xB
  • xC
  • yA
  • yB
  • yC
  • distanceToA
  • distanceToB
  • distanceToC
  • hexagonA
  • hexagonB
  • hexagonC
  • possibleHexagons
  • distances
  • closerHexagon
  • resultX
  • resultY
  • hx
  • hy
by keharriso
Mon Mar 18, 2019 11:27 pm
Forum: General
Topic: Why Lua2d netWorking Examples doesn't working on my Android mobile
Replies: 5
Views: 159

Re: Why Lua2d netWorking Examples doesn't working on my Android mobile

I mean that your home router translates the ports so that multiple devices can share the same external IPs. Furthermore, routers block incoming ports to protect your devices. So devices on the same Wifi network cannot connect to each other directly. I'm no expert here, but I think what you are talk...
by keharriso
Mon Mar 18, 2019 1:47 pm
Forum: Libraries and Tools
Topic: HEXAGÖN - A library for drawing hexagonal grids
Replies: 6
Views: 299

Re: HEXAGÖN - A library for drawing hexagonal grids

Eldy wrote:
Mon Mar 18, 2019 10:44 am
Thanks for your answer.

Is sticking

Code: Select all

local
in front of the variable/function enough, or is there something else I should be aware of?

Code: Select all

local
is all you should need.
by keharriso
Fri Mar 15, 2019 11:10 pm
Forum: Libraries and Tools
Topic: HEXAGÖN - A library for drawing hexagonal grids
Replies: 6
Views: 299

Re: HEXAGÖN - A library for drawing hexagonal grids

Looks like a cool little library. You should really look into using local variables, though. By default, Lua variables are global, even inside of functions. It looks like your helper functions (toHexagonCoordinatesHorizontal, toHexagonCoordinatesVertical, distanceBetween) are also global. You might ...
by keharriso
Mon Mar 04, 2019 10:56 pm
Forum: Support and Development
Topic: problem when cheking if somethings true (making powerup)
Replies: 3
Views: 919

Re: problem when cheking if somethings true (making powerup)

Hello! I have problem and I don't understand what I'm doing wrong. -snip- code works when powerup is picked, speed of the player is increased tenfold, but when its picked up again (in different position) powerup is still active. I tried to make ispowerup == true check, but its not a valid argument ...
by keharriso
Fri Mar 01, 2019 8:58 pm
Forum: Support and Development
Topic: Problem with hanging and reading stdout from python in threads
Replies: 7
Views: 2189

Re: Problem with hanging and reading stdout from python in threads

I posted an issue on BitBucket here. Given the obscurity of the bug, I'd be surprised to get a solution any time soon, but I guess you never know.
by keharriso
Thu Feb 28, 2019 11:21 pm
Forum: General
Topic: Game frozen while moving window?
Replies: 6
Views: 777

Re: Game frozen while moving window?

pgimeno wrote:
Thu Feb 28, 2019 10:17 pm
I believe that's OS-dependent.
Absolutely correct. Works on Linux, doesn't work on Windows.

On the plus side, it looks like the updating is happening... just the drawing is delayed.
by keharriso
Thu Feb 28, 2019 10:05 pm
Forum: General
Topic: Game frozen while moving window?
Replies: 6
Views: 777

Re: Game frozen while moving window?

I'm not sure what your code is doing, but this extremely simple example shows that the game should keep running (both drawing and updating) while the window is in motion: local t = 0 function love.update(dt) t = t + dt print(t) end function love.draw() love.graphics.print(t) end Care to share your r...
by keharriso
Tue Feb 26, 2019 2:46 pm
Forum: Support and Development
Topic: Debugging a malloc double free
Replies: 2
Views: 1127

Re: Debugging a malloc double free

I might be able to help, but I'd need a runnable test case to replicate your error. Maybe add a minimal .love file to help out?
by keharriso
Tue Feb 26, 2019 1:31 am
Forum: General
Topic: character movement and angles
Replies: 1
Views: 867

Re: character movement and angles

Let's say you have character coordinates at (cx, cy) and target coordinates at (tx, ty). Then you get: dx = tx - cx dy = ty - cy r = math.atan2(dy, dx) You also want to set the ox/oy arguments to love.graphics.draw so that it rotates around the center. EDIT: If you don't have tx or ty and just have ...