Cube Renderer

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

Cube Renderer

Post by bobbyjones »

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 813 times
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones »

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 734 times
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Cube Renderer

Post by zorg »

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: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones »

It's the depth buffer. It has a bug.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Cube Renderer

Post by Davidobot »

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 469 times
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones »

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.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Cube Renderer

Post by bobbyjones »

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 434 times
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Cube Renderer

Post by 4aiman »

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

Re: Cube Renderer

Post by bobbyjones »

4aiman wrote: Sat May 19, 2018 7:55 am
Depth buffer not working on your computer I think.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Cube Renderer

Post by 4aiman »

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: No registered users and 0 guests