BendBall 0.12

by on Aug.25, 2014, under BendBall

This replaces version 0.11b. The main visible changes here are tweaks to gameplay, and making the grabber function automatic.

Besides that, I’ve been working towards tidying up the code. I’ve done a bit to split code up and do some tidy-up so far; I’ve been writing comments noting these as I go, and as I find the time I’ll be making further improvements. Sources are always available to see in the BitBucket repository (see below).

Code Analysis and Future Plans

Functionality-wise, my immediate plans are to fix the main known issues. Particular priority to the “ball sinking” state, where deflector positions should be reset and the ball marker should not be displayed; and the collision resolution system, which should be made to better handle fast moving objects and three-way collisions between ball, wall and deflector.

It’s been interesting taking a look at code I wrote 4-5 years ago, when I I had much less experience with C++ (and no professional experience). A lot of the basic structure I think is fine, but I have found various aspects that I think could be better. I see three main problems:

  1. Duplication – there’s a lot of unnecessary duplication. In my experience, a “Don’t Repeat Yourself” philosophy really helps make code more maintainable and readable in the long run.
  2. God objects” – classes like FPGame and FPSettings are too big and cumbersome, and should be split up.
  3. High coupling with external libraries – OpenGL rendering specific code is placed within the game classes. Ideally I’d like to reduce this coupling as much as possible, by having one or a set of classes specific to external libraries like OpenGL and GLUT.

With my newer projects I’ve tried to have a wrapper class that governs an entity and a factory for making entities from configs or specifications, rather than having them created and kept loose on a main class. I’ve also had a separate class that governs setting up and performing the actual rendering of the game world, and would like to do the same for the main game init and loop. This would allow for keeping OpenGL/GLUT code separate.

Free time allowing, I would like to write up a common game framework using the above ideas. This could then be used for both BendBall, BattleForPolaris, and any future C++ game projects. I’ve been Die Evil Rocks project in Python, and once that structure is finalised I would like to draw up the design and port it back to my common C++ code.


  • Project code restructure, and bundled libraries.
  • Grabber use is now automatic, preventing players from just grabbing the ball during normal play.
  • Settings tweaks to improve gameplay; particularly physics and game field size.


BendBall 0.12 for Windows (.ZIP, 2.48 Megabytes)

BendBall Source (BitBucket Repository)

Leave a Comment more...

BendBall 0.11a

by on Sep.17, 2009, under BendBall

A minor update to BendBall, which may fix many of the glitches that appeared in 0.1a. More testing is needed to see if they’ve been completely eliminated, though.


  • Added the maximum speed requirement to the grab feature.
  • Tweaked physics settings to reduce the appearance of glitchy behaviour.


See latest version!

Leave a Comment more...

BendBall 0.1a

by on Sep.10, 2009, under BendBall

BendBall was my first 3D game project in C++. Its primary purpose was to help me teach myself OpenGL using GLUT, as well as the use of shaders with GLSL, and later on for writing my own physics engine. If you’ve played Pong, you’ll comprehend the basic gameplay – it’s 2 players (no AI yet), there is a ball and a paddle for each player, and each player’s objective is to get the ball past the other’s paddle. The twist is that it’s in 3D.

Planned Features

  • An AI-controlled player.
  • Progression of the game over time – e.g. arena spin speed and ball curve rate.
  • Tweaking of physics and game configurations for balance & playability
  • The “ball grabber” feature needs to be weakened so that it can’t just grab the ball all the time.

Known Bugs

  • The GLUT timer function is weird, or incorrectly set up, so performance may differ between machines.
  • The ball may pass through a paddle when moving too fast.
  • There is a crash bug that may be related to the above issue.
  • The depth marker for the ball may return when the ball is destroyed
  • The ball bounces incorrectly when it is “rolling” on a surface.


Click for full-sized versions.

Battle for Polaris 0.1a Screen 2 BendBall 0.1a Screen 3


BendBall 0.1a Demo Gameplay Video (1:37, WMV, 34.6 Megabytes) – A demonstration of a sample game in the preliminary alpha version


See latest version!

Leave a Comment more...