<3D - A simple 3d library for LOVE

Showcase your libraries, tools and other projects that help your fellow love users.
MattRB
Prole
Posts: 11
Joined: Tue Sep 25, 2012 8:16 pm

<3D - A simple 3d library for LOVE

Post by MattRB »


(Runs at 70fps for me on normal LOVE and 300-500 on LuaJIT LOVE)

<3D is a simple 3d library for LOVE that will enable users to make simple 3d games. It should allow a few thousand colored triangles/quads to be rendered in real time. Here's a sample of the API:

Code: Select all

Game = Object:new()

function Game:Game()
    self.mdl = Model:new(objstring)
    self.camera = Camera:new()
end

function Game:update(dt)
    self.mdl:rotate(1*dt, 1*dt, 1*dt)
end

function Game:draw()
    self.camera:draw(self.mdl)
end

love.state(Game:new())
That's using my "loove" project, but it will work without that too. How about a demo?
monkey.love
(22.38 KiB) Downloaded 243 times
https://github.com/MatthewBlanchard/Love3D
Last edited by MattRB on Sun Mar 24, 2013 5:07 am, edited 3 times in total.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: <3D - A simple 3d library for LOVE

Post by xXxMoNkEyMaNxXx »

Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: <3D - A simple 3d library for LOVE

Post by Ref »

Ahm ... I'm thinking textured triangles before texture meshes can be used (if they are triangulated.)
User avatar
mickeyjm
Party member
Posts: 237
Joined: Thu Dec 29, 2011 11:41 am

Re: <3D - A simple 3d library for LOVE

Post by mickeyjm »

xXxMoNkEyMaNxXx wrote:Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...
Shameless plug is shameless...

Anyway: That lloks really good, if you could add some colour/lines to see different vertexes it might be clearer as to what shape it is because ATM its all 1 colour
Your screen is very zoomed in...
MattRB
Prole
Posts: 11
Joined: Tue Sep 25, 2012 8:16 pm

Re: <3D - A simple 3d library for LOVE

Post by MattRB »

mickeyjm wrote:
xXxMoNkEyMaNxXx wrote:Why don't you implement my Textured polygons for all? :) I'm thinking of textured meshes...
Shameless plug is shameless...

Anyway: That lloks really good, if you could add some colour/lines to see different vertexes it might be clearer as to what shape it is because ATM its all 1 colour
Improved demo:
<3demo.love
(5.15 KiB) Downloaded 220 times
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: <3D - A simple 3d library for LOVE

Post by Ref »

I think what xXxMoNkEyMaNxXx would like is something like the demo below only with a real 3D system (like yours) that can handle 3D operations (on quads rather than triangles) rather than the cobbed up one I used in the demo.
Just some chopped together code to show what could be done with textured quads (really quire limiting).
Code doesn't deal properly with a limited number of quads because of the primitive way 'z' data is handled.
Textured triangles really would be nice!
Attachments
textured_torus.love
Simpe demo a textured torus
(18.06 KiB) Downloaded 197 times
User avatar
Username
Citizen
Posts: 54
Joined: Mon Jan 28, 2013 1:25 pm

Re: <3D - A simple 3d library for LOVE

Post by Username »

After playing a bit with your last example, i got this:

Image
Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: <3D - A simple 3d library for LOVE

Post by Kyle »

@Username

Ref: "Soon."
MattRB
Prole
Posts: 11
Joined: Tue Sep 25, 2012 8:16 pm

Re: <3D - A simple 3d library for LOVE

Post by MattRB »

User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: <3D - A simple 3d library for LOVE

Post by Ref »

Username wrote:After playing a bit with your last example, i got this:

Image
Never said it was idiot proof (sorry).
Just an exampe to let you explore the limits of what you could do at this point in time with textured quads.
Could have just given you a rotating torus but that wouldn't have been any fun.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests