Torus Games

Revision History

5.10 24 Jan 2021

More efficient compression of Jigsaw Puzzle images for improved wide-color support and reduced download size.

(macOS) Runs natively on both Apple Silicon and Intel Macs.

Fixed bug that Chess game would incorrectly animate computer's move when crossing Klein bottle fundamental domain boundary.

22 Nov 2020

Changed various GPU uniforms, colors in buffers, etc. to half-precision (__fp16 and faux_simd_half4) where appropriate.

5 Nov 2020

Removed workaround for bug that function-constant assignments like
constant bool gDrawSlice [[ function_constant(0) ]];
constant bool gDrawSolid = ! gDrawSlice;
used to work as expected on iOS but fail on macOS. They now work correctly on both OS’s.

28 Oct 2020

Flipped the 3D fundamental domain walls’ texture coordinates from top-down to bottom-up, to correct a bug that in the quarter-turn and half-turn spaces, when the player scrolled the game’s contents, the pinwheel pattern on the back wall, while scrolling correctly side-to-side, would scroll in the wrong direction top-to-bottom.

5.9.1 24 Sep 2020

Replaced an 8-bit unsigned integer with a 16-bit unsigned integer to work around a bug in the A9 and A10 GPU's handling of the former, which had led to incorrectly displayed walls in Torus Games maze when running on devices with A9 and A10 processors. Many thanks to Alex Jacoby for reporting this bug.

5.9.0 29 Jun 2020

Replaced manual texture loading with Asset Catalogs and MTKTextureLoader.

22 May 2020

Made Word Search letters upper case. Wrote new implementations of ToLowerCase() and ToUpperCase() using NSString's built-in lowercaseString and uppercaseString. Adjusted letter positions in Vietnamese Crossword and Word Search puzzles to accommodate uppercase letters with two diacritics stacked on top (for example Ỗ).

21 May 2020

Rewrote Gomoku algorithm using more efficient data structures (GomokuLine, GomokuIntersection, GomokuBoard) to support more efficient processing of search tree, yielding a 100x speed increase (however, a "factor of several" of that was likely due to avoiding thermal throttling during 1 to 2 minutes of processing that the old algorithm required). Then increased the search depth, and added αβ pruning for an additional 100x speed increase (but again with thermal throttling likely playing a role). Added an Extra Hard difficulty level, so the app now offers the recursion depths (Easy, Medium, Hard, Extra Hard) = (0, 1, 2, 5).

19 May 2020

Rewrote Chess algorithm using αβ pruning. New algorithm is over 100 times as fast as the old one. Enabled Extra Hard difficulty level.

6 May 2020

Made Word Search's word marker colors more saturated and made its background pure white.

16 Apr 2020

Renders to Wide Color (Display P3) when available.

Some of the shared code that won't be needed in the upcoming SwiftUI versions of the Geometry Games apps has been migrated to "-LEGACY" files, to allow the SwiftUI versions to include desired utilities without including legacy cruft like PixelRGBA, ImageRGBA, etc.

5.8.3 31 Mar 2020

(iOS) Converted launch screen format from .xib to .storyboard to comply with new App Store requirements.

(iOS) Toolbar self-adjusts at runtime to default height for device (iPad or iPhone).

(iOS) Made toolbar opaque to make it brighter.

5.8.2 11 Nov 2019

Eliminated SideWindow pointers.

8 Nov 2019

Replaced functions deprecated in iOS 13 or macOS 10.15 with non-deprecated alternatives.

5.8.1 10 Oct 2019

(iOS, macOS) Uses UIAlertAction (iOS) or errorWithTitle:message: (macOS) on main thread to ask Crossword players to enter Chinese characters instead of Latin letters.

10 Oct 2019

(iOS) Updated for compatibility with iOS 13. In particular, it delays the presentation of the initial popover until after the base view controller has finished setting up.

5.8 11 Nov 2018

(macOS) Enabled Hardened Runtime to allow Notarization by Apple.

7 Nov 2018

Apples game uses constant number of worms.

23 Oct 2018

(iOS) Toolbar respects safe area, to avoid underlapping the Home Indicator on iPhone X.

17 Oct 2018

(iOS) Table images, toolbar icons and other images re-created at @1x, @2x and @3x. Source files for those images all simplified and tidied up (now mostly as iDraw files).

