Thursday, January 26, 2012

Invasion Alpha Was a Success!

So far, the alpha I released on this blog had over 87 downloads and 271 views on that blog post! We received a lot of information regarding the game and what we should be doing, as well as what bugs can be fixed and the like.

In short, I am pleased how well this has gone, and in the future I hope to very shortly release the next chapter – the next alpha version – of the FPS. In the next alpha release, the map will take place in an underground sewer location. And no assets will be reused from the Unity sewer tech demo; it will be all a custom map. :)

Here’s a few photos of the new map in progress. Please note there is no light mapping just yet, and the scene looks sort of plain because shaders haven’t been applied yet.


A large room, with a siren.


One of the many long and expansive corridors.

At some point or another, most of the gun models will be revamped, and some scrapped totally and replaced. Also, a video will hopefully be uploaded at one point or another, but no guarantees. I’m going to keep you updated like this because it’ll awhile before the next build distribution.

If you don’t like the quality of the maps, suck it up; They’ll look a bit better later with tweaks and visual improvements.

Friday, January 20, 2012

Alpha 1 of Invasion Released!

Hello, everyone on the Internet and beyond. Another small post today where I’m going to discuss my FPS game that is currently in development with Unity Beta 3.5. The game’s overall concept I cannot yet disclose, but rest assured it is worth the wait.

The release is in the Alpha version and may contain bugs. There is only a single level, but aware there is more content than what’s in the download. I simply didn’t wish to put it all in there. For example, one feature in the works is the ability to drive on the backs and tanks and copters.

To download, please use the following link:


Thanks, and if you have any comments, please either comment here or on the Unity forums, if you’re a member. Some screenshots follow:



Saturday, January 14, 2012

Drumroll Please…

The public beat of the First Person shooter project I’m working on will be open soon! Check back frequently for updates, as a public beta will be open soon!

Wednesday, January 4, 2012

Self-Deleting Executable

I wrote a program the other day.  When you run it, it deletes itself.  Yay, but not as easy to accomplish as you might like.  So, with that in mind I’m going to give you all the source code to such a marvel.  It only works on Windows because it utilizes Window’s libraries.


   1:  /*
   2:   * This program produces an executable file that, when run, deletes itself from the hard disc.
   3:   * Author: SevenBits
   4:   */
   5:  #define WIN32_LEAN_AND_MEAN
   7:  #include <windows.h>
   8:  #include <tchar.h>
  10:  int CommitSuicide(char *szCmdLine)
  11:  {
  12:      //Define variables.
  13:      HANDLE hTemp;
  14:      char szPath[MAX_PATH];
  15:      char szTemp[MAX_PATH];
  17:      static BYTE buf[1024];
  19:      STARTUPINFO si;
  21:      UINT ret;
  23:      //Open a temporary file.  Copy ourselves into that file.
  24:      GetTempPath(MAX_PATH, szTemp);
  25:      lstrcat(szTemp, "suicide.exe");
  27:      GetModuleFileName(0, szPath, MAX_PATH);
  29:      CopyFile(szPath, szTemp, FALSE);
  31:      hTemp = CreateFile(szTemp, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE, 0,
  34:      //Create a process using the temporary executable. This will cause
  35:      //the file's handle count to increase, so we can close it.
  36:      ZeroMemory(&si, sizeof(STARTUPINFO));
  37:      ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
  39:      ZeroMemory(&si, sizeof(STARTUPINFO));
  40:      si.cb = sizeof(STARTUPINFO);
  42:      lstrcat(szTemp, " ");
  43:      lstrcat(szTemp, szCmdLine);
  45:      ret = CreateProcess(0, szTemp, 0, 0, FALSE, NORMAL_PRIORITY_CLASS, 0, 0, &si, &pi);
  47:      //Close our handle to the new process. Because the process is
  48:      //memory-mapped, there will still be a handle held by the OS, so
  49:      //it won't get deleted. Give the other process a chance to run..
  50:      Sleep(100);
  51:      CloseHandle(hTemp);
  53:      return 0;
  54:  }
  56:  //Don't start the file in main() but here, as this program can avoid the overhead of a main() function.
  57:  int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, PSTR szCmdLine, int iCmdShow)
  58:  {
  59:      char szPath[MAX_PATH];
  61:      //
  62:      //    Parse the command line:
  63:      //    Normally, we should not be run with any parameters.
  64:      //    We re-spawn ourselves with the current module's path.
  65:      //
  66:      if(szCmdLine[0] == '\0')
  67:      {
  68:          // Spawn a duplicate process, and tell it to delete us.
  69:          HMODULE hModule = GetModuleHandle(0);
  71:          GetModuleFileName(hModule, szPath, MAX_PATH);
  73:          CommitSuicide(szPath);
  75:          // Exit normally
  76:          return 0;
  77:      }
  78:      //    This is where we pick up execution second time we run,
  79:      //  When a filename has been specified on the command line
  80:      else
  81:      {
  82:          // Give the calling process time to exit...
  83:          Sleep(200);
  85:          // Delete the file specified on command line.
  86:          DeleteFile(szCmdLine);
  88:          // Exit normally. When we close, this executable will be automatically deleted.
  89:          return 0;
  90:      }
  91:  }    

Innovative? No.  Something new? No. But it’s a lot harder to do for beginners than one might think.  Feel free to use this code for whatever you desire.