Page 7 of 21

Re: LOVE3D: For Realsies

Posted: Tue Nov 04, 2014 10:10 am
by zorg
even with raw opengl calls, i could utilize it as 3D backgrounds for a 2D game, for example; that wouldn't need too much power. :3

Re: LOVE3D: For Realsies

Posted: Tue Nov 04, 2014 5:43 pm
by DaedalusYoung
Karai17 wrote:As I said in another post, I make no illusions that LOVE is useful for the next Call of Duty or Grand Theft Auto.
From what I can see, I'd say it will be for a GTA1 or GTA2 clone. With curved roads and better car handling. And larger maps. And better train integration. And more interesting storyline.

Of course a topdown game can be done with LÖVE already, but the 3D part of the old GTA games are the buildings, which are a bit harder to do for those who don't understand Shader code at all.

Re: LÖVE3D

Posted: Tue Nov 04, 2014 6:17 pm
by Karai17
I've updated the OP to be a bit cleaner. I'll add more downloads when they become available.

Re: LÖVE3D

Posted: Wed Nov 05, 2014 10:01 pm
by Karai17


Turrets rotate and junk, now. Also new Tech Demo!

Edit: Updated the demo to fix several major bugs (oops) and released the full source for the custom LOVE build (99.99% of it was already publicly available). If someone wants to build us a copy for OS X, that'd be swanky.

Re: LOVE3D: For Realsies

Posted: Thu Nov 06, 2014 2:06 am
by Rukiri
miko wrote:
Jasoco wrote:Okay. When you release a fully playable game with a large open 3D world, that works on OS X and Linux, we'll all be very excited and happy and very eager to find out how you did it all.
I think no one expects it to rival unity or other real 3D engines, but for me the possibility for really simple 3D would be more than OK. I do not have the time to play with full 3D (models, worlds, etc), but would like to play with something easy and not time-consuming (and love2d is perfect for this)
I believe this is for the most part "good enough" when it comes to 2D games, and I'd hope it wouldn't rival unity as that alone would be a massive undertaking...

As long as I can make a cool 3d-pixelated overworld I'm happy(just think back to the ps1 days).

Re: LÖVE3D

Posted: Thu Nov 06, 2014 2:08 am
by Karai17
If you check out the videos I've posted throughout this thread or my dev blog, you'll see that it is very much capable of doing some decent 3D rendering.

Re: LÖVE3D

Posted: Thu Nov 06, 2014 9:01 am
by miko
Karai17 wrote: Edit: Updated the demo to fix several major bugs (oops) and released the full source for the custom LOVE build (99.99% of it was already publicly available). If someone wants to build us a copy for OS X, that'd be swanky.
I have built it succesfully on arch linux. The cube demo works, but for panzer I get:

Code: Select all

Cannot compile pixel shader code:
0:1(12): warning: extension `GL_EXT_gpu_shader4` unsupported in fragment shader
p:1(1): error: #extension directive is not allowed in the middle of a shader
triggered by assets/shaders/fxaa.glsl

Is it because I am running on Mesa?

Code: Select all

GL_VERSION: 3.0 Mesa 10.3.2
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile 
There is no GL_EXT_gpu_shader4 extension...
Anyways, cube demo works great!

Edit: How can I paint cubes with a solid color?

Re: LÖVE3D

Posted: Thu Nov 06, 2014 2:28 pm
by clofresh
Such an elegant, well documented codebase:

Code: Select all

-- I DO WHAT I WANT SLIME
-- YOU'RE NOT MY REAL DAD
ffi.cdef([[void *SDL_GL_GetProcAddress(const char *proc);]])
;)

At first glance this feels like a wtf project, since LOVE is taking OpenGL, a 3d graphics library, and simplifying it to a 2d library, which you're then turning into a 3d library again. But judging from all the homegrown 3d engines and the 3d-in-2d features like dynamic lighting people are creating, I think there's a sizable demand for at least some 3d in LOVE.

The sweet spot wouldn't be a Call of Duty kind of game, but maybe more of the Smash Bros or Don't Starve type of games which are mostly 2d with 3d in some spots.

One interesting use case I've seen other game devs do is create 3d models in Blender but export them into 2d animation sprites for their 2d games. Having the source model be in 3d lets them easily create new animations and different perspectives of existing animations which cuts down a lot of animation time. Being able to load the 3d models directly would cut out another step in that process. I'm assuming that Unity can do that with their 2d mode, but fuck Unity. :P

Re: LÖVE3D

Posted: Thu Nov 06, 2014 4:23 pm
by shakesoda
miko wrote:I have built it succesfully on arch linux. The cube demo works, but for panzer I get:

Code: Select all

Cannot compile pixel shader code:
0:1(12): warning: extension `GL_EXT_gpu_shader4` unsupported in fragment shader
p:1(1): error: #extension directive is not allowed in the middle of a shader
triggered by assets/shaders/fxaa.glsl

Is it because I am running on Mesa?

Code: Select all

GL_VERSION: 3.0 Mesa 10.3.2
GL_RENDERER: Mesa DRI Intel(R) Ivybridge Mobile 
There is no GL_EXT_gpu_shader4 extension...
Anyways, cube demo works great!

Edit: How can I paint cubes with a solid color?
Yeah, Mesa doesn't work for this. We'd have to make LOVE use a newer GL version than it does. Mesa doesn't support the extension form of the functionality we use nor does it support #extension not being at the very beginning of the shader...

It'll run fine if we disabled some of the post processing, though, I might have to look into that. We need gpu_shader4 for FXAA (totally optional) and the 3d texture color correction (much less optional). There are ways around it, but it'd be nice to have 3D textures in love as a first-class citizen, they're very useful.

To make the cubes a solid color you can either send u_Kd to the shader with whatever color you want or give it a new shader like so:

Code: Select all

#ifdef VERTEX
	attribute vec4	v_position;

	uniform mat4	u_projection;
	uniform mat4	u_view;
	uniform mat4	u_model;

	vec4 position(mat4 transform_projection, vec4 vertex_position) {
		return u_projection * u_view * u_model * v_position;
	}
#endif

#ifdef PIXEL
	uniform vec4 u_color = vec4(1.0, 0.0, 1.0, 1.0);

	vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords) {
		return u_color;
	}
#endif
This will give you solid colored objects in either magenta or whatever you send to the shader as u_color.
clofresh wrote:Such an elegant, well documented codebase:

Code: Select all

-- I DO WHAT I WANT SLIME
-- YOU'RE NOT MY REAL DAD
ffi.cdef([[void *SDL_GL_GetProcAddress(const char *proc);]])
This is my favorite comment in the whole codebase.
The sweet spot wouldn't be a Call of Duty kind of game, but maybe more of the Smash Bros or Don't Starve type of games which are mostly 2d with 3d in some spots.

One interesting use case I've seen other game devs do is create 3d models in Blender but export them into 2d animation sprites for their 2d games. Having the source model be in 3d lets them easily create new animations and different perspectives of existing animations which cuts down a lot of animation time. Being able to load the 3d models directly would cut out another step in that process. I'm assuming that Unity can do that with their 2d mode, but fuck Unity. :P
That's pretty much the actual intent of this, we're just doing what we like doing and taking it way too far!

Re: LÖVE3D

Posted: Fri Nov 07, 2014 12:32 am
by Karai17
Updated the Windows binary and Source links. The source patch is no longer needed and can be compiled as-is.