Giter VIP home page Giter VIP logo

blume's Introduction

Blume

A game engine written in C# that runs in the windows command line

Creates a 3 dimensional grid of 'Units', each of which contain a unicode character, color value, and a mutable list of flags. Uses a library called 'Pastel' for rendering ARGB colors in the console.

This grid is passed into a 'use once' Frame object every render cycle for post processing for lighting effects, ect. , which is then passed into the renderer object. The renderer object will first render the Frame top to bottom and caches the Frame, and afterwards contrasts the previous frame with the new for changes, and re-renders only the changed units.

Current State

This section needs to be updated, see "whats new" section below

The program, as downloaded right now, will load a 50x50, 2 layered plane, with a 'player' Unit, and two luminant Units. You can move around, place walls and lights. As of now, it is very inconsistent with lighting, but is fun to play with.

Known issues include:

  • Barriers not blocking light when on the same x or y axis.
  • Strange light path finding when a barrier is at the corner of a luminant Unit.

Fun stuff

  • In the class FrameTools in the Frames namespace, there is a function called ReadImageBlocks, with the function signature
Frame FrameTools.ReadImageBlocks(string path, int w, int h)

Which takes in a image file path, and writes corresponding color values to a 1 layer grid of the dimensions passed to the function, returning a Frame object of said grid, which can then be passed to the renderer with fairly accurate and cool to look at results.

  • WASD to move.

  • Press o to place a light, and p to place a wall. Play with the very inconsistent lighting system. Renders fast, though.

Lighting Effect WIP

  • Lighting effect, where units which have the flag 'luminant' will light units around it, with the exponential formula Lumocity Formula
    , where L is the lumocity value of the unit relative to the luminant unit, and D is the distance between the two units.

Whats new

  • Fully functional contrast rendering.
  • Added keyboard input
  • Optimized renderer
  • Optimized image approximation
  • Added automatic saving of approximated images using serialization
  • Started beginings of mouse input
  • Broke the clock class, whoop
  • Added use of sprites, which are smaller Grid objects, optionally stored inside Unit objects, to be added to the Frame pre-render. A unit may have multiple sprites stored and hot-swappable.

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.