A random map generator & game engine
C++ C PostScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
models
.gitattributes
.gitignore
DetailCreator.h
DetailedMapGenerator.cpp
DetailedMapGenerator.h
FixedSizedArray.h
FixedSizedPriorityArray.cpp
FixedSizedPriorityArray.h
ForestGenerator.cpp
ForestGenerator.h
Grid.h
Perlin.cpp
Perlin.h
PerlinMap.h
PerlinShell.cpp
PerlinShell.h
PngExporter.cpp
PngExporter.h
README.md
Sky.cpp
Sky.h
TerrainNode.cpp
TerrainNode.h
Tools.cpp
Tools.h
TreeGenerator.cpp
TreeGenerator.h
Valhalla.cpp
Valhalla.h
WorldMap.cpp
WorldMap.h
__gVec_Imp.h
data.dat
debug.ps
debug.vs
default.ps
default.vs
gBinaryStream.h
gCamera.h
gDebugRenderer.cpp
gDebugRenderer.h
gDefaultShader.h
gGame.cpp
gGame.h
gGears.cpp
gGears.h
gGeometry.h
gGlobals.cpp
gGlobals.h
gIndexBuffer.cpp
gIndexBuffer.h
gIndexBufferedDrawable.cpp
gIndexBufferedDrawable.h
gInput.cpp
gInput.h
gMat.cpp
gMat.h
gModelReader.h
gMutex.h
gMutex_windows.cpp
gPrimitives.h
gRandom.h
gRenderableGroup.h
gResources.h
gSettings.h
gShader.h
gSharedPtr.h
gSlave.cpp
gSlave.h
gSlaveController.h
gSlave_windows.cpp
gTexture.h
gTime.h
gTools.cpp
gTools.h
gVec.h
gVertexBuffer.cpp
gVertexBuffer.h
gears.cpp
gears.h
libnoise.dll
lodepng.cpp
lodepng.h
main.cpp
noiseutils.cpp
noiseutils.h
ss0.png
ss1.png
ss2.png
terrain.ps
tinymt32.c
tinymt32.h
tinymt64.c
tinymt64.h

README.md

Bifrost

Bifrost is a game library I am working on.

Currently it is still in infant stages. Some of its features:

  • It tries to abstract some of the lower level stuff in OpenGL such as vertex/index buffers, shaders, textures etc.
  • Resource (texture/model etc) management
  • Keyboard / mouse input abstraction
  • Vector & Matrix library.
  • Worker threads with thread pooling
  • Easier camera controls
  • Warcraft3 model loading
  • Debug visualizations (Adding debug lines etc)

I wanted to make a more object oriented approach in this library. For example implementing gTickable abstrack class will tick your class on each game tick. gUpdatable will call update() on your class on each fixed update (naming is hard). Or gRenderable functions will be rendered when necessary.

I don't want to abstract OpenGL completetly from application side. The user still will be able to call OpenGL calls if he wants. It is probably more dangerous but in my opinion gives programmer a lot more opportunity. It is also easier :)

Usage

Bifrost comes with an example game (that I probabl commit more time) which is called Valhalla. It is a random terrain generator. It is probably not the best choice to show capabilities of library because most models are randomly generated, so most of the resource functions are unused. I should probably include another simple game in future. It does utilized worker threads though, meshes such trees or detailed version of terrain are generated randomly in background as player moves.

Screenshots

Some example pictures from Valhalla.

ss0 ss1 ss2

Install

To compile, you will need OpenGL, glfw, glew dependincies. VS project files are included in project.