dice3 for RPGs

Showcase your libraries, tools and other projects that help your fellow love users.
way
Prole
Posts: 8
Joined: Thu Apr 29, 2010 3:18 pm

dice3 for RPGs

Post by way »

Finished my dice roller and updated to 0.8.
Do tell me if you use this in an acual RPG session!

Source code is also at http://code.google.com/p/dice3/

Regards, way
Attachments
dice3.love
(33.88 KiB) Downloaded 405 times
Delibrete
Prole
Posts: 37
Joined: Mon Dec 05, 2011 11:51 am

Re: dice3 for RPGs

Post by Delibrete »

Very nice way! I love it! :D
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: dice3 for RPGs

Post by T-Bone »

Holy crap, it's like 3D and stuff!!1
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: dice3 for RPGs

Post by SiENcE »

T-Bone wrote:Holy crap, it's like 3D and stuff!!1
It's old. Look here: viewtopic.php?f=5&t=1692
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: dice3 for RPGs

Post by Ensayia »

I remember this, it's still crazy impressive that you got basic 3d lighting, collision, and physics. However, it demonstrated the problem of making a 3d game for a 2d engine, in that even on my beefy machine it slows to shit if you add more than 3 dice or so.

Nevertheless, still impressive.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: dice3 for RPGs

Post by Jasoco »

It's not really that simple. 3D is pretty easy to calculate and images draw pretty fast. It really just comes down to how many images and calculations are being performed per frame.

I've very easily shown that 3D can be pretty fast. It just depends on the details and making sure not to do too many calculations on stuff that isn't even on screen.

Löve just doesn't have tools that would be useful for 3D. i.e. texture distorting. Remember my Star Fox and 3D cube demos? They were simple love.graphics.polygon()'s that were drawn depending on the right condition. The triangle is facing the camera and is on screen. In the update() function, calculations were performed on every triangle. The X, Y and Z 2D locations on the screen and if those three points are in clockwise order. In an optimized engine, every 3D object is separate and the world is divided into sections. The game first figures out what sections are visible, then the polygonal points are calculated and everything visible is rendered to the screen.

Löve has already proven it can perform many many calculations very quickly. And drawing is pretty fast too. If Löve had access to the right OpenGL3D functions, it could do 3D pretty well. Maybe not Crysis level 3D or anything too high poly count, but simpler things could definitely be done with the right optimizations and coding. Not to mention direct access to OpenGL 3D would also allow polygon clipping. And you don't really need to worry about real-time lighting if you just use pre-calculated lighting. i.e. Normals.

It's really all about how much you need to calculate and how fast you figure that out.

If I sat down and decided to actually concentrate, I could replicate Star Fox 100%. Since it has no textured polygons, it would look pretty much the same too. And if I could replicate Star Fox I could easily create a simpler low-polygon platformer. The main difference being that no texture warping means it would have to be single color triangles. But it could be done. The actual hard part is not the 3D, it's the physics and the polygonal animation, and that's where I personally would fail. Since Löve obviously doesn't have libraries for manipulating polygonal objects like Unity would. But Star Fox. Sure. Doable. And on my list. For the long term. But you've already seen my list of things I'd like to do, and it's looooong.

But then again this is off-topic.

Also, I get 100FPS in LuaJIT 0.8.0 with 3 dice.
User avatar
Codex
Party member
Posts: 106
Joined: Tue Mar 06, 2012 6:49 am

Re: dice3 for RPGs

Post by Codex »

Jasoco wrote:It's not really that simple. 3D is pretty easy to calculate and images draw pretty fast. It really just comes down to how many images and calculations are being performed per frame.

I've very easily shown that 3D can be pretty fast. It just depends on the details and making sure not to do too many calculations on stuff that isn't even on screen.

Löve just doesn't have tools that would be useful for 3D. i.e. texture distorting. Remember my Star Fox and 3D cube demos? They were simple love.graphics.polygon()'s that were drawn depending on the right condition. The triangle is facing the camera and is on screen. In the update() function, calculations were performed on every triangle. The X, Y and Z 2D locations on the screen and if those three points are in clockwise order. In an optimized engine, every 3D object is separate and the world is divided into sections. The game first figures out what sections are visible, then the polygonal points are calculated and everything visible is rendered to the screen.

Löve has already proven it can perform many many calculations very quickly. And drawing is pretty fast too. If Löve had access to the right OpenGL3D functions, it could do 3D pretty well. Maybe not Crysis level 3D or anything too high poly count, but simpler things could definitely be done with the right optimizations and coding. Not to mention direct access to OpenGL 3D would also allow polygon clipping. And you don't really need to worry about real-time lighting if you just use pre-calculated lighting. i.e. Normals.

It's really all about how much you need to calculate and how fast you figure that out.

If I sat down and decided to actually concentrate, I could replicate Star Fox 100%. Since it has no textured polygons, it would look pretty much the same too. And if I could replicate Star Fox I could easily create a simpler low-polygon platformer. The main difference being that no texture warping means it would have to be single color triangles. But it could be done. The actual hard part is not the 3D, it's the physics and the polygonal animation, and that's where I personally would fail. Since Löve obviously doesn't have libraries for manipulating polygonal objects like Unity would. But Star Fox. Sure. Doable. And on my list. For the long term. But you've already seen my list of things I'd like to do, and it's looooong.

But then again this is off-topic.

Also, I get 100FPS in LuaJIT 0.8.0 with 3 dice.
If one were to make a Minecraft 3D clone, would that be suitable for LOVE? Would it be better than using java or Unity? I recall seeing Maurice make some kind of Minecraft demo, but it only displayed like 2-4 chucks of blocks and got around 40-60 FPS on my computer.
User avatar
Camewel
Prole
Posts: 20
Joined: Thu Apr 19, 2012 5:58 pm

Re: dice3 for RPGs

Post by Camewel »

Maurice made the Illusionary Engine, and while it is capable of rendering a small 3D scene, it's hardly going to have fun rendering out a full minecraft landscape. If you want to make a 3D game, use a 3D engine.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: dice3 for RPGs

Post by Jasoco »

Yeah. Minecraft is WAY too complex. As I said, it's all about how many triangles or image polygons you want to draw at once. And Minecraft needs to render THOUSANDS every frame. Even in "Near" mode. Java is actually much faster than Löve in that department. I wish Löve were as fast as Java. Would be nice. But Java sucks harder than the toilet in an airplane bathroom, so I'll stick with Löve.
Last edited by Jasoco on Sat Apr 21, 2012 12:55 am, edited 2 times in total.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: dice3 for RPGs

Post by slime »

LuaJIT is as fast or faster than Java, AFAIK - especially when you use FFI bindings rather than the traditional lua-c api for things like the OpenGL functions. Check out https://github.com/malkia/ufo and https://github.com/ncarlson/eiga .
Minecraft utilizes OpenGL for most of its graphics work, instead of relying on software-side Java code to transform a 3d scene into 2d screen-space (which is what LÖVE "3D" things are doing, essentially).
Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests