GithubHelp home page GithubHelp logo

israelafriyie-dev / hexgridutilitiesforgames Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgeerkens/hexgridutilitiesforgames

0.0 0.0 0.0 30.42 MB

Hex-grid utilities for board and strategy games with path-finding, field-of-view, and more

License: MIT License

Smalltalk 1.11% C# 98.49% HTML 0.40%

hexgridutilitiesforgames's Introduction

HexGridUtilitiesForGames

Hex Grid Utilities for Board-Game Development in C#

A tool-kit of utilities for building board- and strategy-games on a hexagonal grid, providing these features:

  • Lightning-fast ALT Bidirectional Path-Finding implementation;
    • Default landmarks are the 4 corners and 4 side midpoints of the map
    • To/from distances for all landmarks pre-computed on load using Dijkstra's agorithm
  • Fast Shadowcasting implementation provides 3D Field-of-View;
    • optionally supports automatic visibility limiting due to Earth's curvature.
  • Board storage as either a flat or blocked (providing better localization) array;
  • Hexagonal grid with coordinates
    • Hex-picking (identifying the hex selected by the user);
    • All internal calculations performed with integer canonical (obtuse) coordinates;
    • All external interfaces and board storage erformed with user (standard rectangular) coordinates;
    • Built-in support for non-standard & transformed coordinate systems (such as for multi-map boards);
    • Automatic internal conversion between coordinate systems hidden in a single type HexCoords;
  • WinForms Panel sub-class exposing all of the above plus:
    • Mouse-wheel zoom and scroll; and
    • Map transposition

Structure

  • HexUtilitites: The core library with all functionality not dependent on either WinForms or WPF. THis library is moderatey to extremely stable at the present time.

  • HexgridPanel: All core functionality depending on either WinForms or WPF. THis library is undergoing revision currently that may include breaking changes.

  • HexgridExamplesCommon: Common structures used by the example libraries below.

  • HexgridExampleWinform: An example MDI WInForm that opens two windows (forms) based around HexgridPanel (terrible performance) and HexgridBufferedPanel (moderately good performance). Planned:

    • Example based around a 5-layer buffered & cached subclass of HexgridPanel (HexgridCachedPanel - from proprietary code) that offers excellent performance even on maps very much larger than the examples.
  • HexgridExampleWpf: A WPF example that opens two windows (forms) based around HexgridPanel (terrible performance) and HexgridBufferedPanel (moderately good performance). Once HexgridCachedPanel is complete an example based around it will also be added.

  • HexgridExampleWinformw: Work in progress.

External Documentation

Doxygen is used to generate external documentation for the entire solution, including diagrams using Graphviz DOT, in the file docs.zip. I endeavour to update this on every push to GitHub - but it is not yet automated.

References:

Many thanks to:

hexgridutilitiesforgames's People

Contributors

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