Theodore Tomalty

Home
Work
School
Fun

Adventure Game

The adventure game is inspired by the fixed-screen birds-eye-view style games from my youth like Zelda or the Merlin's Beard flash game. I built a lot of it while I was at CERN, and I have very fond memories working in a particular cafe in the French town of Saint-Genis.

Snapshot of the game UI

The game itself is rudimentary but mostly coded. The player can move around using ASWD, peer through the inventory, quest log, map, and equipment using the number keys. Possible interactions include buying from stores, accepting quests from questgivers, fighting, item drop and pickup from monsters (although the area outside of town with these elements is currently disabled for development).

This was my second JavaScript project, using the same style and some of the same code as the Snake game, and I was not aware of many of the best practices that would have made it easier for the project to scale in complexity. One problem was that each zone in the world had it's own file because the base map was hard-coded in source and each element of the zone had to be added manually.

I then started working on the development part of the game, beginning mostly from scratch and writing many management systems that would take care of all the base-level map and context manipulations in a generalized way. The development mode allowed the user to create zones in an empty world map and populate the zones with any of the implemented elements (e.g. a shop). The world is saved to local storage as a JSON object with everything needed to load it in the next session.

The idea here was that after the world would be created in this way, the user could click 'Play' and traverse the adventure they created as the protagonist. It would then be a simple matter of creating a repository of these worlds that other people have created and load them to play yourself. This is still under construction. It would be a simple matter to load the developed maps into the game, the problems is that the play module itself needs complete refactoring in order to merge it with the code structure of the development module (which is crucial for scaling the project).

Of course most of these helper functions are designed to manipulate/render html and interface with the DOM, which I realize now could have easily been done using a front-end development framework like React. My goal now is to write an ASCII-game package with React, which I would use to implement both the play and development modules of the game.

Organizer

The organizer app was one of my first python projects which I made to keep track of deadlines and working days for school. I came up with the idea after trying to organize myself with several different apps, but always feeling that they either offered too much customization or too little, so I decided to make my own with exactly the features that I wanted.

Organizer UI

As is often the case in school, it is not helpful to manage time hour by hour, but rather to allocate whole days for a particular task. For example, you might estimate that writing a report should take about three days of work, and that work can happen at all sorts of times in between other crucial functions like classes, exercising, transportation, meals, etc., and it would be silly to put all that stuff in your calendar as well. That was how I organized myself mentally, and it became the philosophy behind the organizer app.

The UI is simple and clean, and there are a minimal number of features that I deigned the most useful. The calendar section shows the days and the upcoming events for the next month. In the sidebar are things for today, a to do list for tasks with an undefined time frame, and general long term goals. This last one could be for things like 'eat healthier' or 'work on that open source project', i.e. not exactly things that you would forget but it's useful to be reminded of them none the less. For each day there are three types of events: Event, Deadline, and Progression. The first two are self-explanatory and the third is supposed to be for setting aside time to work on something (Progression towards completing a goal, to do, or deadline). On each day you can also set that you have 'lots', 'little', or 'none' free time. Grey boxes indicate days with less free time.

The point of this app is to reduce the mental overhead of being conscious of all your responsibilities at once. I for one often find myself at night thinking over all the things I have to do in the near future, and it sometimes prevents me from getting any sleep. And many things that are not crucial I decide to forget about because it's too much of a strain to remind myself of them continually. Organizer is meant to limit these unwelcome behaviours.

Snake.js

Snake Game Snapshot

Snake was my first foray into JavaScript, it is a simple game where the player controls the snake in order to eat as many apples as possible without intersecting himself or hitting the wall. I used ASCII characters to represent the elements on the map, and wrote a simple event loop that moves the snake by one unit on each iteration.