(iOS) Toolbar icons resized to 24pt, which is the new recommended size.

16 Sep 2018

(iOS) Now Metal-only. Removed all OpenGL ES code.

30 Apr 2018

(macOS) On multi-GPU systems, selects the GPU that's already running the displays attached to the main computer (but ignores any externally attached removable GPUs). If the system switches to a different GPU, this app switches to that GPU as well.

(macOS) No longer calls [[NSNotificationCenter defaultCenter] removeObserver:self] because it's no longer necessary.

14 Apr 2018

(macOS) Main content view is now layer-backed. When going fullscreen, avoids macOS 10.13.4 bug.

13 Feb 2018

(iOS) Inserted KeepSoundPlayerAwake() to avoid remaining hesitation, when no sound had been played for 3 seconds.

5.7.2 24 Oct 2017

(iOS) Reorganized sound effects playback to avoid unwanted hesitations in animations.

19 Oct 2017

In 2D Tic-Tac-Toe on Klein bottle, draws glide reflection axes on top of cell boundaries (not underneath, which was hiding one of the axes).

16 Oct 2017

(iOS) Shows status bar on iPhone X, to accommodate the notch. (Tested only on simulator, not on real device.)

27 Sep 2017

CPU code consistently uses "double" (rather than "float") for essentially everything except colors.

5.7.1 10 Jun 2017

(macOS) PlayTheSound() plays sounds on the main thread only.

5.7 16 May 2017

(iOS, macOS) Ported all games to Metal, with fallback to OpenGL ES on older devices.

Lots of local improvements and cleaning up.

4 Apr 2017

(iOS) Modified touch-handling code to no longer delay delivery of "ordinary" touches while waiting to see whether a gesture recognizer recognizes a gesture or not. Also remove an old kludge that had been needed to work around an iOS bug to allow hand-over-hand dragging with two fingers.

(macOS)Removed the flag itsMouseIsDown, which was part of an old kludge that had been needed to work around a macOS bug, that a view could receive mouseMoved events without an initial mouseDown event. Apple fixed that bug in 10.9.5 (or maybe even in 10.8).

As I've worked on the graphics over the past couple months, I've cleaned up a lot of other cruft, but haven't bothered to write it all down here.

4 Mar 2017

(Mac) Modified touch-handling code to allow hand-over-hand dragging with two fingers.

30 Jan 2016

Replaced old Jigsaw images with higher resolution images, of better quality.

(Mac) For good performance, downsamples 2048×2048 Jigsaw images to 1024×1024 when running on iPhone, but keeps 2048×2048 images on iPad because they look better. [Later changed that to provide 1024×1024 for all iOS devices and 2048×2048 only for macOS.]

6 Dec 2016

(Mac) Mac version is now Metal-only. Reason: The Mac OpenGL version of the Geometry Games uses an older approach that would have been very time-consuming to rewrite using a CAOpenGLLayer to bring it into line with iOS OpenGL, iOS Metal and Mac Metal versions. It hardly seemed worth investing that much time into OpenGL code that would soon get phased out anyhow. In any case, users of older Macs will always be able to download an older, OpenGL-compatible version of each app.

(Mac) Given that the Mac version is now Metal-only, it now requires macOS 10.12 or later. Reason: macOS 10.12 is the only version I can test the apps on, and I prefer not to release an app for earlier versions of the operating system, on which it's never been tested.

30 Nov 2016

Created a single project document with targets for iOS and macOS.

Created that single project document from scratch, to get rid of years of legacy cruft.

Retired the Android code.

24 Aug 2016

(iOS) Torus Games is now "device-assignable" for easy installation on school iPads via MDM.

3 Jul 2016

In German, replaced Grundquadrat/Kachelung with Einfach/Vielfach, as Christof and Andrea Weber recommended.

5.6.2 19 May 2016

(Win) Added touchscreen-compatible version for use on Windows 10 touchscreen devices.

17 May 2016

(Mac) Added its2DPreviousClickWasDoubleClickEligible so that clicking to enter Torus Cursor Mode, and then immediately clicking again to make a move, won't get interpreted as a double-click intended to exit Torus Cursor Mode.

17 May 2016

(Win) Added instructions for 3D Maze (previously displayed on iOS, Android and Mac).

