Giter VIP home page Giter VIP logo

engineeroflies / gf3d Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 44.0 220.73 MB

A collection of utlitity functions designed to facilitate creating 3D games with Vulkan and SDL. The Main Branch is basic. Taken as a whole, GF3D will work as a simple game engine. Branches contain sample code for implementing different features of a 3D Game. The "master" branch contains the latest and greatest, but it is meant to be a submodule

License: MIT License

Makefile 0.49% C 97.41% GLSL 2.10%
c game-development gamedev library vulkan

gf3d's Introduction

gf3d

a collection of utlitity functions designed to facilitate creating 3D games with OpenGL Vulkan and SDL2 This project is specifically intended to function as an educational tool for my students taking 3D Game Programming.

Currently the project is in a WIP state. This represents a few revisions of the vulkan code now. It is still not exactly where I want it as a seed project for 3D Game Programming, but it is far more stable than it has been.

Build Process

Before you can build the example code we are providing for you, you will need to obtain the libraries required by the source code. Some of these libraries are easy to obtain and others are provided by the vendors of hardware that is installed in your computer. After the libraries are obtained the following sequence of steps should be performable from the following steps from the root of the cloned git repository within a terminal.

external dependencies:

  1. vulkan (get the Lunar SDK for windows, or the libvulkan-dev library for linux)
  2. SDL2 (get from libsdl.org or from your linux repo)
  3. SDL2_image
  4. SDL2_ttf
  5. SDL2_mixer

build process:

  1. Obtain the code: git clone <repo name>
  2. Checkout seed branch: git checkout <branch name>
  3. Make sure ou fetch submodules: git submodule update --init --recursive
  4. Build libraries: pushd gfc/src; make; popd
  5. Build game: pushd src; make; popd

You should now have a gf3d binary within the root of your git repository. Executing this will start your game.

gf3d's People

Contributors

ar664 avatar engineeroflies avatar gravypod avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

gf3d's Issues

GF2D Integration

Depends on 2D features parity with SDL, but then there is jo reason we can't support the entire gf2d library wothing 3d

GF3D_Debug

Move debug layers to its one class files.
Drive from config to enable / disable validation layers

GF3D_Device

organize code to put physical device enumaration and logical device creation into its own class files.

uniform buffers system

gf3d_uniform_buffers is now a thing allowing for more ad-hoc draw calls.
Need to add support for this system to overlay layer
and now we can break highlight and model draw calls apart

Command Pools

The graphics system is too aware of the sub processes for drawing.
Need to clean up the resetting of pipelines
the command buffers gained
the submission of the commands

Quad Tree Support

Add utility to convert gltf model data into quad trees and support for loading / rendering / collision detection with them

3D space

For basic physics.
Support for optimizing with BSP, and Quad Trees

3D drawing operations

Likely need a new pipeline to support drawing of points, edges, curves, polygons, and different volumes

3D Bodies & Dynamic Bodies

For keeping track of physics objects in a space and during space updates respectively.
As was done with 2D, I will do with 3D

3D Volumes

As with Shapes for 2d, volumes will collect generic types for handling basic 3d geometric shapes
cubes
Spheres
Pills
Edges
Points

Pipelines for point rendering

gf3d_points for rendering to 3d space (using the depth buffer)
gf2d_points for rendering to 2d space (overlaying)

2D rendering

Need to get feature parity woth SDL's 2D rendering.

3D Camera support

Yes, I mean frustum
A generic class for handling camera positioning and rotation and looking at of things
Current code is kind of trash

BSP Support

Support Binary Space Partitions for environments.
This should include a command line utility to convert gltf data to bsp data.

Pipeline Shaders

Instead of hardcoding that each pipeline has 1 fragment shader and 1 vertex shader, they should be organized into a type. The pipelines should have an array for them to be accessed if needed.
ST_Vertex
ST_Fragment
ST_Geometry
ST_Tesselation
ST_Etc

2D drawing operations

Likely will need an additional pipeline to handle drawing calls for basic pixels, lines, and geometric shapes.

GF3D_Buffers

Move buffer creation / management to its own thing outside of graphics

code review

Need to do a code review and decide what needs to be done

3d Collisions

Collision tests vs volumes
volume vs volume
trace versus volume

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.