<commit_before>/******************************************************************************
 * This file is part of the Gluon Development Platform
 * Copyright (c) 2010 <NAME> <<EMAIL>>
 * Copyright (C) 2010 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef GLUON_ENGINE_GAMEPROJECT_H
#define GLUON_ENGINE_GAMEPROJECT_H

#include "gluon_engine_export.h"
#include "scene.h"

#include <core/gluonobject.h>

#include <QtCore/QSharedData>
#include <QtCore/QUrl>

namespace GluonEngine
{
    const QString projectSuffix = ".gluon";
    class GameProjectPrivate;

    /**
     * The GameProject class describes and contains a complete game project,
     * and all the meta information that goes with it, making it into a
     * complete game (minus engine, which is Gluon::Game and all the
     * Gluon::Component subclasses). As such it is the top level of the
     * GameObject hierarchy.
     *
     * The project's children (all assets, gameobjects and prefabs in the
     * project) are all found in the QObject hierarchy - they are simply
     * anchored by the QObject parent/child system.
     *
     * \note To find out which is the current scene in a game, use Game::currentScene
     */
    class GLUON_ENGINE_EXPORT GameProject : public GluonCore::GluonObject
    {
            Q_OBJECT;
            GLUON_OBJECT( GluonEngine::GameProject );

            /**
             * A long description of the game. This can contain any string data, but
             * you should attempt to use simplified HTML syntax for markup.
             *<commit_msg>Add documentation regarding the gameproject bundle format<commit_after>/******************************************************************************
 * This file is part of the Gluon Development Platform
 * Copyright (c) 2010 <NAME> <<EMAIL>>
 * Copyright (C) 2010 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef GLUON_ENGINE_GAMEPROJECT_H
#define GLUON_ENGINE_GAMEPROJECT_H

#include "gluon_engine_export.h"
#include "scene.h"

#include <core/gluonobject.h>

#include <QtCore/QSharedData>
#include <QtCore/QUrl>

namespace GluonEngine
{
    const QString projectSuffix = ".gluon";
    class GameProjectPrivate;

    /**
     * The GameProject class describes and contains a complete game project,
     * and all the meta information that goes with it, making it into a
     * complete game (minus engine, which is Gluon::Game and all the
     * Gluon::Component subclasses). As such it is the top level of the
     * GameObject hierarchy.
     *
     * The project's children (all assets, gameobjects and prefabs in the
     * project) are all found in the QObject hierarchy - they are simply
     * anchored by the QObject parent/child system.
     *
     * \note To find out which is the current scene in a game, use Game::currentScene
     * 
     * The structore of a game project as found on the disk is as follows:
     * - (gamename).gluon/ - This is a directory. Think of it as a bundle (NeXTStep style)
     *   - Assets/ - contains all the assets in a game
     *   - Cache/ - contains a number of directories, one for each asset which requires a data cache
     *   - Scenes/ - contains a file for each scene, each named (scenename).gluonscene
     *   - game.gluonproject
     *   - game.gluonmeta
     *   - screenshot.png
     *   - game.png - a 128x128 icon
     *   - game.ico - a Windows format icon file
     *   - .directory
     *   - desktop.ini
     *   - .ds_store - 
     * 
     * Naming conventions for the contents of the Assets and Scenes directories:
     * 
     * - Filter all non-alphanumeric characters. (in short, everything not allowed in a javascript
     *   object name)
     * - All names are lower-cased
     * 
     * The contents of the Cache directory should follow the following guidelines:
     * 
     * - This directory contains a number of further directories, named for each asset which
     *   requires a cache
     * - The contents of each subdirectory are controlled by the asset (that is, the format is
     *   undefined), but for those creating assets it would be wise to follow the guidelines for
     *   Asset and Scene file names, to avoid problems with various operating systems.
     * - The contents will be re-generated when required, so the contents can be deleted if you
     *   should so wish, but this will increase loading times on the first access. However, if the
     *   generated files are very large, the cache for that item may be too big to distribute. Then
     *   it is good to know that the item can be safely deleted before publishing.
     */
    class GLUON_ENGINE_EXPORT GameProject : public GluonCore::GluonObject
    {
            Q_OBJECT;
            GLUON_OBJECT( GluonEngine::GameProject );

            /**
             * A long description of the game. This can contain any string data, but
             * you should attempt to use simplified HTML syntax for markup.
             *
{'fraction_non_alphanumeric': 0.0866363778787404, 'fraction_numerical': 0.0075199749334168885, 'mean_word_length': 2.99, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5589986', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1641, 'n_words': 794}