Geometer » Blog

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 ...
Read More →


v0.62.0 OpenGL at last

Andrew Reece  — 6 months, 2 weeks 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 →


05. Undo, Redo and Units of Interaction

Andrew Reece  — 6 months, 3 weeks 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 ...
Read More →


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 ...
Read More →


1 year of Geometer - Lessons learnt

Andrew Reece  — 7 months, 3 weeks 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.

Contents
  • 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 ...
Read More →


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.


Contents
  • 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 ...
Read More →


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 ...
Read More →


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 ...
Read More →


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 ...
    Read More →


    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 previews ...
    Read More →


    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 ...
    Read More →


    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 →


    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 ...
    Read More →


    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 →


    02. Line Drawing

    Andrew Reece  — 1 year, 2 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 ...
    Read More →


    01. Overview

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


    Platform
    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.


    Points
    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 ...
    Read More →


    v0.7.1 Release - Animation and icons

    Andrew Reece  — 1 year, 3 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 →


    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 have been drawn.
    • The canvas can ...
    Read More →


    00. Greetings

    Andrew Reece  — 1 year, 3 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.


    Me

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

    I'm Andrew, I ...
    Read More →