I have implemented font loading for Graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. The system allows you to to choose any font or font variant (font style) from the large google fonts collection. View the code on GitHub.
Challenges with this MR included loading the list of fonts and variants from the google developer api, and parsing the json into typescript, having a shared font list for all of the font picking widgets and loading the loaded font file only once in Rust when there are multiple text layers with the same font.
I have implemented embedding bitmap images into the svg for Graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. The system allows you to drag and drop a PNG or JPEG file from your file manager and then load it into the editor for use as a reference. View the code on GitHub.
Challenges with this MR included handling the file dropping, as well as making the svg performant when a large (several megabytes) image is being transformed around. This was achieved through blob urls so the image data is not stored in the svg node but seperatly in the browser, greatly increasing performance. However this meant I had to load all the blob urls for the images when loading a graphite document.
I came second in the final round of the OUCC in my age category. I would like to thank Mr Cronk for his support in organising this.
I scored 66 out of 66 on the first round of the Oxford Computing Challenge and have qualified for the final round. Thank you to Mr Cronk for organising this.
I have implemented colour gradients for Graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. The colour gradient tool is a new tool based on the new overlays system by @Truedoctor that allow users to draw in gradients, edit the start and and points by dragging the handles and edit the colours by using the new properties panel on the right hand side which has been added by @mfish33. View the code on GitHub.
Challenges for this MR included mapping the graident start and end points correctly into gradient units as well as making it so all of the gradients went into one `<defs>` tag at the top of the svg.
I have implemented the transformation cage for Graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. The transformation cage expanded on TrueDoctor's work adding a bounding box for selected layers whilst in select mode to allow the edges of the box to be draggable to scale the selection; and to add some blue squares on the corners and the edges to provide visual hints. I also added the ability to rotate the selection by dragging 40px from the edges, as requested by Keavon.
I have implemented the text tool for Graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. Text is stored as a new type of layer that contains a string. When the user is editing the text, the string is rendered as an editable HTML div element for proper OS input handling. This was challenging as the behaviour for these editable DIVs changes in different browsers, with Chromium based browsers inserting extra new lines and not showing an insertion mark when the text input was empty, however Keavon helped me to debug these issues.
When the text is not editable, it is rendered as a spline so that it can be edited. In order to do this, I used ttf-parser, the standard in Rust for parsing font files, which provides a query for glyphs as well as enabling you to get at their raw curve data, as bezier curves so no work was needed to convert them to Graphite's svg based paths. I also used used RustyBuzz, a Rust port of HarfBuzz, in order to shape the text. Shaping involves finding the correct glyphs, including any ligatures specified by the font, common examples including 'ff' and 'fi', as well as computing the positions and advances of each glyph, taking into account kerning, which subtly moves glyphs, for example putting a V and A closer together - 'VA'.
I have recently made several improvements to Graphite, a vector (drawing with shapes instead of pixels) editor written in rust and available at editor.graphite.design/
I have implemented snapping for graphite, a work in progress vector editor written in the Rust programming language with Web Assembly. Snapping is quite an important feature of a vector editor as it allows users much more precision when drawing shapes and moving shapes around. One of the main challenges I had was caching the snap targets in a sensible place as TrueDoctor requested the tools did not have mutable access to the document so that they could be multi-threaded later. I also implemented the toggle functionality with the magnet option in the toolbar at the top. The functionality is available on the master branch build of graphite at editor.graphite.design/ The code changes are available at github.com/GraphiteEditor/Graphite/pull/386/files
I added a way to transform layers with the mouse by pressing the 'G', 'R' or 'S' keys to grab, rotate and scale the selected layers in a similar fashion to blender. I made shift slow the transformation speed by a tenth and ctrl to snap the transformation to intervals. I also allowed users to type in the value for the transformation with the number keys if they wanted a specific value and constrain their transformation to one axis with the 'x' and 'y' keys. You can try the build at https://714e13e8.graphite-master.pages.dev. This was one of my bigger PRs (Collaborating with pull requests - GitHub) at about 550 lines of code available at github.com/GraphiteEditor/Graphite/pull/356/files.
I worked closely with @Keavon to refine the UX with things like reversing an operation if you switch directly to a new transform operation, removing the negative when all numbers are deleted and ignoring presses to decimal point when there is already a decimal point.
I recently made the scrollbar functional in graphite - an open source drawing program for the web. This built on TrueDoctor's work of finding the bounding box of artwork.
The scrollbars where difficult to implement because they needed to allow users to scroll infinitly far by reserving a space at the end of the scrollbar whilst also not just sharply stopping as they reached a certain point but slowing down the position change as it got further up the track (as specified by Keavon).
My initial approach with this caused some strange issues like the going back over the artwork when the scrollbar was dragged very far or when zoomed out very far (thanks to Keavon and TrueDoctor for finding these problems). My initial implementation also caused the scrollbar to stop when the artwork was inside the viewport which combined poorly with the dragging mechanism.
This taught me about planning things out on paper as well as responding to feedback.
I have recently been learning Rust, a programming language similar to C and C++ in speed and syntax but with an emphasis on memory safety; for example handling if a variable is None. I found Graphite whilst looking on a Rust newsletter (gamedev.rs/news/020/#graphite). Graphite is a new vector editor built using Rust. The master branch can be found on the web thanks to WASM, which is a portable binary-code format for executable programs similar to assembly except it can be run on all architectures.
Above is a screenshot of the current master of graphite (editor.graphite.design/). The source code is available at their GitHub repository github.com/GraphiteEditor/Graphite. I have made several contributions available github.com/GraphiteEditor/Graphite/pulls?q=author%3A0hypercube+is%3Amerged including
I was really pleased to receive the following feedback from one of my code reviewers who congratulated me on 'the awesome work you did on this, it's so nicely polished and I hope you're proud of your work on this feature.'
I'm delighted to announce that my game, Runaway Trains, has made it through to the finals of the BAFTA Young Game Designer - Game Making competition.
The list of finalists is available at:
And the BAFTA page for Runaway Trains is here:
I have been learning Haskell with the Programming in Haskell book along with an online video course. I chose to learn a functional language because it gives me a different approach to programming which is very valuable. Whilst programs in Haskell can be beautiful and concise, it is very hard to get your head around writing it as it uses some completely different programming paradigms to something like C++.
I have also been learning Rust, a relatively new programming language with a focus on safety and speed. It has no runtime and it can reach speeds of C whilst maintaining type safety. To achieve this safety, it has no Null, it also has variables as non mutable and it only allows one mutable pointer to a data structure. This means it can catch the most common crashes at compile time.
Although to begin with it felt like I was battling the compiler, I now recognise how useful it is. To learn rust I have been using The Book - doc.rust-lang.org/book/
I am very excited to have won the Oxford Computing challenge 2021 (Intermediate). I would like to thank Mr Cronk and the OUCC for continuing to run this competition in these difficult times.
I have now completed runaway trains, a game made in UE4 for the YGD competition. In the game, you control the points to a model railway and have to stop the trains from crashing.
I am really pleased to say that I have qualified for the finals of the OUCC. I would like to thank my teachers for organising this.
I've passed the TensorFlow in Practice course at Coursera that is taught by Andrew Ng and Laurence Moroney. There were four courses, each of which lasted four weeks, and each week had a coding challenge that I had to pass to progress. I really enjoyed the course and thought the teaching was excellent.
My artwork for Water the Crops was featured in section 3 of "BAFTA Young Game Designers Initiative Impact Report": https://www.bafta.org/sites/default/files/uploads/ygd19impactreport.pdf.
I've joined the Coursera course "Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning". I enjoyed the Udemy course on Unreal Engine/C++ and found it a good way to learn.
I've finished the Udemy course "Unreal Engine C++ Developer".
It took me about a year because I did two big side projects whilst I was doing the course, VR 10 pin bowling and another VR game, Glass Goes in Green.
I thought the course was excellent. Udemy have kept it up to date. The lectures (about 50 hours) are good: they teach, but they also make you do plenty of the work yourself.
Here is a screenshot of the final project in the coarse, Testing Grounds:
And here is the certificate:
I am very excited to say that I won the final of the Oxford Computing Challenge 2020 (Junior) with a score of 70 out of 78. I would like to thank Mr C. for organising this and OCC for running the final in very difficult times.
I scored 66 out of 66 on the first round of the Oxford Computing Challenge and have qualified for the final 20. Thank you to Mr C. for organising this.
I've been quiet on my blog recently, but very busy with a project.
I have finally built my first VR game for Oculus Rift in Unreal Engine / C++. It's a recycling game. Grab items off the conveyor in and throw them into the right recycling bin: keep up your accuracy to keep playing as the conveyor gets faster.
I had nearly completed the game at Christmas and was doing the final debugging when I made a mistake with my back up to github and corrupted the game and the back up. I ended up having to redo all the Blueprints and got a long list of bugs.
I've created a new page for Unreal Engine projects. You can get the build and the source code and (in case you don't have Oculus) watch a video using the link below.
I am doing lots of projects every projects all the time and I can't put them all on the website so I've made a blog.