Coder Social home page Coder Social logo

sprouts's People

Contributors

actions-user avatar codacy-badger avatar glusk avatar rultor avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

gamethapcam

sprouts's Issues

Cobweb is not always torn

Every Submove that crosses the Cobweb (in red points) must trigger a Cobweb tear. Currently it is not so.

Current:

Bug demonstration

Correct:

Correct

Generate points for start position

Add a slider to the tool bar, allowing the user to specify the amount of starting sprouts.

On "New game" click, the value set by the slider should be used to generate a new game with the specified amount of points, overriding the old game.

Sprouts can be aligned in a circle, with the center at the center of the screen. Twink the radius and the distance between the points for various numbers of initial sprouts.

Smooth line joins

libGDX provides no line joining utilities/settings.

Line joins

http://www.bluevoid.com/opengl/sig00/advanced00/notes/node290.html

The following SO answer shows how to compute Milter join points (in general terms, although the question was about libGDX in specific).

An easy round join solution:

Draw a circle centered at the common vertex with radius half the line width. Sounds easy but if not drawn carefully, there would be serious overdraw.

http://artgrammer.blogspot.com/search/label/opengl


If drawing a curve, a texture can be applied to triangle strips. Example:

Texture

https://badlogicgames.com/forum/viewtopic.php?f=11&t=18940 (The forum was shut down).

Extract Submove and PresetSubmove methods to a separate class

The list of methods to extract to separate classes:

  • updatedState() (GraphTransformation: (Graph, Submove) --> Graph)
  • crossPoint()
  • closestToTheEnd()

Idea: Pass Transformation and Search objects as a constructor argument to a special implementation of the Graph and Vertex interfaces?

Only one sample point is needed to establish a direction.

PresetSubmove.java should be modified in direction():

-if (strokePoints.size() < 2) {
+if (strokePoints.isEmpty()) {
    throw
        new IllegalStateException(
-           "At least 2 sample points are needed to establish a "
+           "At least 1 sample point is needed to establish a "
            + "direction!"
        );
}

The change should be propagated in the for loop.

Html (GWT) problems

The project is using 3rd party libraries (la4j), which are not supported by GWT.

Add CompoundEdge

Something that better resembles LocalRotation edges is needed.

A compund edge has origin v and direction (a, b)

Reversed Compound edge has origin b and direction (?, v)

Add combinatorial state simplification

  • Cobweb points with no cobweb links can be removed.
  • If a face that the submove is drawn to has no cobweb edges it is already simplified (will not implement this check)
  • if a submove crosses the cobweb, one half of that cobweb connection has to be removed

Typos

"Programming error!" AssertionError

When PresetRotation's next() is invoked for a current DirectedEdge that is not part of a PresetRotations object, but shares the direction with one of its edges, an error occurs.

Add Connection

A Connection comprises a compound edge pair.
It is useful for the Graph algorithms used (less verbose code)
A Submove's joints on both sides of the link should appear visually the same

Add missing CompoundEdge implementations

Replace next() methods in LocalRotations with NextCompoundEdge classes:

  • 2 versions next(a, b) and next(b)

ReversedEdge

  • input: original CompoundEdge and the RotationsList

Gradle task "javadoc" fails

./gradlew javadoc

fails with:

<USER-HOME-PATH>\.gradle\caches\modules-2\files-2.1\com.google.gwt\gwt-user\2.8.0\518579870499e15531f454f35dca0772d7fa31f7\gwt-user-2.8.0.jar(com/google/gwt/animation/client/AnimationScheduler.java):18: error: cannot access GWT
import com.google.gwt.core.shared.GWT;
                                 ^
  bad source file: <USER-HOME-PATH>\.gradle\caches\modules-2\files-2.1\com.google.gwt\gwt-user\2.8.0\518579870499e15531f454f35dca0772d7fa31f7\gwt-user-2.8.0.jar(com/google/gwt/core/shared/GWT.java)
    file does not contain class com.google.gwt.core.shared.GWT
    Please remove or make sure it appears in the correct subdirectory of the sourcepath.
1 error
:html:javadoc FAILED

Optimize intial cobweb

The optimization is a trade off between the shortest line of the cobweb and the minimum degree of vertices.

Add Graph decorators

Add these Graph decorators:

  • WithEdgePair - A new graph that adds a connection pair (a pair of opposite directed edges to the existing Graph). There should also be an overloaded constructor to pass in the Submove. Origin and direction are enough to build an edge pair.
  • WihtoutEdgePair - A new graph that removes a connection pair (a pair of opposite directed edges to the existing Graph)

Sampling

Sample user input (mouse, touch, ...) with respect to the speed of the motion (sample less often when the movement is slower). The sampled points should be connected and the final curve should be smoothened using Bézier curves (interactive example).

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.