Git Product home page Git Product logo

qll's Introduction

QLL : Level loaders

What is it?

QLL is a collection of libs aimed to game developers / enthusiasts who want to use existing game files

  • Game developers who don't want the hassle of creating a new file format for their game levels
  • People who want to bring existing game levels to new purposes (by creating viewers for example)

We are mainly targeting game levels which formats are well documented and open-source (to prevent us / library users of legal issues with file format)

A word about Licence

Those loaders are published under the WTFPLv2

If you don't understand, think its kind alike public domain / CC0 (basically that means that you can do anything you want)

Loaders

QLL_Q3: Quake3 bsp loader

This loader let you open Quake3 maps (or any game that uses IBSP version 0x02 format) All lumps can be retrived

Example usage:

#define QLL_Q3_IMPLEMENTATION // Do this define only in one CPP file
#include "qll_q3.h"

int main(int argc, char** argv)
{
    // In this example, we consider that a map called "my_map.bsp" is in the application folder
    qll::q3::Q3Level level = new qll::q3::Q3Level("my_map.bsp");
    
    const qll::q3::LevelData level_data = level.getData();
    
    // Example: we fetch entities key/values
    // Each map contained in the vector represents one entity with its key/values (all as string)
    std::vector<std::map<std::string, std::string>> entities = qll::q3::parse_entities(level_data.entities);
    
    // Example game code to load entities
    MyGame::EntityList::loadFromQ3(entities, level_data.models);
    
    // Another example: Extract all level textures names
    for (unsigned int i = 0; i < level_data.textures.size(); ++i)
	{
	    const qll::q3::Texture& texture_raw = level_data.textures[i];
	    MyGame::SomeTextureLoader::loadTexture(texture_raw.name);
    }
    
    // You can fetch many other data (like Models, Brushes, Faces and so on), just take a look at qll::q3::LevelData definition
    // But the data types are very similar to the ones used in http://www.mralligator.com/q3/

    return 0;
}

You can also extend the file to use your own containers / file classes, just take a look at the first #defines

TODO

  • More game loaders

Disclaimer

You will solely be responsible if you use this library to load copyrighted content (ie. official game assets)

Links

Feel free to ask in issues if you have any problems / suggestions

qll's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.