Search found 105 matches

by marclurr
Wed Jul 05, 2023 8:49 pm
Forum: Support and Development
Topic: Deleting an Object from a Table
Replies: 5
Views: 1273

Re: Deleting an Object from a Table

I got it working by changing your call to remove from:

Code: Select all

table.remove(game.State.Running.Bullets, game.State.Running.Bullets[i].place)
to

Code: Select all

table.remove(game.State.Running.Bullets, i)
Edit: Actually it's still not quite right.
by marclurr
Wed Jul 05, 2023 8:12 pm
Forum: Support and Development
Topic: Deleting an Object from a Table
Replies: 5
Views: 1273

Re: Deleting an Object from a Table

I seem to remember reading that modifying a table while iterating using pairs can cause some weird behaviour. There was another thread about this a few days ago but the suggestion was to iterate from the end of the array. That way deleting elements doesn't interfere with the iteration. Something lik...
by marclurr
Tue May 30, 2023 8:30 am
Forum: Libraries and Tools
Topic: Hardware Accelerated Raycaster
Replies: 11
Views: 10516

Re: Hardware Accelerated Raycaster

But for lower resolution software rendered ray casters, you don't really need the GPU. Well of course not, but why not do it anyway? :) I was really just looking for something to rekindle my interest in the project and at the time I fancied figuring out how to use some of the more advanced graphics...
by marclurr
Tue Apr 04, 2023 2:07 pm
Forum: General
Topic: LÖVE 11.4 - out now!
Replies: 51
Views: 227968

Re: LÖVE 11.4 - out now!

That error message is given when the directory you asked it to run doesn't exist. For example: > love noexist Error: [love "boot.lua"]:323: Cannot load game at path '/path/to/noexist'. Make sure a folder exists at the specified path. stack traceback: [love "boot.lua"]:345: in fun...
by marclurr
Mon Apr 03, 2023 3:26 pm
Forum: Support and Development
Topic: Shader questions
Replies: 8
Views: 1825

Re: Shader questions

How you've done it is pretty much how I'd have done it. That said, according to the GLSL documentation you can do a component-wise division on two vectors, so you can make it very slightly neater with a wrapper function, perhaps something like this (untested): vec2 toUV(float x, float y) { return ve...
by marclurr
Sat Apr 01, 2023 7:37 am
Forum: Support and Development
Topic: Implementation/port of Lode Vandevenne´s Raycaster behaving weirdly
Replies: 14
Views: 3173

Re: Implementation/port of Lode Vandevenne´s Raycaster behaving weirdly

Well done, looking very cool! And glad I was able to point you in the right direction :) I'm quite jealous of your single draw call implementation, I originally thought of doing the mine the same however I decided against it as I didn't want so many branching statements in a shader, but it looks to ...
by marclurr
Thu Mar 30, 2023 12:42 pm
Forum: Support and Development
Topic: How do i change the source directory?
Replies: 6
Views: 1383

Re: How do i change the source directory?

You can pass the root directory as an argument to the "love" command > love src The only issue is you'll have to put all your assets and any data local to the game in there too. If you want to have all of that separated in your project you'll have to write some script to move all code and ...
by marclurr
Thu Mar 30, 2023 6:10 am
Forum: Support and Development
Topic: Implementation/port of Lode Vandevenne´s Raycaster behaving weirdly
Replies: 14
Views: 3173

Re: Implementation/port of Lode Vandevenne´s Raycaster behaving weirdly

However, this method is very slow with love2d, so I'm looking for a way to improve it using a shader. It turns out to be more complicated than expected. I've actually gone down this exact rabbit hole fairly recently, I'd started with a fully software rendered version and while I'd managed to optimi...
by marclurr
Wed Mar 29, 2023 2:55 pm
Forum: Games and Creations
Topic: Play my free retro style platformer game
Replies: 20
Views: 5346

Re: Play my free retro style platformer game

I get a weird black flickering on the screen, it seems to be worse when there's some animation happening. Running on Linux (Ubuntu 20.04.6 LTS), I ran the Windows .exe using the version of love I have installed (the way mentioned by BrotSagtMist). what graphics card are you using ??? try the linux ...
by marclurr
Wed Mar 29, 2023 12:55 pm
Forum: Support and Development
Topic: What does .norm() do to a Vector in C++ and how do i do it in lua?
Replies: 7
Views: 2323

Re: What does .norm() do to a Vector in C++ and how do i do it in lua?

Vectors have direction and scale, normalising the vector scales it to have a length of 1 while keeping the direction. For example a vector of (1,1) points to the top right, and has a scale of about 1.4142. Normalised the vector would be (0.7072,0.7072), this has the exact same direction but a length...