Cube Renderer

Show off your games, demos and other (playable) creations.
bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Cube Renderer

Post by bobbyjones » Tue May 08, 2018 9:28 am

After discovering that it is now possible to make Minecraft in Love I went ahead and learned how to render cubes. I ultilized this tutorial and this repo to do it. It took me approximately 6 hours to do this. I commented the code for people who would like to build off of what I have. Next thing for me to learn how to do is to properly map textures.
Attachments
cubeRenderer.love
(55.13 KiB) Downloaded 263 times
Check out my most recent medium post, please give feedback.
Link

bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones » Wed May 09, 2018 4:19 am

Following the tutorial some more I was able to get model loading working. Its not the best and my image for the cube is horrible but I think it works. I plan to implement basic lighting next. If you guys see anything in the code that should be changed let me know. I'm not familiar with most of the naming conventions of the matrices and such. So if you could correct that that would be great.
Attachments
modelRenderer.love
(2.05 MiB) Downloaded 162 times
Check out my most recent medium post, please give feedback.
Link

User avatar
zorg
Party member
Posts: 2620
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Cube Renderer

Post by zorg » Wed May 09, 2018 6:16 am

In the first love file you posted, from how the cube's edges looked, it seemed like they were hollow, or inside-out; possibly an issue with the wrong faces being hidden/culled, or something?
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.

bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones » Wed May 09, 2018 6:38 am

It's the depth buffer. It has a bug.
Check out my most recent medium post, please give feedback.
Link

User avatar
Davidobot
Party member
Posts: 1147
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

Re: Cube Renderer

Post by Davidobot » Wed May 09, 2018 2:06 pm

Thanks for this example! It really helped me understand all the depth buffer and mesh features! I messed around with the latest model renderer for a bit and added more of an FPS control manner (press tab to lock mouse and then WASD + QE to fly around)

Also - about the depth buffer bug - the demo works without showing any signs of the bug on my main PC, but on Android (11.1) it does bug out.
Attachments
cubeRenderer.love
(868.98 KiB) Downloaded 161 times
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones » Wed May 09, 2018 3:22 pm

Davidobot I like your camera(which is what I wanted to do but i didn't get to it) but some how it cuts the fps in half. I looked at the code and there seems to be no major edit but the fps is cut in half. Unless I'm missing something of course.

edit: I think its the egg. I believe it has more polys then the glock. BTW if you try to use your own model make sure to export with triangulation.

edit2: It is not the egg's fault. Its the msaa.
Check out my most recent medium post, please give feedback.
Link

bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones » Wed May 09, 2018 10:51 pm

So the third edition to the this series is simple lighting. It uses only one light emitter(not sure if the shader can be made to work with more). There are two magic "numbers" in the shader that I didn't feel like making a variable for. They effect the self emittance of the model.
Attachments
gamestuff.love
(2.06 MiB) Downloaded 154 times
Check out my most recent medium post, please give feedback.
Link

User avatar
4aiman
Party member
Posts: 248
Joined: Sat Jan 16, 2016 10:30 am

Re: Cube Renderer

Post by 4aiman » Sat May 19, 2018 7:55 am


bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones » Sun May 20, 2018 9:50 am

4aiman wrote:
Sat May 19, 2018 7:55 am
Depth buffer not working on your computer I think.
Check out my most recent medium post, please give feedback.
Link

User avatar
4aiman
Party member
Posts: 248
Joined: Sat Jan 16, 2016 10:30 am

Re: Cube Renderer

Post by 4aiman » Mon May 21, 2018 5:12 pm

It seems to be the case. But why is it the case?
It's not like I don't play any games and/or have this kind of issues with every other there is.

My setup: Win 10 Pro 64bit, Palit GeeForce GT1030, video driver ver. 388.43.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests