Issue Report

I received this on github today, I love it! :)

Issue

Comment on Issue Report

Termite Is Open Source

The time has come, finally I was able to release the full multiplatform, multi-store-integrated code of Termite on github to help everyone who is in the same boat. I'm working on the multiplatformization of Termite for months now and I was struggling a lot of times. Then plan was to finish it up quickly but life ( and the systems created by programmers ) had other plans! I stucked a lot of times at issues that seemed so tiny at first glance and I had to spend hours figuring it out.

The code, compilation&deployment guide and tips&tricks can be found here :

https://github.com/milgra/termite

I did all development on an early 2016 12'' MacBook with a fanless intel core m7, 8GB RAM and 512GB SDD and it kicked ass! It runs Windows and Linux smoothly in VMWare, the game ran with 60 fps inside the virtual machine. XCode/CodeBlocks building is also superfast.

What kills it is Android Studio. I don't think CPU development will ever reach a state where Java desktop applications run smoothly. And it is not only slow because of Java, slowness is amplified by the gradle-scripts that run between the IDE and the project so there is a very loose connection between the IDE and the code. Actually my general feeling of Android development is that there is a very loose connection between everything and you don't know what is really happening and why is it happening. Learning curve is super steep. I can imagine developers who gave 5-6 years of their lives to android development and have a mostly clear picture on whats and whys but I'm not planning to be one :) Anyway, great respect to android developers, it seems to be the biggest suck factor in the industry nowadays.

To be a decent desktop operating system Linux needs a default GUI and a simple way to install binary/closed source applications. GNOME is okay but all developers should stand behind it and push it together towards perfection, and a bundle-based application structure would be awesome ( like on MacOS ) without dependence magic. For open-source programs apt-get install is fun until you have to add new sources to the sources list or older versions with removed dependencies, etc. Compiling from source is also fun, for sysadmins and time-millionares :)

iOS and it's API's became way too complicated. Doing autolayout in Interface Builder is a lifelong journey, doing things that were super simple back in 2010 are now super-complicated ( hiding the status bar, rotation, etc ), entitlements files are everywhere for increased security. The biggest pain was an fopen issue, it worked a few years earlier but now it only creates the file and then it cannot be read/written. It turned out that fopen on iOS creates files with 0000 permissions instead of 0666 which caused a 2-hour head scratching. Using open with explicit permissions solves the problem but why did fopen became obsolete?

Raspberry is a super cool little machine. It was super easy to port the game to it, runs well, I love it.

Steamworks is a mess. The API is a mess and the site is a mess. I spent days clicking through the site and I still have no idea how to go to the steamworks admin/store admin/the main page of the application with three clicks, I think it's impossible. Settings are scattered everywhere and the whole thing is backed by Perforce!!! You have to publish your changes every time to Perforce, it's insane. It's like a high school project. The documentation is not really talkative, I used the Steamworks sample project, the documentation and google together to fix issues but I wasn't prepared for random persistence errors which can be solved by disabling and re-enabling Inventory Service for example. But they are the biggest, have infinite money, they can do this :)

The best OS for multiplatform development is definitely MacOS. It puts everything under your ass out of the box and then gets out of your way. It has everything that linux has and everything that windows has and much much more.

Comment on Termite Is Open Source

AirPods Sound Quality Fixer

Icon

...And Battery Life Enhancer

Fixes sound quality drops when using AirPods with Macs. It forces the default audio input to be the built-in microphone instead of AirPods' microphone so MacOS doesn't have to mix down the output. It also increases battery life because AirPods doesn't have to broadcast sound back. If you have more input devices you can select which device you want to force over the AirPods microphone.

The app runs in the menu bar.

I want it now!

Downloads

GitHub link

Other milgra utilities you might be interested in

Mac Media Key Forwarder ( for Mac )

Mac Audio Keepalive ( for Mac )

Fat Fingers Keyboard ( for iPhone )

Comment on AirPods Sound Quality Fixer

Fat Fingers Keyboard

Icon

