Exit Full View

Tickle / todo.txt

Tickle To Do
============

Current Work
============

When we FILL a polyline, how do we know which pixels are "near" the edge for anti-aliasing.
    The edges of the triangles which have Adjacent vertices are edges.
    There are two combinations.
        Either ONE the points is a corner
        Or ONE of the points is an "opposite"
    I may need to SPLIT corner pieces into two (so a quad becomes 4 triangles).
        We can then make the "opposite" 0, and "edges" 1
    OR a corner is -1, opposite = 1, other = 0

Colors for guides, selection etc. can ALL by changed by a single shortcut.
    So that you can pick a color scheme that doesn't clash with the current Scene.
    Add to EditorPreferencesGUI

The "SQUARE" end of the line cap isn't using the gradient when isMirrored = true.
    Need to do a similar thing for square caps as the triangular fan.
Consider changing how lines are joined.
    The "along" UV could be based on the CENTER of the line.
    Ideally, there wouldn't be any "chevrons" along the lines due to different line lengths
        of the outer and inner.

Have different line caps at each end of the line.
    i.e. startCap, endCap. Maybe rename to CapStyle

Only 1 direction is anti-aliased
    For GradientAlong, this is the ENDS, not the edges!!!
    Need to send UVs (not just one) to the shaders
    Also need to send the `length` of the line similar to edge.
        Anti-alias at 0..end and 1-end..eng

At the moment, we are blurring 0.5 pixels off the edges, maybe we should also add 1 to the thickness to compensate?

Add a LinearGradient (which uses the vertices points to calculate the color)
Add a RadialGradient (ditto)
Add an AngularGradient
    These are all Paint and StrokePaint.

FlatColor is still jagged - Don't use OnePixelTexture?

Create an Immutable version of Color, and IColor interface.

Get rid of SubRenderers that are no longer needed.

Check all games, and then remove Colorize and Actor.color.

Higgs water cargo doesn't "crash", it just vanishes.

Next
====

EditorPreferencesGUI is mixing one-off preferences with per-scene preferences.
It would be nice to make grid settings EITHER one-off, or per scene
    (or maybe a bit of both???)

Changing guides is not in History.

Consider a "simple" Vector Graphics editor inside Tickle Editor???
    Use the (to-be-coded) path drawing code, and add extra to define the position and offsets of Poses.
    Could also have a stand-alone application, which does the same, but without the Tickle stuff.

VisibleRoute( strokeThickness, stroke : Paint )
    Paint can be a flat color, a gradient between 2 colors or a Texture.
        Gradients for the line can either be along, across, radial, linear, angular
        When using a texture, also allow a gradient as a tint (including alpha).
    Holds a cached mesh for the stroke (and later the fill)
        The underlying ContiguousRoute is private, so all changes go through wrapper.
            (and the cache flushed)

Look at Path, Is sectionCache sensible? Is sections safe (i.e. can we change it from outside)?

Undo/Redo on the toolbar, with a dropdown showing the description of the latest changes.

Changes to selection are considered a change to History.
    These can ALWAYS be merged, by ignoring the intermediate selections.
    Selected handles are NOT part of History, only Actors (and later ContiguousRoutes)

Extension functions for SubRenderer. e.g.
    Renderer.instance().beginFrame( backgroundColor ) {
        beginView(matrix,clip) {
            myRenderer.use( color, modelMatrix ) {
                rect( a,b,c,d )
                rect( e,f,g,h )
            }
        }
    }

Do away with History.beginBatch, and replace with :

    History.batch { // this = Batch
        makeChange( ) // A method of Batch.
    }

Edit paths in the scene editor.
    Initially the path isn't associated with a stage, and is a ContiguousRoute.
    When putting it on a Stage, wrap it in a VisibleRoute, which has a thickness, strokeColor, fillColor

    Rewrite Higgs using shapes???
        Each "shape" could have a fill (with a repeated texture, and a straight edge)
        as well as a bumpy edge via a StrokePaint.
            Only "MITER" would work, and even then, it might look weird???
            Could round the corners in a similar way to FooCAD's roundAllCorners.



