Git Product home page Git Product logo

gamedev-utils's Introduction

Gamedev Utils (by Konstantin Tomashevich)

My personal archive of useful small C++ libraries for gamedev projects. Supports SDK and CMake target export throught install command.

GraphPathfinding

No dependencies.

Dijkstra and A* pathfinding algorithms. Input graph must implement GraphAdapter interface.

HexagonalGrids

Dependencies: GraphPathfinding, SharedPointer, UniversalException, Urho3D (only for example), Urho3DDebugCamera (only for example).

Implementation of doubled coords hexagonal map (double-row-coord and double-col-coord). Supports pathfinding and custom cell metadata. In addition, there is simple Urho3D example app. image

WASD - move camera, QE -- rotate camera, LMB -- teleport ball, RMB -- try navigate to cell.

QuestStateMachine

Dependencies: SharedPointer, UniversalException.

Simple state machine for dialogs and quests. See simple console calculator example which emulates dialog on this machine.

SharedPointer

No dependencies.

Simple shared pointer for ReferenceCounted derived classes.

UniversalException

No dependencies.

Simple exception class that works both on Visual C++ and GCC. Also it supports "custom" exceptions (see QuestStateMachine for example).

Urho3DActivitiesApplication

Dependencies: Urho3D, UniversalException.

ActivitesApplication is useful for splitting game to 2 parallel activities like client and server in the same process. Also ModularActivity is something like local (for this activity) version of Urho3D::Context which is useful in some cases.

Urho3DDebugCamera

Dependencies: Urho3D, UniversalException.

Two simple camera handlers useful for prototyping. See Urho3DHexagonalGrids (HexagonalGrids example) as example.

Urho3DUIResizer

Dependencies: Urho3D.

Urho3D component for Urho3D::UIElements resizing and layouting. Used Urho3D::UIElement vars:

For position calculation:

VX : float, X-coord modifier.

VY : float, X-coord modifier.

XDep : String, dependency for X-coord, value: "SH" (Screen Height), "SW" (Screen Width), "PW" (Parent Width), "PH" (ParentHeight).

YDep : String, dependency for Y-coord, value: "SH" (Screen Height), "SW" (Screen Width), "PW" (Parent Width), "PH" (ParentHeight).

Result X = VX * value (XDep)

Result Y = VY * value (YDep)

For size calculation:

VWidth : float, width modifier.

VHeight : float, height modifier.

WDep : String, dependency for width, value: "SH" (Screen Height), "SW" (Screen Width), "PW" (Parent Width), "PH" (ParentHeight).

HDep : String, dependency for height, value: "SH" (Screen Height), "SW" (Screen Width), "PW" (Parent Width), "PH" (ParentHeight).

Result Width = VX * value (XDep)

Result Height = VY * value (YDep)

For layouting:

LayoutType : String, "H" (Horizontal) or "V" (Vertical) or nothing (no layouting).

UpdatePS : bool, if true, primary size will be calculated from children size.

UpdateSS : bool, if true, secondary size will be calculated from children size.

Also Layout Border and Layout Spacing of Urho3D::UIElement are used too (result is 0.001 * value (dep) where dep is HDep or WDep depending on layout type).

For texts (Urho3D::Text and Urho3D::LineEdit only):

VTextSize : float, text size modifier.

TSDep : String, dependency for test size, value: "SH" (Screen Height), "SW" (Screen Width), "PW" (Parent Width), "PH" (ParentHeight).

Result Text Size = VTextSize * value (TSDep)

gamedev-utils's People

Contributors

konstantintomashevich avatar

Stargazers

 avatar

Watchers

 avatar  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.