Dynamic IP workaround

Let’s say, hypothetically, that you’re trying to setup something for you and your friends to use. An FTP server, Minecraft server, demo website, whatever. Plus you have already have a simple little website hosted elsewhere with a cPanel and PHP/MySQL for your WordPress blog or something.

And let’s also say you have an ISP, called PictureyThink or MillenniumConnect or DecadeJoin or whatever, that will only give you a static IP for an extra monthly fee. But you’re already pretty upset with them because…

  1. They practically doubled your monthly bill despite their website saying things like “Price for life”, “No contract”, “No rate hike”, and “Keep your rate as long as you keep your plan” all over it.
  2. Your ISP is involved in several class-action lawsuits over the exact behavior above. So it definitely isn’t a one-off error on their part.
  3. You called them about it and they promised they’d resolve it and that your bill would be back to normal but it’s still nearly double the advertised rate months later.
  4. They advertised and sold you “1 Gig (1000 Mbps)” service, but your speeds are rarely over 30 Mbps, or just 3% of the advertised speed. And you’ve never seen speeds over 200 Mbps. (Yes, even when you connected your computer directly to the modem.)

In such a scenario you may feel justified in side-stepping their extra fee for a static IP, as at this point you’ve effectively paid that monthly fee for years to come.

Here’s how you might do just that.

Continue reading Dynamic IP workaround

Bitmap (Pixel) Fonts

One function most games need is the ability to display information to the user using text and numbers. It’s not uncommon for graphics libraries to have support for TTF fonts (see SFML and SDL). However, given the style of game I’m working on, what I would prefer is a bitmap font.

Just type “video game bitmap fonts” into Google image search and you can see how different they are compared to TTF. If you’re making a low resolution or pixel style game then bitmap fonts really fit the theme.

I’ve found libraries that deal with TTF fonts. I’ve also found programs that will supposedly turn TTF fonts into bitmap fonts. But the fonts I want are built from the ground up as a bitmap image, and I haven’t really found any way of using bitmap fonts (with SFML .NET specifically) within a project that satisfies that.

It seemed like a decent sized task to work on myself, so I took a stab at it.

Continue reading Bitmap (Pixel) Fonts

2-Look OLL Flashcards

I recently got into Rubik’s cubes using the beginner’s method (thank you badmephisto for the tutorial). Then I started learning learning F2L so I could complete the middle layers quicker. But while F2L is more intuitive, solving the last layer is more algorithmic.

I want to use 4LLL to solve the last layer because I’d “only” have to learn about 16 algorithms compared to the 78 algorithms for 2LLL. But it takes time to solve the cube to the point where I would need to use one of the algorithms I’m trying to memorize. So I wanted to just study the algorithms themselves, flashcard style. To do that I made a simple page.

The page isn’t anything special. Just some JavaScript/jQuery that randomly picks an algorithm from an array that’s hard-coded into the JavaScript and displays its information on the page. There’s no back-end to it or anything. It’s been a while since I posted a blog entry so I figured I’d upload the page to my site and make a post about it.

The page itself is here, and I made a GitHub repo for the page (not sure why) here.

Detecting Line Crossings

I’ve been working on a small game recently, the goal of which is to change your player’s color to match the colors of incoming lines so that you can pass through them. Detecting when the player crosses a line is at the core of the game.

Detecting which side of a 2D line a point is on is a pretty simple task. I’d wager most people have encountered the problem relatively early in their game development efforts (not allowing the player to move outside of the screen, for example). Nonetheless it’s probably something that people (including me) have solved in an inefficient or needlessly complex way. So I’m going to go over the problem and solution implemented in my game.

Continue reading Detecting Line Crossings