Wolf3d-style 3d engine (proof of concept)
#41
Posted 17 June 2013 - 03:02 PM
http://www.computerc...__fromsearch__1
#42
Posted 17 June 2013 - 06:35 PM
billysback, on 17 June 2013 - 01:14 PM, said:
Earlier Gopher said about entities scaling badly and stuff, so to test this theory I tried it out. So far I have done nothing but prove him correct, however whilst playing around with his code I added a few new features
Here's a pastebin:
http://pastebin.com/VHrMFTE7
what I added:
"bobbing" - you bobb when you move now... rather simple.
"vision" - adds vision distance to the game, can't see anything but a gray silhouette when out of vision radius
"mouse" - can control the game with the mouse (will explain later)
"sprint" - lets you move faster, toggled by middle mouse button or "e" key
"white_circle" - fits with ceilings_floors and vision kinda, I don't like it tbh
"ceilings_floors" - makes the floors lightGray and the ceilings black
NOTE: all of this can be toggled off at the top of the code with the "settings" table, just make things true/false
mouse controls:
clicking the left quarter of the screen with your left mouse button moves you left,
clicking the right quarter of the screen with your left mouse button moved you right,
clicking the top-middle quarter of the screen with your left mouse button moves you forwards,
clicking the bottom-middle quarter of the screen with your left mouse button moves you backwards,
clicking the right side of the screen with your right mouse button makes you look right,
clicking the left side of the screen with your right mouse button makes you look left,
clicking the middle mouse button will toggle sprint
NOTE: mouse_drag is enabled so move your mouse slightly side to side inside one of these zones to move properly
this isn't trying to steal Gopher's thunder or anything, it's just me sharing the results of what Gopher produced, btw Gopher, this is awesome
I might still try and work on getting entities to work but I dunno...
maybe adding switched and doors would be cooler, with the use-item key being F or clicking the middle of the screen.
(quoted billysback's whole post to save it from botp hell)
billysback + jesusthekiller: Excellent, I'm glad to see people working with this code Keep sharing anything you make!
#44
Posted 24 July 2013 - 08:37 AM
#45
Posted 14 September 2013 - 01:53 PM
#46
Posted 08 November 2013 - 10:43 PM
#47
Posted 22 May 2016 - 07:06 AM
#48
Posted 24 May 2016 - 07:07 AM
Whilst this is EPIC, this is technically NOT 3D. It is a 2d plane mapped with perspective to give an illusion of 3D. Minecraft would be impossible to implement. Portal, thats iffy. Take example of how you cannot look up and down. Portal COULD work, but it wouldn't be able to work the best.
#49
Posted 24 May 2016 - 03:43 PM
bluebird173, on 24 May 2016 - 07:07 AM, said:
Technically all 3D on a computer is just a 2D plane mapped to give the illusion of 3D. It wouldn't be too hard to adapt this to look up and down either: just adding pitch as well as yaw. The real limiting factor with ComputerCraft 3D engines is performance. Lua is not a great number crunching language and so any implementation will be reasonably slow. This combined with the 20fps cap (due to the server tick rate) means you're never going to get a very responsive game.
#50
Posted 24 July 2016 - 03:21 AM
#51
Posted 24 July 2016 - 03:33 AM
#54
Posted 24 July 2016 - 05:34 PM
The reason I ask being that I'm trying to rig sine sure of VR four monitor thing, and 3D Maze uses stitch to wrap around all four.
Is FOV changing possible with this, and if it is, how?
#55
Posted 04 August 2016 - 03:38 AM
Increasing those angles leads to a wider FOV, decreasing them shrinks it.
#56
Posted 11 November 2016 - 03:32 PM
remiX, on 01 March 2013 - 04:47 AM, said:
Try add multiplayer support
This post probably doesn't belong here, but is it possible to have more layers of rendering? I mean instead of a floor, then a layer of blocks, then a ceiling.
#57
Posted 12 November 2016 - 01:41 AM
id's next engine (used by Doom) was a little closer to 3D, in that the height of the floor / ceiling could vary at each map location (though it was still only possible to have up to one gap between the two). This made it a good deal more complex, as finding the closest wall to the camera (eg created by a raised floor or lowered ceiling) did not ensure that you'd found the only wall that needed to be drawn within that display column.
Having multiple gaps per section of the map would ramp the workload even higher - each would add another couple of checks to be performed by each ray for each map location. Sure, anything's possible, but performance would definitely be suffering by that point.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users