No more typos!

Free and Open Source keyboard for iOS

Fat Fingers Keyboard knows when you mistype and doesn't let the bad character in. It also shows you the bad touch point so you can improve your grip. After a few minutes you will start to type faster than ever.

With the additional symbol row at the bottom and an optional accent ribbon on the top the need for page switching becomes minimal so typing speed becomes even more faster.

To move easily through words and lines just simply swipe left-right-top-bottom.

All keys are freely remappable, accent ribbon can be two pages wide so feel free to add your language's accented characters or create a ribbon with your commonly used symbols or emojis.

Double tap shift to turn on caps mode.

Fat fingers comes totally free, so if you like it please help me make more awesome utilities and donate in the app / on my homepage.

I want it now!

App Store link

GitHub link

Other milgra utilities you might be interested in

Mac Media Key Forwarder ( for Mac )

Mac Audio Keepalive ( for Mac )

AirPods Sound Quality Fixer ( for Mac )


I created Fat Fingers Keyboard because I have three main problems with soft keyboards :

  1. Software keys detect touches from edge to edge. These edge areas are grey zones, you never know which key you will press, especially with big fingers. I transformed these grey zones into dead zones, no touches will go through here, you will be notified about the problem instead and the nearby keys lit up so you can make a more precise decision. The area of this dead zone can be set in the app.

  2. Continuous page switching. Because of regularly used punctuation you have to switch to the number/symbol page often which slows typing down and just simply annoying. Fat Fingers keyboard has a fix punctuation line under spacebar with the most commonly used punctuation marks and there can be also an accent ribbon on the top of the keyboard activated by the lower right button. In foreign languages it can be useful for their accented characters, in english you can use it for more punctuation marks or smileys or anything.

  3. The force-touch touchpad on the iPhone is a very neat and useful feature but annoying at the same time : after you move the cursor to a specific position and release your force touch the cursor often jumps away one or two characters. FatFingers uses simple swipe to move the cursor and moves the cursor one character with every half-key swipe so it can be controlled precisely.


How to enable the keyboard and remap buttons :

Comment on Fat Fingers Keyboard

Termite

Icon

Termite is the ultimate psychedelic real-time action strategy experience. You are the leader of a termite hive with three objectives :

  • collect food
  • produce ants
  • destroy alien colonies

Select groups of termits, order them to collect food or attack aliens, use the speed slider to slow down/speed up time to have more control over your ants.

With Termite you get :

  • 31 levels of intense action and mass destruction
  • Random scene generator
  • Tons of particles
  • Voxel system based minimal design

Termite is open-source, feel free to learn how to write muti-platform C games here

I want it now!

for iOS - App Store link

for Android - Google Play link

for Windows/MacOS/Linux - Steam Store link

for RaspBerry - Download ( enable OpenGL / Full KMS Support in raspi-config )

Comment on Termite

The new Termite

Back in 2009 I released my first iOS game, Termite. There wasn't that many apps back then so it reached a wide audience and a lot of people loved it, they wrote heart-warming reviews. My favorite one was "Super game, it taught me a lot about teamwork!".

I just moved on to other games and project but I always wanted to update it somehow. Then after I completely fell in love with voxels it was clear : I have to create a 3D Termite based on voxels and with new things like walls but I also wanted to keep the mechanics and the levels of the original termite because it was somehow super playable.

So I started to work on it a year ago and despite my work and my other projects and other million distractions finally I finished it and I proudly release it for the raspberry for the first round. Enjoy!

Comment on The new Termite

Living and Developing on a Raspberry Pi

My new game will run on all platforms possible but the first supported platform will be the Raspberry Pi because of 80's nostalgia. I love the fact that there is a super cheap home computer again that ages well - they don't double the cpu speed every year, they still sell the first version so you can optimise for the hardware and you also have to because it's not that strong - and I love this fact.

For a week I used my Raspberry Pi 3 as my main computer. And it was surprisingly usable, it is like a machine from the early 2000's. Overall desktop experience is okay, the terminal and file manager works well, LibreOffice and normal applications run fast enough, I used Code::Blocks for programming, the current raspbian apt version ( 16.04 ) is terribly buggy, I had to compile the latest one ( 17.12 ) on the raspberry which needed a few hours but it worked flawlessly after. Chromium, the now-default browser is the weakest point, it is a monstrous software and it had to run modern javascript which is also a monstrous task. Javascript intensive pages ( facebook and modern "portals" ) kill the board in two tabs, youtube can be in 6-7 tabs and it handles simple sites well. But it is advised to use only 1-2 tabs whatever you do.

Since my game doesn't use any framework and it's quite simple the board compiled it in a few seconds so development was rapid.

To summarise my experience : modern web is not for the raspberry pi but it is good for everything else, it is a super cheap and capable home computer.

Comment on Living and Developing on a Raspberry Pi

Headerless C programming with a single preprocessor macro line

Header files in C can be painful. They duplicate the file count, increase complexity heavily, make refactoring painful. There are solutions to get rid of them. It's possible to use header generators ( https://www.hwaci.com/sw/mkhdr/ - makeheaders ), write you own headerless c dialect with a precompiler like me ( https://github.com/milgra/clc class-c ) or use "#ifdef FOO_IMPLEMENTATION" blocks inside header files to define everything in one file but they are unelegant and confusing and have a lot of other problems.

The ultimate solution seems to be using the __INCLUDE_LEVEL__ preprocessor macro. It's value is zero if we are in a source file that was added directly to the compiler as parameter and greater than zero if we are in a file that was included as a header file from an other file.

So just create a single file, write the header declarations at the top, write the implementation under that and guard the implementation with an #if __INCLUDE_LEVEL__ == 0 macro and you never have to use header files again. You can include all files written this way as header files and add these files as source files to the compiler, everything will work as before.

Example : mtvec.c

#ifndef mtvec_h
#define mtvec_h

#include <stdio.h>
#include <stdint.h>

typedef struct mtvec_t mtvec_t;

struct mtvec_t
{
    void** data;
    uint32_t length;
    uint32_t length_real;
};

mtvec_t* mtvec_alloc(void);
void mtvec_dealloc( void* vector );
void mtvec_reset( mtvec_t* vector );

#endif

#if __INCLUDE_LEVEL__ == 0

mtvec_t* mtvec_alloc( )
{
    mtvec_t* vector = mtmem_calloc( sizeof( mtvec_t ) , mtvec_dealloc );
    vector->data = mtmem_calloc( sizeof( void* ) * 10 , NULL );
    vector->length = 0;
    vector->length_real = 10;
    return vector;
}

void mtvec_dealloc( void* pointer )
{
    mtvec_t* vector = pointer;

    for ( uint32_t index = 0 ; index < vector->length ; index++ ) {
    mtmem_release( vector->data[index] );
    }
    mtmem_release( vector->data );
}

void mtvec_reset( mtvec_t* vector )
{
    for ( uint32_t index = 0 ; index < vector->length ; index++ ) 
        mtmem_release( vector->data[index] );

    vector->length = 0;
}

#endif

At the moment I don't see any pitfalls in this solution, do you? Please add your thoughts in the issues, thank you.

check out the github project

Comment on Headerless C programming with a single preprocessor macro line

File System Change Logger

Running a program or installing a dev environment pollutes the computer with a lot of visible/hidden/unknown of files. If you are as curious as me about file changes/additions/removals on the file system try my new tool called fschangelog. It creates lightweight file system snapshots using the file size and last modified date only and compares these snapshot files. It groups the results in three groups : added, removed and updated. It is on github with a public domain license, just download the project and compile the *.c files and there you are.

fschangelog on github

Comment on File System Change Logger

Programming Concepts For Children

I'm always thinking about how programming should be introduced to children and how to reach real programming languages with them. Here is what I've figured out so far. Feel free to contribute by comments or through github.

GitHub project

Comment on Programming Concepts For Children