Search found 90 matches

by UnixRoot
Fri Nov 19, 2021 7:08 am
Forum: Libraries and Tools
Topic: Fast Mesh Vertex Setting
Replies: 12
Views: 15444

Re: Fast Mesh Vertex Setting

Thanks for your answer. Measure what is slow before trying to optimize. Don't guess. It's the calculation of the perspective projection for every vertex inside the draw range and then setting those vertices. Don't draw 1000 tiny meshes. Use one big one. The track isn't 3D. It's not even 2D. Technica...
by UnixRoot
Thu Nov 18, 2021 9:53 pm
Forum: Libraries and Tools
Topic: Fast Mesh Vertex Setting
Replies: 12
Views: 15444

Re: Fast Mesh Vertex Setting

Sure, I'm trying to build a 2.5D racing game engine from scratch. I'm streaming polygonal segments on the fly while driving. Curves and hills are fake and not real 3D. I'm already culling segments with backfaces, behind hills, etc. I dont know how it can be further optimized, because i have to calcu...
by UnixRoot
Thu Nov 18, 2021 8:23 pm
Forum: Libraries and Tools
Topic: Fast Mesh Vertex Setting
Replies: 12
Views: 15444

Re: Fast Mesh Vertex Setting

I haven't tried this specific implementation, but it ought to be faster in general. It's just that 9 vertices is nothing - way too few to measure any difference in this 2 microsecond range. You should also use love.data.newByteData. Not need to abuse ImageData anymore. Sure its only 9 vertices, but...
by UnixRoot
Thu Nov 18, 2021 7:20 pm
Forum: Libraries and Tools
Topic: Fast Mesh Vertex Setting
Replies: 12
Views: 15444

Re: Fast Mesh Vertex Setting

Has anyone actually tried this approach? For me, the FFI variant is definitely not 10 - 20 time faster. FFI = average 0.00000201060671953970970000000000 Table = average 0.00000219103070769008190000000000 What I'm doing wrong? vertices = { {x1, y1}, -- 1 top left {(x1+x2)/2, y1}, -- 2 top center {x2,...
by UnixRoot
Sat Nov 13, 2021 7:08 pm
Forum: Support and Development
Topic: Practical engine limitations
Replies: 11
Views: 8316

Re: Practical engine limitations

I don't think there is a real limit. With sprite batches, texture atlases and clever coding, you can draw thousands of sprites in one drawcall. But you can limit yourself, depending on the style you're aiming for. Restrictions are fun. I'm building a pseudo 3D racing game right now and make up my ow...
by UnixRoot
Sat Nov 13, 2021 12:09 pm
Forum: Support and Development
Topic: How to set Refresh Rate?
Replies: 7
Views: 5297

Re: How to set Refresh Rate?

Thanks for your answer. Then I don't understand the point of the "exclusive" fullscreen mode in Love2D.
by UnixRoot
Sat Nov 13, 2021 10:49 am
Forum: Support and Development
Topic: How to set Refresh Rate?
Replies: 7
Views: 5297

Re: How to set Refresh Rate?

darkfrei wrote: Sat Nov 13, 2021 9:51 am Not sure, but it looks like that you need to change the love.run function
https://love2d.org/wiki/love.run
Thanks for your answer, but I don't want to change the game speed / FPS, ticks etc, I want my game to run at a set resolution and screen refresh rate (Hz) in exclusive fullscreen mode.
by UnixRoot
Sat Nov 13, 2021 6:21 am
Forum: Support and Development
Topic: How to set Refresh Rate?
Replies: 7
Views: 5297

How to set Refresh Rate?

Hello. Love2D offers 2 different full screen modes. The desktop fullscreen mode uses the resolution and refresh rate of the Desktop. But I would like to use the exclusive fullscreen mode. How can I set the refresh rate in Love2D in exclusive mode? I tested my game on an older CRT monitor capable of ...
by UnixRoot
Mon Nov 08, 2021 3:34 pm
Forum: Support and Development
Topic: Forward-scrolling racing game - Storing the track
Replies: 10
Views: 8421

Re: Forward-scrolling racing game - Storing the track

I still dont get it, but the hill is kinda cool tho. Pros : Real 3d geometry can be used for the hills The system is more consistent You can combine it with real 3D models, because you already have the projection math You're resolution independet You can use textures, mipmapping, even antialiasing ...
by UnixRoot
Mon Nov 08, 2021 8:50 am
Forum: Support and Development
Topic: Forward-scrolling racing game - Storing the track
Replies: 10
Views: 8421

Re: Forward-scrolling racing game - Storing the track

I dont understand where segments would be helpful here. 3D segments are great for real looking hills. And you don't have to draw and calculate the size and position of every line, but you can use some form of simple 3d projection and love2d's polygons or even textured meshes to finally render the s...