HTML5 Jumper Game Conversion

I’ve just finished porting the code from an HTML5 tame tutorial (built in the style of Doodle Jump) to CoffeeScript out of a combination of boredom and an interest in getting used to CoffeeScript.

The tutorial can be found at http://michalbe.blogspot.com/2010/09/simple-game-with-html5-canvas-part-1.html. I’ve made only one real major change: Rather than using the mouse input (in his tutorial, onMouseMove), I’ve set it up to use keyboard events.

Play the final product: http://minalien.com/html5_jumper/
Compiled JavaScript/HTML/CoffeeScript Source: CoffeeScript Jumper Game

(Read On to get CoffeeScript Source)
(more…)

iTGB #include Case Sensitivity Fix

iTGB, the iOS version of GarageGames’ Torque 2D game engine (also known as Torque Game Builder), has some case-sensitivity issues within its #include directives. For default installations of Mac OS X, this isn’t going to cause any problems. But for people (like me) that chose to format their Mac’s hard drive as case-sensitive, there will be some initial build errors. Here are the ones I ran into with iT2D 1.4.1 and iT2D 1.5 Preview 1:

File: t2d/t2dParticleEffect.cc
Replace:

#include "math/mrect.h"

With:

#include "math/mRect.h"

File: platformiPhone/platformGL.h
Replace:

#include "platformIPhone/iPhoneGL2ES.h"

With:

#include "platformiPhone/iPhoneGL2ES.h"

File: platformiPhone/iPhoneProfiler.h
Replace:

#include "core/TorqueConfig.h"

With:

#include "core/torqueConfig.h"

File: platformiPhone/iPhoneUtil.h
Replace:

#include "game/net/tcpobject.h"

With:

#include "game/net/tcpObject.h"

File: platformiPhone/iPhoneConsole.h
Replace:

#include "Platform/event.h"

With:

#include "platform/event.h"

File: platformiPhone/iPhoneFont.mm
Replace:

#include "Math/mRect.h"

With:

#include "math/mRect.h"

File: platformiPhone/iPhoneMutex.mm
Replace:

#include "util/safedelete.h"

With:

#include "util/safeDelete.h"

File: platformiphone/menus/popupMenu.m”
Replace:

#include "platform/menus/popupmenu.h"

With:

#include "platform/menus/popupMenu.h"

TGB Editor Fix (Windows/Aero/OpenGL)

Anybody who runs TGB on Windows Vista/7 and has an ATI card has noticed this problem. (For some reason, I don’t think it happens on nVidia cards, but this will likely fix it there as well, if the problem does exist). This fix will allow you to maximize, resize, and minimize your Torque 2D editor window without having the offset problem, and this does not harm any other aspect of the editor that I have noticed.

Note that to do this fix, you will need to have the Pro edition, as it requires modification of the T2D source code. First, open “T2D SDK.rc” and create a new menu. You need to make sure that you add at least one menu option to it (I just entered a space) so that it will render the menu bar (which is the entire base of this fix). After doing this, you will need to update game/resource.h to include the menu identifier, since winWindow.cc includes that file rather than the root resource.h created by the Resource Editor.

File: game/resource.h
Find:

#define IDI_ICON1                       107

Add After:

#define IDR_MENU1                       108

File: winWindow.cc
Function: CreateOpenGLWindow
Line: Approx 1369 (1.7.5, unmodified)

Replace:

   return CreateWindowExW(
      exWindowStyle,
      windowClassName,
      windowName,
      windowStyle,
      0, 0, width, height,
      NULL, NULL,
      winState.appInstance,
      NULL);

With:

   return CreateWindowExW(
      exWindowStyle,
      windowClassName,
      windowName,
      windowStyle,
      0, 0, width, height,
#ifdef TORQUE_TOOLS
      NULL, LoadMenu(winState.appInstance, MAKEINTRESOURCE(IDR_MENU1)),
#else
	  NULL, NULL,
#endif
      winState.appInstance,
      NULL);

Silverlight Password Generator

Well, since I wiped my site to get everything built back up (because my Linode was getting all finicky with me), I figured I should put some content back on the blog while I’m in the process of designing the layout pages for my portfolio and the rest of the content to be added to the site. And so here we have a password generator, written in C# for Silverlight 4. Enjoy – VS2010 Solution & Source code available at http://files.minalien.com/PassGen.zip

Go to Top