Coder Social home page Coder Social logo

hex-grid-test's Introduction

Hex Grid Test

This repo is me attempting to configure a boardzilla game that uses a hex grid that lets me use a column of hexes. I'm looking for suggestions about how to reclaim the horizontal part of a hex board grid I am setting up.

Desired layout (destroyed spaces are not on board)

My desired layout

Starting grid layout (all spaces present)

Original board grid

Problem Statement

The problem I am having is that I lose a lot of horizontal space due to destroyed hexes that are presumably still accounted for in the layout geometry. It seems like the layout is based on the initial hex grid and doesn't account for spaces destroyed after the board has been created.

See line 40 in src/game/index.ts for where to keep/destroy the hexes I don't want to use for my game example.

I figured out I can overlay other baord components over the missing area, but that gets away from the nice modular nature of the Space I'd like to have.

hex-grid-test's People

Contributors

devalbo avatar

Watchers

 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.