Giter Club home page Giter Club logo

modernlife's Issues

Duplicate cells issue - really bad

  1. Build and launch
  2. Set the board size to 300 or greater (may depend on your DPI)
  3. Set the board initialization to 0
  4. Draw a line along the top of the board (hold down the left mouse button and drag)
  5. Notice you get more than one line
  6. Note: this happens when the board is randomized (find the repeating pattern)

Investigate copy/move assignment operators

Avoid partial construction by implementing copy/move assignment operators/constructors.

e.g. look at Board, Renderer, FPScounter, etc.

instead of constructing in mainwindow.h and then calling Attach(), Start() etc, which means the object isn't correctly initialized until those are called, see if you can implement this pattern.

MainWindow.h
fpscounter fps{nullptr_t}

MainWindow.cpp
fps = fps(foo, bar, blah);

For example Renderer.h has
Microsoft::Graphics::Canvas::CanvasRenderTarget _spritesheet{ nullptr };
Which isn't truly initialized until
Renderer.cpp
_spritesheet = Microsoft::Graphics::Canvas::CanvasRenderTarget(_canvasDevice, _spriteDipsPerRow, _spriteDipsPerRow, _dpi);

Settings Panel

Need a settings panel that lets users choose
Colors

of cells

ruleset
etc.

Initial Window Size is not correct

On some machines, this code is correct, on others it is not.

       // TODO doesn't work at all monitor DPIs http://microsoft.github.io/Win2D/WinUI3/html/DPI.htm
        const int wndWidth = theCanvas().ConvertDipsToPixels(bestcanvassize + 240, CanvasDpiRounding::Ceiling);
		const int wndHeight = theCanvas().ConvertDipsToPixels(bestcanvassize + 40, CanvasDpiRounding::Ceiling);
        
        //const int wndWidth = bestcanvassize + 240;
        //const int wndHeight = bestcanvassize + 40;
		appWnd.ResizeClient(Windows::Graphics::SizeInt32{ wndWidth, wndHeight });

Custom shape loading list with preview, name, notes

This may require saving a .modernlife alongside each .cells with the preview and any other preferences like should the edges wrap or not, speed, location to place shape (center, left, right, etc) and a canvas preview thumbnail (would not be great for huge shapes).

Draw, Save, Load boards

Let users
Load boards
Draw boards (including from a shapeset)
Save boards

Boards should include the ruleset used (Conway, Brian's brain, etc.)

Mouse draw Pointer scaling is off

Because the front buffer and back buffer are created at different DPI. I bet the cell is a delta of 96/_dpi from the mouse pointer. Either creat front buffer at same DPI or scale the points before they get sent to renderer method to find Grid

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.