Page 2 of 6

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 9:31 am
by UnixRoot
Of course, you can rotate a mesh. It's drawn like any other drawable in Love2D.

Edit: I'm sorry, but I can't upload any examples at this stage. I'm using some copyrighted material for testing purposes right now. I have to get rid of those assets first. I'll share my engine if it's in a release worthy state and doesn't contain copyrighted material anymore.

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 7:20 pm
by Bobble68
UnixRoot wrote: Sun May 14, 2023 9:31 am Of course, you can rotate a mesh. It's drawn like any other drawable in Love2D.

Edit: I'm sorry, but I can't upload any examples at this stage. I'm using some copyrighted material for testing purposes right now. I have to get rid of those assets first. I'll share my engine if it's in a release worthy state and doesn't contain copyrighted material anymore.
Ah ok thanks! I'll probably keep working with what I've currently got until I can work out how to do a better way of doing this

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 8:56 pm
by pgimeno
The instructions say to point with the mouse and press space to fly. How do I point with the mouse? The pointer disappears, and it only reappears when it's outside the window. All I can do is fly vertically or, if I move the mouse at random, do full turns, but I don't really seem to have control of flight with the mouse.

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 10:02 pm
by dusoft
pgimeno wrote: Sun May 14, 2023 8:56 pm The instructions say to point with the mouse and press space to fly. How do I point with the mouse? The pointer disappears, and it only reappears when it's outside the window. All I can do is fly vertically or, if I move the mouse at random, do full turns, but I don't really seem to have control of flight with the mouse.
Works for me.

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 10:09 pm
by Bobble68
pgimeno wrote: Sun May 14, 2023 8:56 pm The instructions say to point with the mouse and press space to fly. How do I point with the mouse? The pointer disappears, and it only reappears when it's outside the window. All I can do is fly vertically or, if I move the mouse at random, do full turns, but I don't really seem to have control of flight with the mouse.
There should be a white dot that replaces it - if you haven't moved the mouse for a while it disappears, but it reappears when you move it again.

Edit: Oh it might potentially break if you have any controllers plugged in, but its been a while since I messed with it

Edit 2: I just tested it, it seems it is a controller issue. I never finished implementing controller support but I did mess with it a bit, I seemed to have forgotten to disable it.

Re: In the Heavens - Demo 0.1.0

Posted: Sun May 14, 2023 11:57 pm
by pgimeno
That was it, thanks! Unplugging the controller did the trick.

Re: In the Heavens - Demo 0.1.0

Posted: Mon May 15, 2023 2:36 pm
by Rigachupe
Bobble68 wrote: Sun May 14, 2023 7:20 pm
UnixRoot wrote: Sun May 14, 2023 9:31 am Of course, you can rotate a mesh. It's drawn like any other drawable in Love2D.

Edit: I'm sorry, but I can't upload any examples at this stage. I'm using some copyrighted material for testing purposes right now. I have to get rid of those assets first. I'll share my engine if it's in a release worthy state and doesn't contain copyrighted material anymore.
Ah ok thanks! I'll probably keep working with what I've currently got until I can work out how to do a better way of doing this
Maybe this will help you solve some speed improvements. The demo shows how a textured polygon (currently a quad defined as two triangles) can be drawn.

One of the quads is colored per vertex, uses rock texture. The other quad uses no colors so and has a sand texture. Both of them i set to repeat and UV generated so it has 4x4 tiles.

If you or others want to experiment with this demo just rename the .love file to .zip and unzip the project. Add more vertexes to polygons. Experiment with colors to define some nice light effects. And i hope it helps in some way.
polygonizer.png
polygonizer.png (355.4 KiB) Viewed 194683 times

Re: In the Heavens - Demo 0.1.0

Posted: Mon May 15, 2023 5:57 pm
by UnixRoot
That's really nice, but isn't your example a little over the top for drawing a textured mesh? I mean, only a few lines of code are missing for it to be a 3D engine. You can draw textured 2D meshes with a far simpler approach.

Re: In the Heavens - Demo 0.1.0

Posted: Mon May 15, 2023 6:14 pm
by Rigachupe
UnixRoot wrote: Mon May 15, 2023 5:57 pm That's really nice, but isn't your example a little over the top for drawing a textured mesh? I mean, only a few lines of code are missing for it to be a 3D engine. You can draw textured 2D meshes with a far simpler approach.
Ah i see... there is this function to do the trick. It should work too with less code i suppose. Did not test it myself.
https://love2d.org/wiki/love.graphics.newMesh

PS:Yes, the 3D hidden inside the example is a preparation for later special light effects and other things. When optimized it should work nicely directly with the modern GPU's.

Re: In the Heavens - Demo 0.1.0

Posted: Mon May 15, 2023 9:25 pm
by Bobble68
Rigachupe wrote: Mon May 15, 2023 6:14 pm
Ah i see... there is this function to do the trick. It should work too with less code i suppose. Did not test it myself.
https://love2d.org/wiki/love.graphics.newMesh

PS:Yes, the 3D hidden inside the example is a preparation for later special light effects and other things. When optimized it should work nicely directly with the modern GPU's.
UnixRoot wrote: Mon May 15, 2023 5:57 pm That's really nice, but isn't your example a little over the top for drawing a textured mesh? I mean, only a few lines of code are missing for it to be a 3D engine. You can draw textured 2D meshes with a far simpler approach.
Are there any good examples of this I can look at? If I'm understanding correctly, I need to make 1 mesh per island, and need to place vertices where the pixels would normally go?