Geometer » Blog

Andrew Reece
3 years, 1 month ago
Apologies for the long delay since my previous post - I quit my job, and I've been focusing more on things that will pay the bills...

I'm starting to think about UI a bit more, for which colour is often very important. Something that's fairly easy to do, but often overlooked, is to make sure that colour choices are suitable for colourblind users as well as people with normal colour vision (if that's even done at all). Since about 8% of people are colourblind, it's a significant chunk of your user base to alienate if you get it badly wrong. ... Read More →

Andrew Reece
3 years, 2 months ago
Say goodbye to jaggies, it's smooth sailing (and rasterization) from here on out!

I finally got round to getting my rendering to work on OpenGL.
This lets me do things like animation smears really easily.

I'm not sure what the compatibility is like for graphics cards, but if it doesn't work you can hit F6 to toggle software rendering.

Download from the Github repo

Read More →

Andrew Reece
3 years, 3 months ago
I don't think I'm doing anything revolutionary with my undo system, but hopefully making the reasoning behind it very explicit will elucidate any missing steps in the reader's or my thinking.

A large part of this is trying to define 'units of interaction' for the user and then matching that to what can be robustly determined and stored in the software.

I describe this here as a roughly linear sequence for the sake of clarity. In reality the process was more iterative, and broadly follows Casey Muratori's Semantic Compression approach.

Throughout the article, I use 'units of interaction', 'units of ... Read More →

Andrew Reece
3 years, 3 months ago
At some point you'll probably want to include some data or resources into the executable itself (e.g. fonts, images etc). This is particularly true for my case, as I'm trying to keep to a portable single-executable model. That means that I can't keep resources in a surrounding folder and load at runtime, and I don't want to assume that the user already happens to have the files on their system.

Icons are one example of a useful resource that takes an application from looking amateurish to looking like a Real Product (tm).

This post will show some cross-platform methods of ... Read More →

Andrew Reece
3 years, 3 months ago
It's now a little over one year since the first commit on Geometer.
The process has taught me a lot, so I thought I'd give a quick overview of some of the things I've learnt, as well as hint at some future blog posts.

  • Project strategy
  • Version Control
  • Process of writing code
  • Invalid array indexes
  • Enums
  • Macros
  • Saving and loading binary files
  • Linear memory undo
  • Geometry/maths
  • Complex state-based user input
  • UI Feedback
  • Multiple monitors
  • Resources
  • Common/notable bugs

Project strategy
  • It's difficult to find time to work when moving to a new area and starting a new full-time job
  • Weekends ...
Read More →

Andrew Reece
3 years, 3 months ago
This is a little out-of-sync, but I've been working on it recently and thought it was worth writing about before I forgot it all.

I didn't want the filetype to be something users would have to think about, so I put a reasonable amount of effort into making the data forward-compatible and the loader backward-compatible.

I have no idea how well the following will relate to text-based file formats.

  • Header Format
  • Data Array Format
  • Type Enumeration
    • Basics
    • Sizing information
    • Enum Versioning
    • Type Versioning
  • Saving Files
    • Checking the byte output
  • Opening/Loading Files
  • Conclusions

Header Format

Most, if not all, binary ... Read More →

Andrew Reece
3 years, 4 months ago
Ever wanted to draw shapes on top of your shapes? Well, now you can, with the all-new Geometer!

Probably the most requested feature to date, you can now draw on multiple layers. Intersections between shapes on different layers can be interacted with as normal. Layers are primarily useful for aiding in construction. Once the additional scaffolding has been finished with, you can clear out the layer.

I couldn't put it off any longer, I finally added some UI that wasn't directly about drawing: there's now a pop-out drawer with thumbnails of the different layers. I've arbitrarily limited the number of ... Read More →

Andrew Reece
3 years, 5 months ago
Apologies for the delay since my last post - I had to go away for work, and then I was ill for a while. I didn't feel like jumping straight back into Geometer while not 100% mentally with it, so I worked a bit on extracting some debug things I find useful into standalone libraries.
They're (very clearly) influenced to various degrees by Handmade Hero, and I have a few more ideas that I don't think Casey's mentioned that I'll be adding soon.

Main features
  • live tweaking/watching of variables
  • in-app recompilation
  • dll/library/code reloading
  • a content-agnostic way for organising debug variables ...
Read More →

Andrew Reece
3 years, 6 months ago
Do you ever look around at points strewn about the place and think to yourself, "who put these here?"? Now you can move them to their rightful places or get rid of them altogether.

Changes in this version:
  • return to LMB-based drawing (with new features)
  • make arc creation more intuitive
  • add the ability to box-select points (RMB-drag)
  • add and remove points from the current selection
  • move points after they are selected (LMB-drag)
  • delete points after they are selected (Delete)
  • reduce filesizes
  • the file format should now be forwards-compatible enough that any saves won't be broken by future versions

  • Download directly ... Read More →

    Andrew Reece
    3 years, 6 months ago
    Cast your mind back to previous actions. If only they weren't set in stone. If only they could be returned to and redone with your current knowledge of the task at hand...

    Changes since the previous release
    • New data structure for actions allows infinite undos/redos, including before the file was opened
    • Arrow-key panning now accounts for zoom level
    • Speedup from no longer trying to draw shapes outside the screen
    • Intersections now only appear when moused over or when used as drawing points
    • Ability to export SVG - Ctrl + Shift + E
    • CRC32 check on file open
    • Better shape snapping ...
    Read More →

    Andrew Reece
    3 years, 7 months ago
    Hi all,

    It's been a lot longer than I was hoping since my last update.
    I've done some fairly major rearchitecting that will allow for some cool new features, including layers and infinite undo histories that persist beyond the application closing.

    I had just about finished the changes and the latter feature a few days before Christmas when I hit an obscure memory bug. It seems to be originating from some code written months ago, showing up around my hot reloading code or when that's removed, my XInput handling.
    I went back to my parent's house for the holiday before ... Read More →

    Andrew Reece
    3 years, 8 months ago
    The tools of the ancients have been revealed to us - draw lines, arcs and circles as they were originally intended to be drawn.

    New features:
    • Overlay with controls and help info (toggle with F1)
    • Extending segments
    • Drawing segments at a perpendicular
    • Snapping to shapes
    • Drawing the point equivalent of a shape
    • New file shortcut
    • Better opening of files
    • Cursor change based on current action
    • Store divider lengths as letters
    • Divide/multiply current length by integers with the number keys
    • Swap to previous length with Tab
    • Better drawing previews

    The input method has changed to allow for all the new input ... Read More →

    Andrew Reece
    3 years, 9 months ago
    A couple of the more time-consuming/confusing bugs to track down have been from mistakenly passing an absolute position (point) instead of a relative position (vector) to functions that use these for drawing or intersection or similar.

    These are a little difficult to track down because by default I'm drawing pretty close to the origin, so the relative positions are often very similar to the absolute ones. As a result, the bugs would appear inconsistently. I was attempting to fix these a little while after writing them, and so didn't have all the intentions behind each passed parameter cached in my ... Read More →

    Andrew Reece
    3 years, 10 months ago
    Go out at night and try to count all the stars in the sky. Go to a beach and try to count the grains of sand. Look to the future and try to count all the possible paths you could take. You will now have the same difficulties in trying to count all the points and shapes that you can draw in Geometer. Draw constructions as large as you can imagine!

    Your drawings can now be saved from being ephemeral wisps, floating in the ether. Save and open functions let you pause and continue your creative process at any time. ... Read More →

    Andrew Reece
    3 years, 10 months ago
    This is (a slightly simplified version of) how I currently draw my fully aliased (sic) lines.

    The code was initially written some time after watching Casey's video discussing the issue, so I can't say how much it was influenced by it. I have a feeling there may be some similarity to Bresenham's algorithm, but I haven't looked at it yet. As in large part my current programming practice in general and this project in particular are more focused on improving my skills than quickly achieving results, I've tried to solve problems at least to a functional level myself, before possibly ... Read More →

    Andrew Reece
    3 years, 11 months ago
    This post is meant to provide a general overview of the code structure to contextualize later information.

    As with Handmade Hero, I'm using a win32 layer that opens a dll with the platform-independent interaction and rendering code. The dll is watched and reloaded when it gets recompiled.

    All the drawing is based on a large array of points, which shapes index into for their constituent components. This allows for easily moving points around both individually by the user and as a group when rotating/panning/zooming the canvas.
    These are currently alongside a parallel array of bytes that comprise bit ... Read More →

    Andrew Reece
    3 years, 11 months ago
    No longer shall you be disoriented by rapid changes in the movement or rotation of the canvas. Be smoothly transported from one place to another as if guided by well-oiled bearings. Furthermore, do so under the 'G' banners proudly emblazoned on the taskbar and corner of your window.

    Download directly or from the Geometer Github repo. Read More →

    Andrew Reece
    3 years, 11 months ago
    The shackles keeping your canvas in place have been cast off! Exercise your newfound freedom by moving around, looking at the world from different angles, and getting up close to really appreciate those pixelly curves.

    Download v0.7 directly or the Geometer GitHub page.

    • Pan with the arrow keys or middle-click + drag or space + left-click + drag.
    • Return to the origin with Home.
    • Zoom with PgUp/PgDown or the scroll wheel.
    • Rotation is achieved by setting the (horizontal, right-facing) x-axis. After selecting a point, Alt + left-click to set the x-axis along the line that would ...
    Read More →

    Andrew Reece
    3 years, 12 months ago
    Hi all, thanks for checking out my project. The software I'm making, 'Geometer', is a desktop application for drawing in a way that emulates traditional construction with compass and straightedge. There's more info on the impetus behind it on the main project page, so I'll try not to repeat myself too much here.

    This is just to provide a brief introduction to me, the project, and what I'll be doing with this blog.


    I'll get the self-aggrandizing part out of the way so we can focus on the important stuff.

    I'm Andrew, I've just graduated with a BSc in ... Read More →