# ExtraCredits Game Jam #6 <img title="Personal project" src="/img/perso.svg"/>
<divclass="cinema">
<a
data-lightbox="hedgeclog"
href="/img/hedgeclog-1.png"
title="Game logo">
![](/img/hedgeclog-1.png)</a>
<a
data-lightbox="hedgeclog"
href="/img/hedgeclog-2.png"
title="Level 2">
![](/img/hedgeclog-2.png)</a>
<a
data-lightbox="hedgeclog"
href="/img/hedgeclog-3.png"
title="Water mechanic introduction">
![](/img/hedgeclog-3.png)</a>
</div>
<blockquote>
A fire broke out at "Hedgehogs and associates" !<br/>
All hedgehogs have to leave the building!<br/>
But co-workers need to keep a safe distance from each others’ spikes !<br/>
Help them get through the fire hazard!
<legend>Game pitch</legend>
</blockquote>
On August 21st 2020 I participated with Romain Pelle ([@roma-p](https://github.com/roma-p)) to a 72h Game Jam organized by [ExtraCredits](https://www.youtube.com/extracredits/) with the theme _"Take Care"_.
The game we created is a **puzzle game** where you control multiple hedgehogs and must direct them to the exit door, while avoiding the fire and making sure that they don't get too close to each other.
Each level has been designed to introduce **one single mechanic at a time**, with a **gradual yet rewarding difficulty curve**.
### Reception
The game received a lot of very **positive feedback**. There is no official ranking of games, but the game moves between the **10th and 20th place** according to itch.io popularity ranking (though we don't know how this ranking is computed).
<divclass="cinema">
<a
data-lightbox="hedgeclog-feedback"
href="/img/hedgeclog-feedback-1.png"
title="Host's feedback">
![](/img/hedgeclog-feedback-1.png)</a>
<a
data-lightbox="hedgeclog-feedback"
href="/img/hedgeclog-feedback-2.png"
title="10th place ">
![](/img/hedgeclog-feedback-2.png)</a>
</div>
### Skills
- Game design
- Godot 3 (python-ish scripting)
- 2D sprite creation (Krita)
- Sound design (Audacity)
- Level design
### More
- Game jam page: https://itch.io/jam/extra-credits-game-jam-6
- Game page (can be played in the browser): https://cromfr.itch.io/hedgeclog
Git-shard is a **git extension** designed to help publish multiple small repositories (shards) from one single git private repository.
It was originally designed for [Skywing](https://github.com/SkywingvL), who contributes a lot to the _Neverwinter Nights 2_ community and has troubles releasing his work due to some parts of it being under a non-disclosure agreement.
### Tech
Git shard has been written in one **single bash file**, as bash is almost always installed alongside git (even for a Windows install).
The shards are versioned inside a separate directory, and tracks the current files present in the big repository. **Shards can be manipulated exactly like standard git repositories**, using `git shard exec shard_name command` (which internally translates into `git --git-dir=.git/shards/shard_name --work-tree=shard_name command`).
Commits from the main repository can be quickly copied to each shard with a single command: `git shard commit`. This makes it **easier to use than git submodules when one change may affect multiple shards** or when there are a lot of shards.
STNeverwinterScript provides a lot of **IDE-like features** to Sublime Text 3 **for writing NeverwinterScript** code.
NeverwinterScript is a C-like language, with enough differences that **standard tools provide inaccurate results** or simply don't work. STNeverwinterScript provides a replacement for those tools, integrated into the editor.
It features:
- **Syntax highlighting**
- **Auto-completion** for functions, constants, #define and #include scripts names
- **Documentation** pop-ups generated from in-line documentation
- **Code snippets**
- Basic build tool (run the compiler against the current file / folder)
Completions are generated using **regex-based parsing** (it's not perfect but it is a lot simpler than implementing a fully featured language lexer), and updates the symbol list in real time (unmodified files are cached).
The smart build tool keep a list of all scripts, **creating and updating a dependency tree**. If a file is modified, all scripts that depends on it are queued for compilation. The scripts to compile are then **spread across multiple compiler processes** (the compiler is single threaded) for faster compilation.
### Skills
- Python 3
- Language-specific IDE features: auto completion, documentation, build system, ..
Code4Blind was a **hackathon** organized by _[Les désordinateurs communicants](https://lesdesordinateurs.org)_ for working on solutions to **help visually impaired people to practice rock climbing**.
The **topics** were:
- Image processing for detecting and classifying holds
- Communicate the path and holds layout on the floor before climbing
- Recording the movements executed by a climber in order to be able to give instructions to the next climber.
- Communicate the holds around the climber while climbing
I worked on the last topic, and we decided to **experiment with binaural (positional) audio** to signal available holds around the climber.
- Hold direction is communicated with binaural audio position
- Hold distance is communicated by volume
- Sounds type (bell, drum, ...) indicate the shape of the hold
- Multiple holds can be differentiated with sound pitch
In order to start working on a prototype, we assumed we were already provided with the head position of the climber in real time, and the holds position in the path.
### Results
The results were not very promising. Current **binaural audio libraries gives very inaccurate results**, especially for locating up vs down and front vs behind directions. This could be either caused by:
- The **missing head-related transfer function** (HRTF), which is different for every person and difficult to obtain without very specific equipment.
- **Inaccurate software audio processing**. Even with the best conditions, libraries never yields results that are as good as a real-world recording.
- **Lack of experience or ear training** with software-based binaural audio.
Nevertheless, the hackathon was very exciting and I really appreciated the experience, as I am both a software developer and an experienced rock climber.
[Matrix](https://matrix.org) is a protocol for **secure decentralized communication**, that provides a fairly easy to use JSON/REST API for application developers.
Currently it's **mainly used for chat** using [Riot](https://riot.im), but **the protocol is quite versatile** and can be used in many different ways like [blogging](https://github.com/lukebarnard1/journal), communicating with [home assistant](https://www.home-assistant.io/components/notify.matrix/), IOT control, [virtual reality](https://www.youtube.com/watch?v=mGDaQQlXrLA), ...
**The community around Matrix is very strong**, and many people have created alternative clients, and bridges for synchronizing other chat platforms (IRC, Slack, Mattermost, Telegram, Discord, ...) with Matrix. Progressively Matrix is becoming the one chat platform to rule them all.
I came up with this because my gaming-oriented PC has a home-made watercooling system and its motherboard does not have any external sensor pins for the water temperature sensor.
1. Always keep fans at around 70% so the water never gets too hot. Effective but too noisy for my taste...
2. Control fan speed using the SSD temperature sensor (the SSD does not heat up very much, and is placed next to a watercooling radiator, so we can deduce very approximately the water temperature with it). It would require to write a custom multi-platform tool that would somehow find a way to control fan speed (and would require some reverse engineering on the motherboard).
3. Find or build an external fan controller, which uses the water temperature sensor.
I went for solution 3. and designed a small board around an __Arduino nano__, that can take __multiple temperature inputs__ from external sensors (Water and Air), and __adjust fan speed__ accordingly using a simple __temperature/speed curve__. I also put a small __OLED screen__ (_SSD1306_) to display all this information, a button to force high / low / auto fan speeds, and an __alarm__ if the temperature reaches critical values (or the sensor is disconnected / short circuited).
In 2017 I gave a 2-hour course in ISEN Brest with the Electronics Club, to introduce students to __Quality Assurance__ and __Test Driven Development__, with a __language agnostic__ approach.
- Parsing and serialization of GFF files, a general purpose, treelike binary storage format.
+ __Profiling and optimizations__. There are currently two versions of the parser: one read/write that may be slow as it instantiates all data structures in memory, and the second one which is read only, very fast and memory efficient as it only crawls over the file without allocating memory. Some work is in progress to make the second read/write.
+ Keep the structure of the stored data as is (other existing parsers reorder elements). The checksum of the binary file should not be modified if the file is not changed between parsing and serialization.
- __Reverse engineered__ [TRN.ASWM data](https://gist.github.com/CromFr/104bac52dc9191099d9d9e3dbd2c4975), a structure containing compressed 3D mesh with pathing information (pathfinding pre-calculated data, foot step sounds etc.)
- Other NWN2 simple data structures like TLK (translation tables), ERF (tar-like archive), and FoxproDB (used by NWN2 as a persistent key/value database)
- Reversed spec for TRN.ASWM format: https://gist.github.com/CromFr/104bac52dc9191099d9d9e3dbd2c4975
## Account manager
<divclass="cinema">
<a
data-lightbox="lcdaaccounts"
href="/img/lcdaaccounts-1.jpg"
title="Character view">
![](/img/lowres/lcdaaccounts-1.jpg)</a>
<a
data-lightbox="lcdaaccounts"
href="/img/lcdaaccounts-2.jpg"
title="Dungeon completion status">
![](/img/lowres/lcdaaccounts-2.jpg)</a>
</div>
It's a big project aiming to provide to players a __web interface and an open API__ for managing their server account and browsing characters.
It makes heavy use of my _nwn-lib-d_ library to extract information distributed across ~300MB of various game files as fast as possible.
The backend is written in D, using the Vibe.d web framework and nwn-lib-d parsing library (the main reason being that D is a good prototyping language, and is fun to write :) ).
- Production frontend: https://account.lcda-nwn2.fr (French)
+ Character example: https://account.lcda-nwn2.fr/Crom%2029/vault/krogar (French)
- Production API: https://api.lcda-nwn2.fr/
## Server infrastructure
The previous server was hosted on a Windows XP machine, behind a home connection.
Since the OS was aging (understand _utterly out of date_), and most software do not run anymore on the platform (and the lack of decent remote control / automation), I decided to setup a brand new server running __GNU/Linux__, with a __light windows virtual machine__ just to run the game server (the game server only runs only under Windows, and require DLL injection support for plugins, which puts Wine out of the game).
### General
- Dedicated server hosted on Kimsufi (OVH) servers (low budget / second hand servers)
- Ubuntu 17.04 (LTS) host system (when created)
+ MariaDB used by nwn2server
+ LcdaApi and LcdaAccounts services
+ Automated nwn2server updates
+ Automated player data & server __backup__
+ Other web services like a [Wiki](https://wiki.lcda-nwn2.fr/), LcdaAccounts, LcdaApi, ...
- __KVM Virtualization__
+ Running only the nwn2server process, on Windows Server 2012
+ __VirtIO__ for fast network and disk access
+ __SPICE remote control__ only accessible through a SSH tunnel
Since Kimsufi services do not provide disk redundancy nor KVM (Keyboard/Video/Mouse) access to the machine (they are the cheapest dedicated servers available), the setup is fully automated using Ansible scripts.
In case of a disk failure, the server can be reinstalled in a __few hours__ (mostly spent on Windows guest setup & updating), and backed up data can be restored quickly.
I built a __conveyor belt__ actioned by a small reduced __DC motor__, controlled by a raspberry PI (with a H bridge for power separation). Every 3 hours, the bottles rotate for about _3 π / 4_, so my rum is gently blended and get a __better___taste___faster__ :)
It is designed to be __quick and easy__ to deploy. Its default configuration serves the folder given by command line and uses UNIX users/passwords (via __PAM Authentification__) to upload/view files respecting file permissions.
By default, the file named `index.md` gets rendered atop of the file list.
### More
- Source code: https://github.com/CromFr/Served
- Design:
+ Bootstrap
+ JQuery
+ Markdown rendering with Showdown
+ Interfacing D lang. with C library (PAM)
## NWN2 Log web access
<divclass="cinema">
<a
data-lightbox="nwnlog"
href="/img/nwnlog-1.png"
title="Log entry listing">
![](/img/nwnlog-1.png)</a>
<a
data-lightbox="nwnlog"
href="/img/nwnlog-2.png"
title="Search queries and auto-generated menu">
![](/img/nwnlog-2.png)</a>
</div>
The goal was to provide a common __web interface__ to __browse and search log__ entries written by the Neverwinter Nights 2 server _La Colère d'Aurile_.
These entries are written in different files/databases, use different syntaxes and timestamps relative to different time zones.
The log viewer has been written to be as easy as possible to extend and maintain:
If you want to add a log page, you just have to write a class. The menus, interface, search parameters, the instantiation are __auto-generated at compile time__.
It allows developers to write the XML GUI code with their favourite editor, while seeing the result in real time in another window, with extra debugging information that NWN2 doesn't provide.
title="Longer game, with walls, traps and goblins">
![](/img/ludum32-2.jpg)</a>
</div>
Ludum Dare is an online community best known for “Ludum Dare”, the Accelerated Game Development Event of the same name (also called a “Game Jam”).
For the Ludum Dare 32 (April 2015), _Thomas Abot_ and I developed a little game on the theme _"An Unconventional Weapon"_, using the Unity 3D game engine.
Adventurers are coming to get your treasure, you are controlling your ultimate weapon to protect it : the Boss.<br/>
<br/>
You are controlling the Boss and you need to end up with as much waves of enemies as possible. To help you, you can place walls to block enemies, traps (who can be activated by clicking on it) to damage enemies, and hire goblins to help you (but beware not hurting them!).<br/>
You can get gold by killing enemies (by attacking them or by activating traps while enemies are on it).<br/>
We (_Thomas Abot_ and I) were charged to work mainly on the software part: receiving processed sensor values to make some decisions, and send command values to the servo-motors. However we ended up working on the full stack from hardware choice, interfacing, data processing to the boat intelligence and networking.
The boats embeds a _Beaglebone Black_ card (similar to the Raspberry Pi, but more hardware-oriented). We also designed the electronic add-on for the Beaglebone to connect the different sensors and actuators.
This project had many challenging (understand interesting) parts:
- Design a socket interface so the hardware acquisition can be developed independently from the intelligence.
- Provide a modular simulation web interface to test and debug the program as much as possible.
- Wind optimization: the boat goes faster windward than downwind.
- Tacking: The boat cannot go directly upwind, and the program needs to handle this correctly.
- Fixing the kernel PWM drivers that had a bug preventing to generate more than 2 PWM.
- Find solutions for:
+ Cable jamming around the servo-motors.
+ Van design, placement and electronics.
### Used skills
- Interface sensors and actuators with the program
# Courses on Git <img title="Personal project" src="/img/perso.svg"/>
<divclass="cinema">
<a
data-lightbox="gitcourse"
href="/img/gitcourse-1.jpg"
title="First course">
![](/img/gitcourse-1.jpg)</a>
</div>
In 2013, I gave 3 courses of 2 hours on Git, a version control system (like Subversion, Mercurial, ...) at ISEN Brest, for voluntary students and teachers.
This course aims teaching the use of Git in collaborative projects, from the basis (add, commit, push, pull, ...) to more complex things (branch, merge, conflicts, stash, ...).
This project implies everything from electronics and low-level programming to higher level software for the stabilization : we didn't want to build a kit, our goal was to build everything from scratch.
### Used skills
- DIY
- Electronic card development
- Brushless motors control
- ARM development in C++ aimed for raspberry Pi and for STM32F4 (bare metal)</li>
After having needed many times a C++ library to parse configuration files, I decided to write my own, using design advice from the [The Little Manual of API Design](https://www4.in.tum.de/~blanchet/api-design.pdf)
In 2011, I worked on a 3D video game project, controlled by wiimotes, and detecting the player position with IR diodes.
---
It has been inspired by [WiiDesktopVR from Johnny Chung Lee](http://johnnylee.net/projects/wii/). The goal of this project was to discover the possibilities offered by the wiimotes and this 3D simulation and to make a game with it.
Johnny Chung Lee project:
<divclass="cinema center">
[![View on youtube](/img/lowres/matrixrun-wiidesktopvr.jpg)](https://www.youtube.com/watch?v=Jd3-eiid-Uw)
</div>
The game goal is to progress with a ship in a tunnel, avoiding obstacles and killing enemies
The ship movements are controlled by the head of the layer, and the guns by two wiimotes held by the player.
In-game video : Random tunnel generation, player movements and fire
# La Colère d'Aurile <img title="Personal project" src="/img/perso.svg"/>
Since 2009, I am in the development team of _La Colère d'Aurile_, a French persistent role-play/action server on Neverwinter Nights 2 based on the pen&paper role playing game Dungeon & Dragons.
## Neverwinter Nights 2
<divclass="cinema">
<a
data-lightbox="nwn2"
href="/img/nwn2-1.jpg"
title="Races and classes of NWN2">
![](/img/lowres/nwn2-1.jpg)</a>
<a
data-lightbox="nwn2"
href="/img/nwn2-2.jpg"
title="Concept art of the extension Storm of Zehir">
![](/img/lowres/nwn2-2.jpg)</a>
<a
data-lightbox="nwn2"
href="/img/nwn2-3.jpg"
title="Concept art of the extension Storm of Zehir">
![](/img/lowres/nwn2-3.jpg)</a>
</div>
Neverwinter Nights 2 is a role playing game based on the universe and rules of Dungeon and Dragons 3.5, developed by Obsidian in 2006, following the first of the name.
This game offers - in addition to a solo campaign - an online multiplayer mode, with a nice editor that allows to create custom content and host in on a personal server.
The editor is quite powerful, and allows to create 3D maps, dialogs, compiled scripts (in a C-like language), ... and the environment around it is free enough to add custom 3D models, ingame UI or change the core rules of the game (races addition, class addition, spell modification, ..).
Some developers have even found a way to execute C# program on the server-side through pipes with the server process, allowing for example to do SQL requests.
## _La Colère d'Aurile_
<divclass="cinema">
<a
data-lightbox="lcda"
href="/img/lcda-1.jpg"
title="Waterdeep city center by night">
![](/img/lowres/lcda-1.jpg)</a>
<a
data-lightbox="lcda"
href="/img/lcda-2.jpg"
title="Mintarn island">
![](/img/lowres/lcda-2.jpg)</a>
<a
data-lightbox="lcda"
href="/img/lcda-3.jpg"
title="Underdark">
![](/img/lowres/lcda-3.jpg)</a>
</div>
_La Colère d'Aurile_ is a public persistent server, launched in Avril 26 2008.
Since 2012, I am the administrator charged of development and integration.
### Used skills
- Team development of the server
- Handling a non-professional development team (objective attribution, priorities, ...)
- Creation of maps, scenarios, dialogs, quests, monster balancing, ...
- Development tools setup : Git, Continuous integration by hook scripts