Progress thread for original version (2006)
Moderator: benryves
Dude, get real
Sounds like you need "BSP trees for dummies",
unfortunately that page (http://qxx.planetquake.gamespy.com/bsp/) is offline
Sounds like you need "BSP trees for dummies",
unfortunately that page (http://qxx.planetquake.gamespy.com/bsp/) is offline
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
I still haven't made a single BSP tree generator in my life. I still know the overall algo and here's my tut:
1) Insert line, by splitting it against the infinite representations of the existing lines already in the BSP.
2) Go to 1 until there are no more lines.
Done. Would be real nice to see a BSP-based 3D app on the calc
1) Insert line, by splitting it against the infinite representations of the existing lines already in the BSP.
2) Go to 1 until there are no more lines.
Done. Would be real nice to see a BSP-based 3D app on the calc
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I've been a bit busy of late, but I've changed a few things; still no occlusion or clipping (boo!) but there are now variable height sectors (as well as a variable camera height).
The odd flickering lines in places are due to 8-bit overflows when truncating a 16-bit screen coordinate to an 8-bit one. Note the smoothness (24/16-bit divisions for projection to screen rather than 16/8 and a lookup table) and the backface culling on the central "cube".
The odd flickering lines in places are due to 8-bit overflows when truncating a 16-bit screen coordinate to an 8-bit one. Note the smoothness (24/16-bit divisions for projection to screen rather than 16/8 and a lookup table) and the backface culling on the central "cube".
Wow, it's so fast... Pretty incredible
The backface culling doesn't work very well with the variable camera height yet though. When you look on top of the central cube you don't see the full top square. Pretty amazing nevertheless
The backface culling doesn't work very well with the variable camera height yet though. When you look on top of the central cube you don't see the full top square. Pretty amazing nevertheless
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Even if I don't use it in a game myself, I'm aiming for the engine to be nice and modular (along with a simple level format) so that it's easy enough for someone else to plug a game into it. Of course, this also means that if it crashes and burns, someone else can help me out (for example, all vertices transformed and rotated by code in one source file, then the walls are projected and drawn in another, input handling and movement in yet another and so on).
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
The current data structures are:
So, by clearing the least significant bit in a wall's (line) flags byte, it will be culled if required. Setting it sets the wall as double sided, so it is never culled.
Code: Select all
vertices:
.dw <x>, <y>
...
lines:
.db <start vertex>, <end vertex>, <flags>, <sector>
...
sectors:
.dw <ceiling height>, <floor height>
...
- GuillaumeH
- Regular Member
- Posts: 143
- Joined: Fri 17 Dec, 2004 8:30 pm
- Contact:
That would be great news to have at last a 3D engine ready to be used for a game Hold on, benryves!benryves wrote:Even if I don't use it in a game myself, I'm aiming for the engine to be nice and modular (along with a simple level format) so that it's easy enough for someone else to plug a game into it.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
I'm having real issues with clipping lines (walls)... I haven't implemented anything in assembly yet, it's all being done in QB for the moment.
A thread on GDNet.
The problem is more detecting whether a line lies completely outside or just inside the view, as I'm currently "accidentally" moving certain walls that were completely outside into the view, or ending up with zero-length walls on the x=y or x=-y boundaries.
A thread on GDNet.
The problem is more detecting whether a line lies completely outside or just inside the view, as I'm currently "accidentally" moving certain walls that were completely outside into the view, or ending up with zero-length walls on the x=y or x=-y boundaries.