Coder Social home page Coder Social logo

natchiketa / jeepers Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.34 MB

A word-forming game like Bookworm or WordWeb. Mainly DOM-element based, using jQuery, CSS transforms and some use of the `canvas` element for effects.

License: Other

JavaScript 98.58% CSS 1.42%

jeepers's People

Contributors

natchiketa avatar

Watchers

 avatar

jeepers's Issues

Suppress text selection

Dragging around to spin the column causes elements in the page to be selected. Undesirable!

Undraw Word

Currently, if you trace back over letters that have been selected, they are simply selected again, and appended to the the existing string..

There needs to be logic that checks to which position the pointer has returned, and remove letters after that position.

All rendering done in `requestAnimationFrame` callback

Currently, the rendering of the tiles themselves is done in the requestAnimationFrame callback, but other things like the toggling of tile styles is being done in various event handlers and in Jeepers tile-related methods in some cases.

Although the goal for this issue is as stated, it part of a larger goal to decouple the logic in Jeepers from the rendering of the DOM, that is except for the callback.

This will mean that much like how the current word selection is stored in the SELECTION array, really the entire state of the stage should be stored in the Jeepers object, not in the DOM.

The only use of data-attributes to describe the tiles as game entities should be for the purpose of exposing it to the CSS (e.g. the data-char attribute allows the tile's pseudo-element to display the character).

Hex tiles

Pick and implement a technique for making the tiles hexagons. Since the contents of the hexagon are a letter, it should be oriented like this:

hexagon

So that the letter's baseline runs parallel to something.

Some possibilities I've thought of so far:

  • Using CSS gradients. The problem with this is that the hexagon itself has to overflow the DOM element, so it would probably require using :before and :after to render the whole thing, and there may be glitches with that approach.
  • Using Icon Fonts. I could totally just make a hexagon (in fact, I did just now. I made the one above using Inkscape. I had already forgotten, geeze!) and take advantage of things like text-shadow.
  • Canvas. This would be a flexible and powerful solution, but it will be interesting to see what performance is like when rendering 140 canvas elements.

Check selection is a full word

When selection is finalized, it should be a full word, not just a match for the beginning of a word, as during selection.

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.