Search found 16 matches

by ThatCodingGuy78
Sat Jul 03, 2021 12:57 pm
Forum: General
Topic: Optimization issues -- How do I keep my game from lagging?
Replies: 4
Views: 7367

Re: Optimization issues -- How do I keep my game from lagging?

Ohhh. That makes sense, I had optimized it for 1 model, the map one that you would've seen commented out, so that made sense for just 1 model, but not tons of individual ones.
by ThatCodingGuy78
Fri Jul 02, 2021 1:54 pm
Forum: General
Topic: Optimization issues -- How do I keep my game from lagging?
Replies: 4
Views: 7367

Re: Optimization issues -- How do I keep my game from lagging?

I can't tell about the performance; maybe check with a profiler. I've seen trigonometry used where none is necessary (it's sadly usual to see how people take the atan2 of a vector then the sine and cosine in order to just normalize it, spending three trigonometric functions where just two multiplic...
by ThatCodingGuy78
Thu Jul 01, 2021 5:22 pm
Forum: General
Topic: Optimization issues -- How do I keep my game from lagging?
Replies: 4
Views: 7367

Optimization issues -- How do I keep my game from lagging?

To be specific, I'm creating a TON of objects, and I know rendering isn't the issue as I have it rendering only in a very small area at a time. And GC goes insane when it launches. How would I fix this?

Also, here's my .love file if it's relevant:
Game Name.love
(471.35 KiB) Downloaded 263 times
Also, I'm using the G3D library.
by ThatCodingGuy78
Wed Jun 30, 2021 11:00 am
Forum: General
Topic: Problems with .mtl parser, only 1 material gets applied to rendered shape
Replies: 0
Views: 16453

Problems with .mtl parser, only 1 material gets applied to rendered shape

As I said in the title, I'm writing a .mtl parser and for some weird reason, only 1 material gets applied to my 3D rectangle. I have no idea if it's my graphics code, or the parser.. Here's my .love file (Warning, spaghetti code ahead!) Game Name.love The relevant function(s) are drawShape3D in grap...
by ThatCodingGuy78
Tue Jun 29, 2021 2:14 pm
Forum: General
Topic: [SOLVED] A table is nil and not nil at the same time??
Replies: 0
Views: 16776

[SOLVED] A table is nil and not nil at the same time??

As stated in the title, I have a problem where a table, if I try to print just the main table (Recursive tables), it prints fine. If I try to access anywhere in the table, it's suddenly nil. Even when I set that index to always be 1, it's still somehow nil. Here's my .love file: Game Name.love The p...
by ThatCodingGuy78
Tue Jun 29, 2021 10:36 am
Forum: General
Topic: How would I write an algorithm to convert a OBJ face to triangles?
Replies: 4
Views: 7588

Re: How would I write an algorithm to convert a OBJ face to triangles?

darkfrei wrote: Tue Jun 29, 2021 10:28 am
ThatCodingGuy78 wrote: Tue Jun 29, 2021 9:11 am Ah. I'll search for the option on my modeling software I guess.
blender: Edit mode --> Select faces and Ctrl+T to triangulate it.
https://docs.blender.org/manual/en/late ... faces.html
Thanks!
by ThatCodingGuy78
Tue Jun 29, 2021 9:11 am
Forum: General
Topic: How would I write an algorithm to convert a OBJ face to triangles?
Replies: 4
Views: 7588

Re: How would I write an algorithm to convert a OBJ face to triangles?

Some general pointers, may or may not apply to your problem: A quad on a plane is trivially converted to two triangles 0---3 | | 1---2 { 0, 1, 3 } is triangle #1, and { 1, 2, 3 } is triangle #2. In your cube example you would ideally represent this as an indexed triangle list, to keep the number of...
by ThatCodingGuy78
Tue Jun 29, 2021 6:54 am
Forum: General
Topic: How would I write an algorithm to convert a OBJ face to triangles?
Replies: 4
Views: 7588

How would I write an algorithm to convert a OBJ face to triangles?

As the title says, how would I write an algorithm to convert a OBJ face to triangles? Example: You have a cube.obj file that has 6 faces, but they have 4 vertexes (Per face), and you can only render in 3D triangles. How would you convert the data to a set of points and lines defined as the points to...
by ThatCodingGuy78
Tue Jun 29, 2021 2:43 am
Forum: General
Topic: Help with OBJ parser?
Replies: 2
Views: 5963

Re: Help with OBJ parser?

ReFreezed wrote: Tue Jun 29, 2021 1:27 am I assume this is the problem:

Code: Select all

-- This:
step2 = split(startsWithV[i], "%s")
-- should be something like this:
step2[i] = split(startsWithV[i], "%s")
Ah. Yeah, that was supposed to be there.. Thanks!
by ThatCodingGuy78
Mon Jun 28, 2021 7:49 pm
Forum: General
Topic: Help with OBJ parser?
Replies: 2
Views: 5963

Help with OBJ parser?

I'm currently attempting to write a OBJ parser and it's not outputting anything but the 1st variables in the v and f lists.
This is a really simple parser, and I have no idea why it isn't working properly..
Here's the .love file:
Game Name.love
(9.35 KiB) Downloaded 238 times
The parser is in the objParser.lua file.