Welcome to www.davidbasalla3d.com

  • Match Three Game

    So I’ve had a go at making a Match Three style game, similar to Bejeweled and Candy Crush. Check out the work in progress here! I figured it would be a good chance to play around with JavaScript and the Canvas element a bit more. In the end I used RequireJS for managing dependencies, FabrisJS for drawing on the canvas and Underscore for its more convenient array methods. Everything else is just vanilla JS.

    One major benefit of this little toy project is that I finally used JavaScript promises! When initially implementing the animation of the gems, I used callbacks from when an animation was complete to start the next ‘wave’ of animations. That quickly got so complex that it was really hard to reason about the board state. Also I had to somehow manage simultaneous animation of multiple gems, and wait until ALL of them had finished. After a brief pub chat of me relaying my troubles to friends and colleagues, I was told to check out promises! And they’re amazing!! They solved all my problems pretty quickly, especially using Promise.all for running simultaneous asynchronous operations and signalling when all of them have finished.

    Another thing that helped with development was that I added a little map loader which allowed me to define test cases (e.g. of just one row with one possible match). This helped immensely with checking that the matching logic and animation behaviour worked as intended. Ideally I would be able to write some sort of tests, but for the moment these little test maps work pretty well.

  • Isometric Game Test

    Over the weekend I managed to take some WebGL libraries (ThreeJS, BabylonJS) for a spin, and made a little demo reminiscent of isometric RPG-style games. Sadly you can only walk around with the WASD keys at the moment, and I still have to implement proper movement and any sort of collision detection. But playing around with the libraries was fun! I started with ThreeJS but ran into problems with its shadowing fairly quickly (shadows turn everything completely black even with other lights present). Also the public Github repo has loads of unmerged open PR’s, so I looked for alternatives. I came across BabylonJS which I’ve liked a lot, you can see the results in the demo.

    The map is defined as square of symbols in text format, where the different types of objects are identified by letter (P for Pillar) and a number for rotation (1 for 90 degrees, 2 for 180, etc). It uses inbuilt primitives such as Cubes, Cylinders as well as custom modeled objects in OBJ format. I’ve also downloaded the model and walkcycle from the BabylonJS playground website.

    I’ve had some issues with loading custom OBJ files, especially handling the asynchronous loading. Also the fact that you can only have a maximum number of 4 lights active is a bit sobering, but I suppose I shouldn’t expect full blown rendering capabilities which I’m used to from Maya, Renderman, etc. Anyway, it’s been a lot of fun, will see how much further I get with it.

  • CodeBar

    I went to my first CodeBar session! codebar.io is a great non-for-profit organisation that aims to teach “underrepresented groups to learn programming in a safe and collaborative environment”. The events are run as weekly workshops where tutors meet with students to work on a set of tutorials or their own projects. This event was organised by Tatiana Soukiassian who works as a developer at GDS. I initially only volunteered for setting up the venue and showing people to the right floor, but by the end it turned out that two people still needed a tutor for an introduction to HTML. So I spent the next 2 hours helping out by going through the tutorials with them. We even branched out a bit and had a quick look at using Bootstrap. I found it really rewarding and enjoyable, would definitely recommend for anyone to get involved!

  • Property Prices UK

    I wrote a Rails app to display property prices in the UK over the last 10 years (2006-2015), based on data from the Land Registry. Written with Rails, BootStrap, ChartJS, hosted on Heroku. Inspired by a coding test at a start up I took a while ago. Planning to add a paginated listing of the individual sales as well as a breakdown by type of property.


  • Happy New Year!

    I’ve rewritten the website with Jekyll. I stumbled across this nifty website generator recently updating physio-an-der-bucht.de and have come to appreciate the general file structuring and reuse of components. It allows for easy blog updates also.

    So I’ve taken the time to update my site, mainly to reduce some old clutter (removing 2 different places for blog style updates) and updating some of the content. Ideally I would still like to have a live editor similar to WordPress, but this will do nicely until I get time to investigate more.

  • For more ramblings, check out the Posts section.