Git Product home page Git Product logo

mage-city's People

Contributors

passiomatic avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

unplugandplay

mage-city's Issues

Support Tiled tile flipping

From the docs:

When you use the tile flipping feature added in Tiled Qt 0.7, the highest two bits of the gid store the flipped state. Bit 32 is used for storing whether the tile is horizontally flipped and bit 31 is used for the vertically flipped tiles.

To enable variation while editing levels it would be useful to support at least horizontal and vertical tile flipping (we can add diagonal flip later). Flipping bits should be extracted by elmify utility and possibly stored into the B channel of the LUT which is actually unused.

Then, shader would extract the bits and invert the final tile coordinated according to those values.

Note: I was assuming that WebGl 1.0 supports bitwise operations. It turns out this is not the case. However, since we need to test only two bits we can easily check against four hardcoded integer values (e.g. 0 = no flipping, 1 = flip h., 2 = flip v. and 3 = both h. & v. flip).

Allow to specify player start position in level file

Allow to specify player start position for each level file, perhaps using the midpoint of a object named Player.

Since the player start position could be thought as a spawn point, we could put that player object into a specific layer, which contains all the information needed to spawn each entity in the game.

Add CSS to disable interpolation when scaling Canvas element

Discussion:
https://stackoverflow.com/questions/7615009/disable-interpolation-when-scaling-a-canvas/7665647#7665647

Relevant CSS:

canvas {
  image-rendering: optimizeSpeed;             /* Older versions of FF          */
  image-rendering: -moz-crisp-edges;          /* FF 6.0+                       */
  image-rendering: -webkit-optimize-contrast; /* Safari                        */
  image-rendering: -o-crisp-edges;            /* OS X & Windows Opera (12.02+) */
  image-rendering: pixelated;                 /* Awesome future-browsers       */
  -ms-interpolation-mode: nearest-neighbor;   /* IE                            */
}

Issue with DepthTest

WebGL's DepthTest is wrong when dealing with multiple layers. See attached screenshot. More generally, having these as entityWith settings:

entitySettings =
    [ DepthTest.default
    , Blend.add Blend.one Blend.oneMinusSrcAlpha
    ]

would make less as default depth test, with a value of 0 meaning closer to the camera and a value of 1 farther to the camera. This seems not to be the case, in fact it seems to work backward.

Screenshot

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.