Roguelike Holy Week - The 7DRL 2021 Challenge is Here!

The 7 Day RogueLike Challenge 2021 is finally here! This is an announcement video to provide a teaser for my channel over the next short while. I’m always excited to dive into these entries and see the talent and creativity from the world over!

Roguelike devs unite!

Playing Tie-Fighter and X-Wing Special Editions on Windows 11

With the definite excitement of the release of Star Wars: Squadrons, it’s a good time to jump into Good Old Games or Steam to pick up the X-Wing and Tie-Fighter series of games!

However…

Your excitement starts to cool as you’re trying to enjoy some classic games from the 90’s on your 2020+ gaming rig. The mission music doesn’t seem to work…maybe there’s a weird “double mouse” cursor, the graphics feel a little outdated, and maybe things just generally feel a little “slow”.

Fear not Pilot! This guide is for you!

Taking things from 30 FPS to 60 FPS

First things first - let’s fix the frame rate.

It may not be noticeable at the beginning, but the framerate is capped at 30 frames a second. There’s a community patch available to adjust that to more modern computers capable of 60 frames per second.

Fix the 3D Acceleration

You might notice in the released version of Tie-Fighter, an option for 3D Hardware Acceleration. However, if you try to enable it, chances are your game will crash when you try to enter a mission (at least it kept crashing for me).

There’s a 3D acceleration patch available, which can be applied to ALL of the games in the series; X-Wing, Tie-Fighter and X-Wing vs. Tie-Fighter.

xwa_ddraw_d3d11

  • In the Releases section, download the zip file
  • Extract the zip to your downloads folder
  • Copy the ddraw.cfg and ddraw.dll to your game’s folders
  • For Steam that’s in c:\Program Files (x86)\Steam\steamapps\common\STAR WARS Tie Fighter\remastered or c:\Program Files (x86)\Steam\steamapps\common\STAR WARS X-Wing\remastered

Fix the MIDI music

For some reason, the in-game music is broken by default on both the X-Wing and Tie-Fighter games. Binaries built for the older CPU architectures I guess.

A community fix is available here:

https://www.dropbox.com/s/wjj50h7v1cin6vz/X-Wing_TieMusicFix.zip?dl=0

Inside will be 2 folders: TieMusicFix and X-WingMusicFix.

  • Extract the contents of TieMusicFix to your installation folder of Tie-Fighter
  • Extract the contents of X-WingMusicFix to your installation folder of X-Wing

Join the Rebel Alliance, and/or fly for the Empire!

Both games are significant entries into the space simulation genre, perhaps being one of the best series that the genre has ever produced.

The Totally Games team learned all the right lessons from the X-Wing game, and applied them to TIE-Fighter.

Now get to your fighters, and May the Force Be With You

HOWTO: Make a PHP Router

I wanted to start with a simple router. The idea being that all requests are forced to the index.php where the decision is made where to send the traffic.

If it’s been a while since you’ve looked at PHP, or are just starting out, then maybe this will help you out as well.

Force all requests to index.php

In the root of your project folder, create an .htaccess file. This is a “special” file that is used by most web servers.


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php [QSA,L]

Direct Web Traffic Based on Request

Get the requested path with $_SERVER["REQUEST_URI"], and require the page you want to display.


<?php

$request = $_SERVER['REQUEST_URI'];

switch ($request) {
    case '':
    case '/' :
        require __DIR__ . '/views/home.php';
        break;
    case '/contact' :
        require __DIR__ . '/views/contact.php';
        break;
    default:
        http_response_code(404);
        require __DIR__ . '/views/404.php';
        break;
}

?>

Create the Necessary Views

Create the /views folder, and create any view files you need.

// views/home.php

<h1>Homepage</h1>

// views/contact.php

<h1>Contact Us</h1>

// views/404.php

<h1>Error 404</h1>

Running the PHP Server from the command line

To test out any of your local PHP files, you can take advantage of the PHP command-line interface (cli) to start a running PHP-capable webserver.


php -S 0.0.0.0:3000 index.php

This is assuming of course that you have PHP installed.

If you found this tutorial helpful, please share it!