15 May 2016

Separated OpenGL(ES)-specific data and code from graphics-system-independent data and code, in preparation for a migration from OpenGL(ES) to Metal on iOS and Mac (and maybe eventually to Vulkan on Android and to DX12 on Windows).

5.6.1 5 Apr 2016

(Android) Disabled COMPILE_ANDROID_FOR_GLES2, so app now requires OpenGL ES 3 on Android.

5.6 12 Jan 2016

(iOS) Updated for iOS 8/9. Extensive internal changes.

30 Dec 2015

(iOS, Android) Added Tiling View.

(all) Animated transitions among ViewDomain, ViewSmall and ViewTiling.

5.5 17 Nov 2015

(Mac) Updated code for Mac OS X 10.10, replacing all deprecated method calls. Requires OpenGL 3.3.

12 Nov 2015

(iOS, Mac) Converted memory management from Manual Retain-Release (MRR) to Automatic Reference Counting (ARC).

16 Oct 2015

When the user uses the Language menu to change to Japanese or Chinese, Torus Games displays a message saying that one must change the iOS system language as well to display UniHan characters correctly.

28 Sep 2015

(iOS) Updated to require iOS 6. Removed -viewDidUnload and -shouldAutorotateToInterfaceOrientation.

26 Jun 2015

(Android) Replaced constant ATTRIBUTE_3D_NORMAL with per-vertex ATTRIBUTE_3D_NORMAL for the normal vectors (0,0,-1) in TorusGames3DDisk.c and TorusGames3DRect.c, to work around a driver bug in Android 4.3 and earlier that caused unreliable behavior with constant vertex attributes. That bug seems to be fixed in Android 4.4, but it's OK to leave the per-vertex normal vectors in place indefinitely.

23 Jan 2015

(iOS) Switched to view controller based status bar management, for consistent behavior (and flexibility) on iOS 7 and up.

20 Jan 2015

(Android) Finished migrating functionality to shared GeometryGamesApplication.java and GeometryGamesUtilities.java. Packaged shared C code into single library with app-specific C code.

12 Jan 2015

(Android) Starting migrating functionality to shared GeometryGamesApplication.java and GeometryGamesUtilities.java (but problems with packaging multiple shared libraries prevented me from sharing C code along with the Java code).

12 Jan 2015

Moved MIDI and WAV playback to shared code.

(iOS) Caches sounds based on file name, not arbitrary index.

5.4.1 25 Aug 2014

For Japanese, left-aligns Word Search list so that characters align vertically.

25 Aug 2014

(Win) For Japanese, replaced "MS UI Gothic" with "MS Gothic" where appropriate.

23 Aug 2014

(Win) Removed second Crossword Clue field, which is no longer needed.

22 Aug 2014

(iOS) Minor changes for 64-bit iOS compatibility.

22 Aug 2014

Replaced signed char and unsigned char with int8_t or uint8_t in cases where they hold generic integers (not characters).

22 Aug 2014

Further migration to Char16.

21 Aug 2014

Replaced numerical unicode characters (for example "0x3042 /* あ */") with direct C11-supported literal representations (for example u'あ' )

21 Aug 2014

Expanded visibility of OpenGL headers, so the ModelData can refer to OpenGL objects as GLuint instead of "unsigned int", thus improving clarity and avoiding integer conversion warnings.

20 Aug 2014

Replaced L"…" → u"…" and L'·' → u'·'. The L syntax required -fshort-wchar to get 16-bit wide characters and generated copious warnings in Android, while the u syntax is part of the C11 standard.

19 Aug 2014

Completed deferred maintenance of Windows version (accommodated changes from last 15 months when I had no Windows computer).

13 Feb 2014

(iOS) New hanzi entry code that works correctly on all iOS versions and with all IMEs (pinyin, handwriting, stroke, etc.)

(iOS) itsMessageView uses an 18pt font instead of a 21pt font on iPhones.

11 Feb 2014

(iOS) Additional changes to accommodate iOS 7: shows transparent status bar on iPad, translucent toolbar overlaps matte view, provides a full set of new launch images.

5.4 25 Jan 2014

