Search found 40 matches

by JJSax
Mon Jul 06, 2020 4:05 am
Forum: Support and Development
Topic: math.clamp?
Replies: 18
Views: 13635

Re: math.clamp?

Nixola wrote:
Mon Apr 27, 2015 6:58 pm
Maybe he was searching, noticed this and didn't notice the topic was so old
EDIT: why don't we turn this topic into a list of original and weird ways to write math.clamp?
* actively resists the urge to post an obnoxiously long, highly overcomplicated, Rube Goldberg like method to clamp numbers.
by JJSax
Mon Jul 06, 2020 4:00 am
Forum: Support and Development
Topic: Rectangle/Character Movement: How it works under the hood?
Replies: 7
Views: 766

Re: Rectangle/Character Movement: How it works under the hood?

thank you for the answers. I guess I understood, but still when I remove *dt from the expression, rect moves smoothly to the desired position. In this case how do I make the rect instantly jump to another position? Like rectY + 500 and stop there? Is there any other key method I need to use for it?...
by JJSax
Wed Jul 01, 2020 11:32 pm
Forum: Support and Development
Topic: Rectangle/Character Movement: How it works under the hood?
Replies: 7
Views: 766

Re: Rectangle/Character Movement: How it works under the hood?

Hello, welcome to the world of Love2d game dev! dt stands for delta time . Essentially it is used to move everything more reliable over a period of time, despite if your computer is being laggy at the moment or not. It adjusts for how long it takes a frame to pass. speed = 50 -- the number of pixels...
by JJSax
Fri Apr 24, 2020 5:56 am
Forum: Support and Development
Topic: Hey I have an error and I don't know what to do
Replies: 2
Views: 600

Re: Hey I have an error and I don't know what to do

It sounds like push isn't a file in your project. In the same path as the main.lua file you're running, you should see push.lua that is your push file.
by JJSax
Sat Feb 08, 2020 6:34 am
Forum: Support and Development
Topic: Help with multiple "enemies" [Solved]
Replies: 4
Views: 2152

Re: Help with multiple "enemies"

As stated by Sky_Render, there is a lot of ways to implement this and I too recommend reading up on Lua Tables I find using metatables very handy for stuff like this, but that is more advanced and might be confusing if you're new to Lua. My understanding of your game is similar to games where you mo...
by JJSax
Thu Jan 30, 2020 3:06 am
Forum: Support and Development
Topic: [SOLVED][STI]crash when map:resize
Replies: 8
Views: 1933

Re: [STI]crash when map:resize

Pls forgive a sleepy dog:P I have changed the code and attached the runable love file. You are definitely forgiven. I'll preface this by saying I'm not an expert. But I think I fixed it and I have a theory of why it works. It didn't crash right away and just eventually had the error. I dug into the...
by JJSax
Thu Jan 30, 2020 2:04 am
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (G3D) New and Improved!
Replies: 37
Views: 47338

Re: Groverburger's Super Simple 3D Engine - v1.3

Could be Z fighting. When you have two faces very close to each other, with one occluding the other (i.e. covering it so it's not visible), the 3D system will try to find which one is closest to the camera, but on doing that, since the longer the distance the worse the precision of floats, it can h...
by JJSax
Thu Jan 30, 2020 1:20 am
Forum: Support and Development
Topic: [SOLVED][STI]crash when map:resize
Replies: 8
Views: 1933

Re: [STI]crash when map:resize

I'm not seeing anywhere in there where it calls map:resize(). Perhaps you copied over the code that isn't crashing by mistake. It would surely help to see how you're calling it as well.

Edit: also let us know what the error you're getting is.
by JJSax
Wed Jan 29, 2020 5:44 am
Forum: Support and Development
Topic: Trouble returning tables from a separate file
Replies: 3
Views: 948

Re: Trouble returning tables from a separate file

To expand on pgimeno's code, you possibly might be thinking about this return { name = "Dungeon Floor 1", map = { [1] = { 0,1,1,1,0,1,1,2, 0,1,0,1,0,1,0,0, 0,0,1,1,0,1,1,1, 1,1,1,0,1,1,0,1, 1,0,1,1,0,1,1,0, 1,1,1,0,0,1,0,1, 0,1,0,1,1,1,1,1, 1,1,1,1,0,1,1,0 }, [2] = { desc="Corridor", chest=false, tr...
by JJSax
Tue Jan 28, 2020 6:47 pm
Forum: Libraries and Tools
Topic: Groverburger's 3D Engine (G3D) New and Improved!
Replies: 37
Views: 47338

Re: Groverburger's Super Simple 3D Engine - v1.3

I created a simple sphere in blender and am trying to use it in my scene. Half the triangle faces are missing however. Anyone know how to fix this? Maybe you doesn't check "Triangulate Faces" in Export options? That was it!!!!! I'm the noobest of noobs at blender. Maybe you know this as well. I'm r...