Graphical RamVerk

Screenshot

Description

Graphical RamVerk is a project I have going on with a friend of mine. It is a game engine written in C++ focused on being highly effective, extremely modular and still being easy to use. The goal is to have a low-level core in C++ that is open-source, using many powerful C++11 features, but having the opportunity to create a game using other scripting languages without ever touching C++. We wish to support many languages, such as Lua, Python, D, Java and even Scala.

Example

The above screenshot is from an example, drawing 20 cubes on screen with the default skybox. It is produced by the following code:

#include <grv.hpp>

using namespace grv;

int main()  
{
    Core& core = Core::GetInstance();
    core.InitConsole();
    core.InitInputHandler();
    core.InitWindow(1280, 720);
    core.InitFontEngine();
    core.InitOnScreenLog(5, Color::Black);

    for (auto i : Range(0, 20))
    {
        Entity* entity = EntityFactory::CreateCube(FormatString("cube &d", i), 5.0f);
        entity->GetComponent<TransformComponent>()->position.x = -10.0f + i / 5 * 10.0f;
        entity->GetComponent<TransformComponent>()->position.y = -10.0f + i % 5 * 10.0f;
    }

    Entity* camera = new Entity("camera");
    camera->AddComponent<TransformComponent>("cameratransform");
    camera->AddComponent<FreeFlyComponent>("freefly")->speed = 10.0f;
    CameraSystem::Init3DPerspective(camera->AddComponent<CameraComponent>("camera"), 0, 0, 1280, 720, 45.0f, 0.1f, 1024.f);

    Renderer_OpenGL* renderer = new Renderer_OpenGL;

    Renderer::SetCamera(camera);
    Renderer::SetRenderer(renderer);

    core.GetOnScreenLog()->AddMessage("Game started");

    core.Run();
    core.Deinit();

    return 0;
}


Note

Graphical RamVerk is right now being rewritten in D, under a different name. This is mainly to have an option to use a new, modern but still low-level language for writing the core. We are however still discussing if we wish to keep developing the C++-version since C++ is a more well known language.
Please check the now public Bitbucket repo for more information.

Melker Litsgård

Read more posts by this author.

Falun, Sweden