Search found 59 matches

by RNavega
Fri Jan 22, 2021 6:57 am
Forum: Support and Development
Topic: Circular collisions with PNGs
Replies: 4
Views: 2469

Re: Circular collisions with PNGs

You don't need the square root if you only care about comparing the distances (equal, bigger-than or smaller-than) and don't need the actual distance value. You can compare with squared radii because of the following principle: If X > Y, then X² > Y² ("If a number is bigger than another number, then...
by RNavega
Fri Jan 22, 2021 6:49 am
Forum: Support and Development
Topic: Drawing lines around tiles
Replies: 10
Views: 4717

Re: Drawing lines around tiles

Here's an idea, done in two sections, A and B: Section A: A1) Sort all tiles into two tables: one table for boundary tiles (any tiles that touch empty space on one or more sides so they need the outline effect), and a second table with all "inner" tiles (any tiles that are completely surrounded by o...
by RNavega
Fri Jan 22, 2021 6:23 am
Forum: General
Topic: Does anyone know how I get Lua installed and running on Windows?
Replies: 3
Views: 2756

Re: Does anyone know how I get Lua installed and running on Windows?

When I need a Lua shell to test some regex, math formulas or some syntax that I forgot, I fire up the LuaJIT binary provided by the generous LuaPower project. You can get the binaries in here:
https://github.com/luapower/luajit/tree/master/bin
by RNavega
Sun Jan 17, 2021 4:05 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (g3d) v1.3 Release
Replies: 91
Views: 97323

Re: Groverburger's 3D Engine (g3d) v1.1 Release

I haven't tested it, but if you're supposed to require the helper modules during your program, like the 'matrices' module for example, wouldn't G3D_PATH still need to exist then? EDIT: Hm, this could be solved by putting all the helper modules into the 'g3d' object, then you can safely clear G3D_PAT...
by RNavega
Thu Jan 14, 2021 2:13 pm
Forum: General
Topic: Randomly generating objects
Replies: 3
Views: 4861

Re: Randomly generating objects

Looks related to their thread about making a flappybird clone game, in here:
https://love2d.org/forums/viewtopic.php?t=90016
by RNavega
Sun Jan 10, 2021 12:39 am
Forum: Support and Development
Topic: [Solved] Pointing at an object that's out of sight
Replies: 14
Views: 6536

Re: [Solved] Pointing at an object that's out of sight

@pgimeno it's not pickiness xD , it's an important pointer. That point-slope code has special cases for when the player and enemy are perfectly aligned on the X or Y axes (so this prevents a division by zero, or when the slope 'm' results in zero itself), but for the case you mentioned of the player...
by RNavega
Sat Jan 09, 2021 6:10 am
Forum: Support and Development
Topic: [Solved] Pointing at an object that's out of sight
Replies: 14
Views: 6536

Re: [Solved] Pointing at an object that's out of sight

...I should add, I had the idea while looking at the diagrams drawn by Xugro above, so thanks for that!
by RNavega
Sat Jan 09, 2021 6:09 am
Forum: Support and Development
Topic: [Solved] Pointing at an object that's out of sight
Replies: 14
Views: 6536

Re: Pointing at an object that's out of sight

This task can be solved by casting 4 rays, each to an axis-aligned line. The formula for line-line intersection is very simple when one of the lines is axis-aligned. That's a cool solution pgimeno, very fast and elegant. The method I came up with when thinking of this is more verbose and I think sl...
by RNavega
Sat Jan 09, 2021 4:28 am
Forum: Support and Development
Topic: Making a progression bar
Replies: 10
Views: 5680

Re: Making a progression bar

I think you can do this using Data objects, more specifically FileData, created by reading a file from disk with love.filesystem.newFileData . FileData is a subclass of Data, so you can know the amount of bytes that the loaded file data represents . You can also calculate the total bytes from all as...
by RNavega
Fri Dec 25, 2020 12:55 pm
Forum: General
Topic: Obstacles in game
Replies: 6
Views: 4891

Re: Obstacles in game

Also, if you imagine yourself making more complex games in the future, it'd be interesting to invest some time in making simpler games first that will give you an easier challenge in learning different techniques, design patterns and such. There are two cool articles talking about this, not specific...