1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Released Quake 3 BSP loading & rendering example

Discussion in 'Made with GameMaker' started by MilkMan5x, Jul 10, 2018.

  1. MilkMan5x

    MilkMan5x Member

    Joined:
    Jun 29, 2016
    Posts:
    8
    Quake 3 BSP loading & rendering
    [​IMG]


    GitHub repo link (legacy repo)
    ==========================================================================

    So, back in 2017, I somehow decided to create a BSP loader.
    After few days of pain and agony, I managed to wrangle up some very basic loader... and then I forgot about it.

    But today, As I found this thing all dusty and forgotten,
    I thought this bad boy needs to see the light before it gets totally abandoned.
    So I polished a little and decided to Share with you, Folks.
    (Who knows? This might be come in handy and could be some good starting point on writing the map Loader.)

    So here it is, The very Minimal (AKA too-lazy-to-finish-it) Quake 3 BSP loader.

    ==========================================================================

    --=[Things implemented]=--
    "Leaf" culling using visibility data from the map
    6DOF(...kinda) 3D camera with Quake-like side tilt thing (You can backflip! ...sorta)

    Basic loader :
    Loading basic level geometry, leaves, lightmap and more.

    Basic(?) renderer :
    Able to render the "leaves" that is visible only
    Lightmap!
    (The renderer can still be optimized; As I didn't knew much about the Vertex buffers and used some inefficient method.)

    --=[Things NOT included]=--
    BEZIER PATCH (my urban weakness) - If you see some "holes" in the level, That's probably the Bezier patch model that's not loaded and rendering.

    Textures & Entities - My intent on writing this was to Learn about the BSP's level structure, So I didn't wrote them, Apparently.

    Many other things - As this boy's really Abandoned.

    Also there's "playable" .EXE file conveniently compiled in the GitHub's repo, Feel free to Take a gander at it!
    (It contains Brütal metal music and Some handsome & evil guy's voice; Be careful with the volume!)


    ==========================================================================

    --=[Screenshots]=--
    [​IMG]
    [​IMG]


    --=[GitHub]=--

    GitHub repo link (legacy repo)

    Quake 3 BSP loading & rendering
    (stronger & spicier & better, Hjåh!)

    [​IMG]
    [​IMG]

    GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader

    Hi. After chucking this old tech on this forum back in 2018, abandoned, Those haunted souls of railgun-holding quad-damage-loving-freaks kept haunting me every friday the 13th.
    That combined with the guilt of leaving some (potential) projects alone made me to return to this project & work a bit more on it.
    So Here I am, Re-wrote everything & made few improvements.
    The future of this project is still unknown, But at least I was able to make this thing a bit more usable.

    ==========================================================================

    This example features :
    Rendering of level geometry via the BSP with Potential visible set, Pre-baked in the map.

    3D camera with Quake-like side tilt thing
    Loading basic level geometry, leaves, lightmap and more.
    Bezier patches (Finally!)
    Texture loading & mapping (only if its available)
    Lightmap lighting model
    Lightvolume lighting (in test phase)

    Things not featured :
    Quake 3's shader pipeline (too much complicated for me to implement it :/)
    Frustum culling of leaves when rendering them (potential optimization)
    Level geometry texture atlas (another potential optimization)
    "Billboard" Type of leaffaces.

    ==========================================================================
    Heads up :
    In order to use this example, You'll need some resources from Quake 3 : Arena (or Quake live).
    Since including the resources in the example violates the Copyright law (and potentially dunk me in some sticky situations), You have to get them yourself.
    Thankfully the bare-minimum resources you need is just a .bsp / .pk3 / .zip map file.. And you can grab some of them from the Quake 3 map database (link).

    On the other hand, The assets (pak0.pk3) must be obtained by you. It can be found in quake 3's installation folder with the name [pak0.pk3], And you can grab the demo version of Quake 3 : Arena on steam for free, If you don't happen to have the full version of the game. Quake live's assets works just as fine as Q3A, So you can use that if you have one too.
    ==========================================================================
    Gallery
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    ==========================================================================
    GitHub repo link : https://github.com/TandyRum1024/gml-q3-bsp-loader
     
    Last edited: Oct 6, 2019
    okasion, kraifpatrik, Japster and 7 others like this.
  2. MilkMan5x

    MilkMan5x Member

    Joined:
    Jun 29, 2016
    Posts:
    8
    The deed has been done; I'm no longer hesitating to update this post to feature the latest build of my loader.
    Have fun & Happy coding y'all :>
     
    okasion likes this.
  3. okasion

    okasion Member

    Joined:
    Oct 11, 2019
    Posts:
    6
    Thanks, this is something I managed to do with C++ and OpenGL a lot time ago, but it was incredibly difficult; I was able to load a BSP map file, and even MD3 models, but again, it was way too difficult so I abandoned it.
    This will help some people a lot!
     
  4. MilkMan5x

    MilkMan5x Member

    Joined:
    Jun 29, 2016
    Posts:
    8
    Thank you. Loading MD3 models is quite impressive even if you used Cpp n' OGL, I would say.
    Also, I do hope this would help a lotta folks out there too.
     
    okasion likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice