LÖVE3D

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
zorg
Party member
Posts: 2984
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: LOVE3D: For Realsies

Post by zorg » Tue Nov 04, 2014 10:10 am

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
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

User avatar
DaedalusYoung
Party member
Posts: 402
Joined: Sun Jul 14, 2013 8:04 pm

Re: LOVE3D: For Realsies

Post by DaedalusYoung » Tue Nov 04, 2014 5:43 pm

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.

User avatar
Karai17
Party member
Posts: 903
Joined: Sun Sep 02, 2012 10:46 pm

Re: LÖVE3D

Post by Karai17 » Tue Nov 04, 2014 6:17 pm

I've updated the OP to be a bit cleaner. I'll add more downloads when they become available.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
Karai17
Party member
Posts: 903
Joined: Sun Sep 02, 2012 10:46 pm

Re: LÖVE3D

Post by Karai17 » Wed Nov 05, 2014 10:01 pm



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.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
Rukiri
Citizen
Posts: 68
Joined: Mon Jun 27, 2011 5:52 am

Re: LOVE3D: For Realsies

Post by Rukiri » Thu Nov 06, 2014 2:06 am

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).

User avatar
Karai17
Party member
Posts: 903
Joined: Sun Sep 02, 2012 10:46 pm

Re: LÖVE3D

Post by Karai17 » Thu Nov 06, 2014 2:08 am

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.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
miko
Party member
Posts: 409
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: LÖVE3D

Post by miko » Thu Nov 06, 2014 9:01 am

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?
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples

User avatar
clofresh
Citizen
Posts: 87
Joined: Sun Jul 26, 2009 4:21 pm
Contact:

Re: LÖVE3D

Post by clofresh » Thu Nov 06, 2014 2:28 pm

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
----------------------------------------
Sluicer Games

User avatar
shakesoda
Citizen
Posts: 78
Joined: Thu Sep 25, 2014 11:57 am
Location: Seattle, WA
Contact:

Re: LÖVE3D

Post by shakesoda » Thu Nov 06, 2014 4:23 pm

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!
excessive ❤ moé (LÖVE3D, CPML, ...). holo on IRC.

User avatar
Karai17
Party member
Posts: 903
Joined: Sun Sep 02, 2012 10:46 pm

Re: LÖVE3D

Post by Karai17 » Fri Nov 07, 2014 12:32 am

Updated the Windows binary and Source links. The source patch is no longer needed and can be compiled as-is.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests