List page: Computer programming

Long range links with tiny radio modules

WiFi and Bluetooth capable microcontrollers are very popular for hobby projects, but at the best of times offer a range of around a hundred meters. Indoors, with with walls and other obstacles, the usable range is often less then 20 meters. A radio using a much lower data rate and frequency can achieve many kilometers of range1. The low data rate allows even a very weak signal to be received, and lower frequencies are much better at going through walls, trees and other objects. (Wireless communication and power) (Computer programming)

The (Cooley–Tukey) Fast Fourier Transform

The discrete Fourier transform breaks down a signal represented as a list of samples into its constituent frequencies. That is, it converts the signal to a sum of sine and cosine waves. It helps to use complex numbers, which for this purpose are just points in 2d space. Multiplying one complex number by another is the same as rotating one point the angle of another. For this, Euler’s formula, e**(i*θ) = cos(θ) + i*sin(θ), comes in handy as an easy way to create complex numbers along a unit circle at a given angle. (Computer programming)

How helpful languages create bugs.

A key part of programming is that you will spend more time looking at you code then the compiler. While of course it is important for the computer to be able to figure out what to do, it is equally important for you to be able to tell what the computer is doing. Take this function in C: float foo(float a, float b) { return a+b; } Looking at this, you can immediately know what the computer will do when this function is called: It will add two floating point numbers together and return the result (Computer programming)

Making a 3d renderer from scratch [part 3]

Currently the render works quite nicely, but calling it 3d is a bit of a stretch. While does provide a first person viewpoint, the entire map is a the same height. Games with this limitation were, like Wolfenstein 3D, were released and did quite well, but modern audiences want a bit more 3d in their 3d. The one thing that could really sell this as a 3d renderer would be allowing different wall and ceiling heights, where each room can have different floors and ceiling heights. (Computer programming) (3d)

Making a 3d render from scratch (part 2)

The last renderer worked fine but had 2 major problems, the most apparent is that it can only handle convex geometry, in other works, no walls can overlap on screen. Another problem is performance, it draws every single wall, regardless of if it is visible or not, resulting in a lot of wasted work (overdraw). A simple way to solve both at the same time is using portal rendering. The map is split up into convex sections (I call these rooms), which can be rendered as is, rooms can have also portals that link to another section. (Computer programming) (3d)

Making a 3d render from scratch [part 1]

This series will go over the functioning of a simple Doom style 3d software renderer intended for a first person game. A renderer needs something to actually render, lets start by placing a wall in the game world, representing it as 2 points in 2d space. (don’t worry, it will be 3d soon.) If this is just drawn as a line on screen, the result looks like this: Triple A graphics right? (Computer programming) (3d)

Analyzing Tic Tac Toe, and writing an AI.

Using the min max algorithm to make a Tic Tac Toe AI. (games) (Computer programming) (AI, ML and if statements )

Open directory search

Find open directories (unconfigured web servers with files) to explore with a search engine. (Computer programming) (tool)

Super simple AVR AM transmitter

Building a crappy AM trasmiter with an avr microcontroler and one trasistor. (Wireless communication and power) (avr) (Computer programming)

AVR build system

A generic makefile for building avr programs. (avr) (Computer programming)