(iOS) Changes to accommodate iOS 7: hides status bar even on iPad (because on iOS 7 it's transparent and overlaps the content area), suppresses text labels for toolbar buttons on iPhone/iPod Touch (because iOS 7 ignores them anyhow), uses light-colored toolbar even on iPhone/iPod Touch (with text labels gone, the dark bar is no longer needed), adds titles to various choosers even on iPad (on iOS 7 the panels look weird without them), adjusts chooser heights for iOS 7 on iPad, new launch images, icons at 120×120 and 152×152.

25 Jan 2014

First Android release.

20 Jan 2014

Fixed hit radius in Mazes, to allow complicated mazes even on small displays.

20 Jan 2014

(iOS) Offers levels of difficulty even on iPhones and iPod Touches.

22 Dec 2013

Uses itsAccumulated3DDragMotion[] on all platforms (no longer only Mac OS X) to guarantee an accurate choice of the 3D scrolling direction and of the 3D Maze slider's initial direction.

18 Dec 2013

(Mac) Calls -performSelectorOnMainThread:withObject:waitUntilDone: to modify itsMessageView on main thread.

16 Dec 2013

Handles localized text as UTF-16 instead of UTF-8.

6 Dec 2013

(Mac) The 2D games now accept two-finger trackpad gestures to scroll the board, if the mouse is already in torus cursor mode.

6 Dec 2013

(iOS) The 2D games now accept two-finger gestures to scroll the board.

25 Nov 2013

Converted remaining "constant" vertex attributes to uniforms, to work around bugs in Android's handling of the former.

22 Nov 2013

Converted shaders for 3D games from "atrColor" to "uniColor" to keep total number of vertex attributes at most 8, which is the minimum number of vertex attribute locations that OpenGL ES guarantees. (All iOS devices provide 16 vertex attribute locations, even though OpenGL ES doesn't require it.)

5.3.1 16 May 2013

(Win) Improved font quality (especially East Asian) on Windows Vista and newer.

5.3 9 May 2013

First version requiring OpenGL 3.2 or OpenGL ES 2.0.

5.2 2 May 2013

Last version compatible with OpenGL 2.

5.1 1 May 2013

Added Chinese (simplified and traditional), thanks to Yanqing Zou.

24 Apr 2013

(Win) Moved much functionality from individual applications to shared code.

(Win) Simplified implementation of various features. Removed cruft.

5.0.1 27 Mar 2013

Added Finnish, thanks to Jouko Koskinen.

22 Mar 2013

(iOS) Moved much functionality from individual applications to shared code.

8 Mar 2013

(Mac) Moved much functionality from individual applications to shared code.

5 Mar 2013

Replaced platform-specific language lists with a single language list in app's common code. Simplified language menu handling.

Moved endonyms and Win32 LANGIDs to Geometry Games shared code.

28 Feb 2013

(iOS, Mac) Updated Objective-C syntax to use @{}, @[], @() and @autorelease.

5.0.0 22 Dec 2012

Merged 2D Torus Games and 3D Torus Games into a single application.

21 Nov 2012

(iOS, Mac) Re-organized instance variables, moving them from .h to .m files (@interface to @implementation) as allowed by the “new” Objective-C runtime.

4.6.7 2 Oct 2012

(Win) To avoid bugs in Intel Integrated Graphics drivers, ignores VAO extension and directs all OpenGL 2 users (on Windows) to the legacy version of the program.

Simplified extensions handling.

26 Aug 2012

Merged vertex shaders using #ifdef.

28 Jun 2012

Portuguese menus, crosswords, word search puzzles and help pages revised to conform to the Acordo Ortográfico of 1990, which went into effect in 2009.

4.6.6 16 Jun 2012

(iOS) Submitted new iOS binary to allow addition of Greek and Vietnamese app store pages.

16 Jun 2012

Fixed bug: TorusGamesWebViewController clears itsWebView's delegate in -dealloc as well as in -viewDidUnload.

15 Jun 2012

Lots of minor formatting changes.

Some minor programming changes too, like replacing a 4x4 view matrix (cruft from fixed-function days) with a single 4-element vector.

13 Jun 2012

High-resolution Help and Thanks graphics.

12 Jun 2012

(Mac) imageAsBitmapImageRepOfSize rescales images larger than 1024×1024 when running with OpenGL 2 (on older computers), but leaves the requested size unchanged when running with OpenGL 3 (on mid-aged or newer computers).

4.6.5 3 Feb 2012

(Mac) imageAsBitmapImageRepOfSize no longer rejects sizes greater than 1024×1024, but instead rescales the image.

3 Feb 2012

(Win) The application as a whole is now willing to use the OpenGL 2 FBO extension for Copy/Save. However, to ensure that all users get correct basic functionality, it calls glGenerateMipmap only on OpenGL 3.3 or higher. On OpenGL 3.2 or earlier it falls back to glTexParameteri(…, GL_GENERATE_MIPMAP, …) to avoid buggy glGenerateMipmap implementations.

25 Jan 2012

(iOS) Created a shared GeometryGamesViewiOS class to reduce code duplication among different apps.

4.6.4 20 Jan 2012

Added Greek, thanks to Stavros Papadopoulos.

4.6.3 20 Jan 2012

First version to require Vertex Array Objects.

4.6.2 20 Jan 2012

Last version to run without Vertex Array Objects.

18 Jan 2012

Disentangled Vertex Array Object (VAO) code from Vertex Buffer Object (VBO) code.

12 Jan 2012

If hot cell is empty, '\b' deletes the preceding character.

16 Dec 2011

(Mac) Created an opaque ModelData typedef and move much more functionality into the GeometryGamesView class to reduce code duplication among different applications.

5 Dec 2011

(Mac) Created a shared GeometryGamesView class to reduce code duplication among different applications.

4.6.1 18 Nov 2011

(Mac) The ModelData is now packaged as an Objective-C object. The WindowController sees the ModelData and the View. The View sees the ModelData. This design goes against Apple's advice to let the Controller mediate between the Model and the View (as illustrated by the 2-way arrows in the figure at developer.apple.com/technologies/mac/cocoa.html ), but ultimately achieves much cleaner code. As an added bonus, the pointers WindowController→ModelData, WindowController→View and View→ModelData all point in a consistent direction (no cycles), so they may all be strong (retained) references. There's no longer any need for weak (non-retained) references.

(Mac) The Mac OS 10.6 style fullscreen mode would switch the first responder to the WindowController, regardless of what it had been previously. Now that Mac OS 10.7 provides a far cleaner fullscreen mode (and I've eliminated the 10.6 fullscreen mode entirely), the first responder is the View, not the WindowController. The View now handles all keystroke and mouse activity, while the WindowController handles the menus.

4.6 4 Oct 2011

Added Korean, thanks to Hyun-Jong Song.

Added Gomoku game. Hyun-Jong Song said that few East Asian students are familiar with Western Tic-Tac-Toe, but they're all familiar with Gomoku.

(iOS) Split OpenGL ES 1 version off into separate app ("Torus Games Classic") so that the current app ("Torus Games") may move forward without the legacy baggage.

Assorted tidying up (Mac version's message view font scales to view width, gPlaySounds is now persistent, etc. etc. etc.).

4.5.1 28 Jul 2011

(Mac) Uses OpenGL 3.2 on Mac OS 10.7.

(Mac) Mac OS 10.7 fullscreen mode support.

(Mac) Assorted small changes for Mac OS 10.7 compatibility.

2 Jun 2011

(Mac) Pauses animation when hidden (⌘H).

31 May 2011

(iOS) Reorganized project.

(iOS) New project document uses Xcode 4.

4.5 20 May 2011

Public release of accumulated changes.

April & May

Lots of small improvements and maintenance, which I got bored of recording in the revision histories. Includes improvements to support older, buggier OpenGL drivers as well as newer ones.

28 Mar 2011

(Mac) Rewrote user interface, replacing old single-class based architecture with simpler and more logical AppDelegate/WindowController/View architecture.

(Mac) Replaced old drawer-based message panels with a fixed KaleidoTile-style control panel.

(Mac) Replaced groups of related menu command handlers with single tag-based handlers.

(Mac) Added fullscreen mode.

15 Mar 2011

Replaced each occurrence of

L'x'

with

0xNNNN /* x */

where 0xNNNN is the hex representation of the unicode character x.

Exceptions: most ASCII characters were left unmodified.

14 Mar 2011

(Win) GeometryGames-Win32-LoadEntryPoints.c loads entry points based on OpenGL version and available extensions.

28 Feb 2011

Moved SetUpOneShader() to shared code, and simplified parameter handling.

24 Feb 2011

Replaced application-wide texture settings (for mipmapping, anisotropic filtering, etc.) with per-texture settings. The finer control lays the foundation for iOS versions of the software, where trilinear mipmapping and anisotropic filtering are computationally more expensive.

Moved SetUpOneTexture() to shared code.

22 Feb 2011

Replaced "Textures - Fullsize" and "Textures - Halfsize" with a single "Textures" collection, because

  1. the new version of the Torus Games will no longer support PowerVR MBX devices (iPhone 1G/2G/3G, iPod Touch 1G/2G), which were the only iOS devices whose memory was so limited that halfsize images were important,
  2. except for the iPhone 3GS and iPod Touch 3G, all PowerVR SGX devices are either iPads or iPhones/iPod Touches with retina displays, which all require fullsize images, and
  3. a unified set of textures will make it easier to for all the Geometry Games to use a single shared texture-loading function.

21 Feb 2011

Removed OpaqueFont mechanism.

20 Feb 2011

(Mac, iOS) For rendering text into OpenGL textures, replaced deprecated ATSUI functions with new Core Text functions. Merged Mac OS and iOS versions.

Replaced application-specific SetAlphaTextureFromCharacter() with shared SetAlphaTextureFromString().

16 Feb 2011

Removed OpenGL ES 1 support.

Saved a copy of the OpenGL ES 1 capable version in Sites/Archives. Plan to submit it to the App Store as "Torus Games MBX", for the benefit of people with PowerVR MBX hardware.

15 Feb 2011

Having Copy/Save Image read the back/front buffer was a bit dicey, so Copy/Save Image now draws into an offscreen buffer instead. The new system has the flexibility to draw the image at any size, not necessarily the view size, even though there's still no user interface to set a custom size.

11 Feb 2011

Extension checking moved to shared Geometry Games utilities.

28 Jan 2011

Eliminates ResizeGLView().

9 Jan 2011

When resetting game, also resets the victory flash flag, so that, for example, the crossword puzzle doesn't get struck in green.

4 Jan 2011

Pool balls over pocket decelerate in proportion to speed, so fast balls slow down a lot, while slow balls don't risk grinding to a halt.

4.4
(iOS only)
17 Dec 2010

(iOS) User interface completely rewritten. Simpler. Provides appropriate layouts and features for iPad as well as for iPhone and iPod Touch.

29 Nov 2010

(iOS) Recognizes flicks.

22 Nov 2010

(iOS) Gave iOS Torus Games access to high-resolution jigsaw puzzle textures, and also to the full range of puzzle pictures from the desktop version.

22 Nov 2010

Removed floating point computations (including divisions and floor() calls) from MakeJigsawImage() for greater efficiency on iOS devices.

Removed integer divisions from MakeJigsawImage() for greater efficiency on iOS devices (which do integer division in software).

Puzzle refresh time on iPad dropped from ~3sec to ~1sec. Whew!

16 Nov 2010

Added GetTextureFolderName() to support runtime resolution choice on iPad/iPhone/iPhone-retina.

12 Nov 2010

Replaced version-based runtime choices with extension-based runtime choices.

9 Nov 2010

Uses shared Geometry Games utilities.

4 Nov 2010

(iOS) iOS 4.1's OpenGL drivers claim VAO's are available for OpenGL ES 1.1 as well as OpenGL ES 2.0. In reality they work fine under OpenGL ES 2.0 but fail to draw the first frame under OpenGL ES 1.1. Therefore the Torus Games doesn't use VAO's under OpenGL ES 1.1.

3 Nov 2010

(iOS) Persistent option for sound effects to be AlwaysOn, OffDuringMusic or AlwaysOff.

2 Nov 2010

(iOS) Coexists with background music.

7 Jul 2010

VAO usage now controlled by extension availability instead of version number. This allows greater VAO usage, but more importantly it simplifies the code by eliminating lots of #ifdef/#else/#endif blocks.

4 Jun 2010

Removed multisampling-related code. Torus Games never uses multisampling. (If desired it could easily be enabled at compile-time.)

3 Jun 2010

(Mac) Minor changes:

  • Saved NIB file as XIB file.
  • XIB file declares main view as subclass of NSOpenGLView instead of subclass of NSView, which lets us set the pixel format in Interface Builder, and also affects what initializer get called.
  • Removed hack from reshape method (no longer needed).
  • Removed windowWillMiniaturize method (the hack it contained is no longer needed).
30 May 2010

(Mac) Includes copy of gl3.h bundled with source code.

4.3.2 7 May 2010

Corrected error in Spanish language file.

4.3.1 6 May 2010

(Win) Corrected "Save As" function to repaint window before saving image.

4.3 22 Apr 2010

Revised drawing code OpenGL 2.0 → OpenGL 3.0. Desktop version now compiles against the forward-compatible gl3.h instead of the backward-compatible gl.h.

Removed fixed-function code (OpenGL 1.x) from desktop version, but left it (OpenGL ES 1.1) in mobile version. When I eventually drop support for first and second generation iPhones and iPod Touches, I can remove all fixed-function code.

4.2.2
OpenGL 1
archive
6 Apr 2010

The problem, for which the 4.2.1 release provided a temporary fix, was that even with glBufferData(...,GL_DYNAMIC_DRAW), the call to glBufferSubData() was fast on some hardware but ridiculously slow on others. The solution was to rewrite the graphics to use fixed vertex buffer objects, and pass "attributes" to the shader to set each object's final position and texture coordinates.

4.2.1 31 Mar 2010

On some Nvidia GPUs (but not on my iMac's AMD GPU) the Torus Games ran extremely slowly, down 0.2 frames/second in Apples at Extra Hard. The problem seemed to be the glBufferSubData() call. As a temporary workaround, the sprite code now suppresses the Vertex Buffer Objects and uses client-side arrays instead. I have an idea for a more satisfactory long-term solution, but I wanted to post an immediate fix so people won't be downloading a ridiculously slow program.

4.2 30 Mar 2010

Torus Games 4.2 release.

23 Mar 2010

Added German documentation and improved German menus, thanks to Frank Lutz.

23 Mar 2010

Added "Wraparound Universe" page to explain the underlying mathematics.

19 Mar 2010

Added welcome panel that lets user select initial game. This corrects flaw for Japanese users, that Pool had been the default game, even though it's unfamiliar to most Japanese people.

26 Feb 2010

Completed German crosswords, with help from Christina Laternser.

26 Feb 2010

(iPhone) Added OpenGL ES 2.0 support.

25 Feb 2010

(iPhone) Rewrote user interface to make it easier to use (thanks to Adam Weeks Marano for suggestions).

(iPhone) Replaced crossword puzzle's scrolling keystrip with more intuitive fixed keyboard.

19 Feb 2010

Reorganized Help system.

Made game selection persistent.

5 Feb 2010

Moved graphics from client-side vertex arrays to Vertex Array Objects (VAO) and Vertex Buffer Objects (VBO), both of which are mandatory in forward-compatible OpenGL 3.0.

14 Jan 2010

Moved all colors from plain (r,g,b,α) to premultiplied (αr, αg, αb, α) for correct transparency and mipmap generation.

4.1 20 Dec 2009

Reorganized drawing code to use programmable vertex and fragment shaders (OpenGL 2.0) instead of old-style fixed function pipeline (OpenGL 1.5). New code uses generic vertex attributes for forward compatibility with OpenGL 3.2.

20 Dec 2009

Added Dutch, thanks to Jacobien Carstens.

12 Dec 2009

Reorganized graphics so that all drawing takes place in a single function, DrawTriangleStrip().

9 Dec 2009

Replaced ViewSmall implementation. The old implementation used user-defined clip planes, which ATI hardware does not support (if you write to gl_ClipVertex, the official documented behavior is a fallback to software rendering). The new implementation restricts the viewport instead. Window resizing code now enforces square multiple-of-three view dimensions, so the middle 1/9 can be drawn to without fractional pixel errors.

5 Dec 2009

Reorganized texture management.

26 Oct 2009

(Win) Simplified loading of Open GL entry points.

8 Oct 2009

Made each chess level go one recursion step deeper, but suppressed Extra Hard because it would still be too slow.

20 Sep 2009

(Mac) Migrated NSString literals with UTF-8 to newer, simpler format.

20 Sep 2009

Rewrote menu translation code for Mac OS 10.6 compatibility.

4.0 3 Aug 2009

iPhone version added.

24 Jul 2009

Added Teachers' Notes.

1 Jul 2009

Offset Tic-Tac-Toe grid by one half square to make the topological connections more obvious.

Added auto-advance feature to Crossword to remedy a common user mistake.

30 Jun 2009

Fixed minor bug in Klein bottle Jigsaw that sometimes caused a clump of pieces to drag the wrong way.

Jun 2009

New Pool interface for compatibility with iPod Touch (and it's better than the old interface on desktop computers too).

Jun 2009

New algorithms to prepare and draw jigsaw puzzle pieces avoid multitexturing and realize a 6-fold speed increase on iPod Touch.

28 May 2009

Improved user interface for Crossword.

16 May 2009

Moved responsibility for requesting a display redraw from platform-dependent code to platform-independent code.

Constructs Jigsaw's Klein double image and alpha masks from disk file rather than from OpenGL texture, for OpenGL ES compatibility.

Other minor changes for OpenGL ES compatibility.

4 May 2009

Minor maintenance on Win32 user interface.

Added undocumented keyboard commands 'f' and 's' to toggle frame rate display and sync to monitor.

12 Mar 2009

Reorganized drawing code to eliminate glBegin()/glEnd() and display lists, which are deprecated in desktop OpenGL and completely unsupported in OpenGL ES.

11 Feb 2009

Added self-hiding scroll bar to Word Search panel to accommodate word lists longer than the panel height (Mac OS X).

Simplified internal communication with panels. (Mac OS X).

10 Feb 2009

Simplified default language initialization on Mac OS X, eliminating LanguageCode.strings files.

3.0.7 8 Jan 2009

Added Russian, thanks to Alexey and Kseniya Pronin.

17 Oct 2008

Avoids calling ErrorMessage() when the OpenGL context is active.

3.0.6 16 Oct 2008

Added keyboard navigation to Crossword puzzles, using arrow keys ← → ↑ ↓ .

8 Oct 2008

Provides a clear explanation if the application gets separated from its supporting files.

4 Sep 2008

Re-organized internationalization paradigm so that

  • for each language, a single platform-independent file contains all localized strings and
  • the Windows version no longer needs separate .rc and .dll files for each language
  • (the Mac OS X version was already relieved of its language-specific NIB files at the previous revision).

3.0.5 15 Jul 2008

Re-organized internationalization paradigm on Mac OS X, to avoid multiple copies of the NIB file and to allow real-time language switching.

Added Japanese, thanks to Tatsu Takeuchi.

3.0.4 13 Oct 2007

Added Portuguese, thanks to Atractor.

Minor cosmetic changes, for example not correcting accents in Crossword until the puzzle is complete.

3.0.3 1 Sep 2007

Added Vietnamese, thanks to Nguyễn Văn Tân.

Offset Crossword grids by one half square to make the topological connections more obvious.

Wrote automatic Crossword puzzle generator to facilitate addition of new languages.

Created new crossword puzzles that

  • respect the half-square offset (aesthetic in torus, essential in Klein bottle)
  • avoid odd verb forms in French, Italian and Spanish
  • follow a consistent set of pleasantly symmetrical grids.

3.0.2 8 May 2007

(Win) Added Copy Image and Save Image… that work correctly with multisampling.

Offset Maze and Apples grids by one half square to make the topological connections more obvious.

Implemented game-specific display lists to simplify rendering of Apples.

3.0.1 5 Apr 2007

Added technical FAQs to website.

(Mac) Modified image copying code to accommodate Mac OS 10.3.9.

(Win) Revised error messages to refer to technical FAQ.

Fixed bug: When computer plans its shot in Klein bottle pool, it now handles the flip correctly.

3.0.0 6 Mar 2007

Mac OS X version added.

Extensive internal re-organization to isolate platform-independent code from UI.

Extensive internal re-organization so that the chess program can think, the pool balls can roll, etc. all under the control of the main event loop, so nothing blocks the game. Thus for example you can quit the chess program while the computer is thinking, unlike in the previous version.

Adapted for 1-button mouse, to accommodate Macs.

2.0.1 19 Jan 2007

Added Spanish, thanks to Cristóbal Camarero and Maria de la Paz Álvarez-Scherer.

2.0.0 18 Jan 2006

Initial Torus Games 2.0 release.