BUGS
====

Renderers should split the batch if the number of points exceeds the current limit.
    (or at the very least, ignore later points rather than throwing).


EllipticalArc.buildPoints isn't very good for the general elliptical case.

Rename a Costume does not work.
Test renaming a Costume, and a Layout.
    They should load and save scenes which use them.

JBox2d data isn't *created* correctly when an actor is scaled.
    Currently, the body is *rebuilt* during calculateModelMatrix() when scale != oldScale
    Bad smell, because it is far from clear when the data becomes valid!

SimpleFragmentMaker is buggy when the initial size is too small.
    Possibly due to the textures being flipped in Y during translation.
    Consider rewriting it so that it uses the Renderer to copy the texture into its new home, rather than
        via main-memory buffers. Will need a "RBG vs RGBA" option.

Jank
====

SnapToOthers doesn't work for Tiled or NinePatch appearances.

Changes to selection are NOT counted as part of History. Should they?

Rename Actor.color to tint.

SnapEditor could be a Dockable?

Allow "Add New Sound" and "Add Existing Sound" from right click menu of a Costume.

Improve the UI for Pose's Image.
    set to a max size (so no scroll bars needed)
    Show the offset as crosshairs
    Show the snap point when altering the value (as a square? cross? another set of crosshairs? instead of the offset's crosshairs?)


Later
=====

Shape to have "tangent" method(s), so that arrows and other markers can be rotated appropriately.
    fun tangent(along : Float)

Look at how Gradle uses Kotlin as a scripting language.
    Can I use Kotlin instead of Feather?
    If we can get back bytecode, then I could scan it to ensure only "safe" classes are used.

Keep Guides from "included" scenes as Read-Only.
    This lets us add guides in an included file, and used for all "real" scenes.

Reinstate Stage Constraints.

GUI To customise the toolbar (and save state).
    Also include an option to show Menus too.


Consider adding a new method Role.beginEditing( scene : Scene, resources : Resources )
    So that Roles can initialise themselves in the editor.
        e.g. They could add extra actors ???

Draw paths - straight lines and bezier curves.
    Interpolated colors as well as textured.
        The texture should be repeatable in Y.
        The width of the line is mapped to the left and right edges of the Pose's texture.
        The line can either be centered (0.5), or align left/right (0.0/1.0)
    Use this for rocks in Higgs Anomaly.
        If we draw a line "upwards", right align, and our texture is "bumpy" on the right edge( and optionally bumpy pn the left too),
        then we can draw cave edges with only 3 lines. |_|
    For internal walls, of our map, then we can use more lines, but may also want meshes.
        Solid meshes would need a texture repeatable in X and Y (and cannot have bumpy edges)
        For a bumpy edge, we could draw lines around the outside of the mesh too.

Add Inkscape-style alignment to SceneEditor - e.g. spread evenly X/Y, align X/Y (using position/top/bottom)

Record all Classes and static functions from FeatherExtensions.feather into ClassMetaData
    Right-click on a method name, or class name brings up the source code.
        Also check for getters. e.g. "window" searches for getWindow().
    Add FeatherExtensions to the API Dockable and quick-open.

Allow macros to be added to various parts of the GUI
    e.g. Add to PoseTab, TextureTab, main toolbar etc.
    and/or allow shortcuts to be assigned to a macro.

Allow paths to be edited in the scene editor. Each has a name (similar to actors), and stored on Stage?
    A menu button in the toolbar, listing the paths. Click to edit it.
    Also a dockable, which lists all paths, and gives options to hide/show individual paths as well as
        option to hide/show all paths.
    OR, include SVG files into a scene?

Add more snippets and examples.
    Create more images in Examples (a single png from svg).

Sorting by ZOrder may be too expensive.
    The improvements of neighbourhood in the bounce spam wasn't very much (less than x3).
    Which hints that there's a bottleneck in the drawing.
    Add timing in the loop, and expose the stats as an API.

Need to fade down a sound, instead of stopping it abruptly.
    Maybe Ship could have its own SoundSource for thrust/rotate
    OR reinstate SoundSlot.owner, add "isFading", have stopEvent cause the sound to fade.
    Also need to filter on isFading as well as isPlaying.

LayoutStage to have "create world" boolean, so that the default implementation of Director.createWorlds
    can do "the right thing", instead of creating worlds on all stages.
    Only show the parameter if GameEngine.enablePhysics == true.

FontTab
    List all named fonts.
    Make "From File" the default.
    Initial value to the "fonts" directory

Consider adding a font (or two) to the New Game Wizard.
    Not "boring" fonts, nor fonts with "weird" glyphs, or lots of missing glyphs.
        Make damn sure it is free.

Image on the TextureTab's Details sub-tab should be a thumbnail only.

Long Standing BUGS
------------------

InputPicker :
    Java FX key code name "Number Sign" does not map to anything in enum class Key
    "Windows" is this meta?
    Shift, Control, alt etc don't work either.

Much Later
----------

IsometricView, which uses the X,Y coordinate in a different way (X is SE, Y is NE)
    A sub class may also use the ZOrder to add an amount the the final Y value???
    Maybe create a demo application which can switch views from ISO to grid???

Each scene can have a custom Director, edited within another MinorTab of the SceneTab.
    Displayed as "<Custom>" within the ClassParameter menu.
    OR
    Allow specific pieces of code to be evaluated (and edited as Strings within the Director's Attributes)???
    e.g. WinCondition : collectables <= 0 && distance( player, mainStage.findActorByName( "foo" ) ) < 100

Allow costumes to have a different shader. E.g. change hue of PART of an image for "team colours".
    Note, if this is too much for the version of openGL I'm using, then consider another approach,
    where the poses are duplicated (dynamically?) for each "team colour".
        NOTE, FBOs are being used, which is OpenGL 3???

    http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
    https://stackoverflow.com/questions/9234724/how-to-change-hue-of-a-texture-with-glsl
    https://github.com/greggman/hsva-unity
    https://github.com/greggman/hsva-unity/blob/master/Assets/Shaders/HSVRangeShader.shader

Is mouse clicked supported (as opposed to mouse down). If so, use it to start the scene in DodgeEm. If not write it!

In-Game input mapper, allowing user to change existing inputs (but not add new ones).
    This could use JavaFX???
        We'd need to check that JavaFX hasn't already been started though.
        Also need to ensure that JavaFX doesn't end when the window is closed?
            (unless we can start a new instance of JavaFX???)

TextStyle to have an extraSpacing property which causes letters to be moved further apart
    Ditto for extra line height.

Game Ideas
==========

Port Itchy's asteroid clone to Tickle.

Zod remake
    Maybe isometric, just to make sure we have an isometric view???
    Grid based, but characters move freely when there are no obstructions.
    Terrain has "score" for the A* algorithm
        If we also "encourage" the algorithm to choose routes with waypoints that are "straight",
        we can then join them together in a near perfect diagonal route.
    "Regions" are part of the map.
        At most one building per region. Capture the building turns the region to that player's colour.
    A "Map" view colours those regions appropriately.

    Each building has a preferred unit that the AI will build.

    At startup, create a "blue" version of the Texture from the "red" original.
        Create blue poses too, and blue costumes (but replacing the Role with the AI role)
    Forts have N turret positions. @Attributes determine the turret type.


Time Paradox
    Record movements when "solving" a level.
    Then play the level again, with the previous instance of "you" also present (being played back)
    If a previous "you" tries to do something with an object that is not there. Paradox (you lose).
        Each picked up object has a timer, and an arrow showing where it needs to go.
    Used items must be in the same state. e.g. doors must be locked/unlocked when you walk though of unlock them.
    You have a fix time to complete the level each time.
        You win if you solve the level N times.
    Maybe you have to smash through the exit, before the building explodes, but there isn't enough time to
        break through, so you rush back to the time machine, and start again.

Cover of Darkness
    A 2D plan of a building.
    Top down view of "you", with a torch.
        Torch uses collision detection. If it is hitting a wall, then shrink it.
            Binary chop to get it to the "right" length, so that it doesn't go through walls.