Jump to page content

Lecture Battleships


Lecture Battleships (LBShips for short) is a two-player implementation of the classic game of battleships, written in OPL for the Psion Revo. Two players share a single palmtop, taking turns with it to make their move. It does not use infra-red or Internet access.

The name comes from the fact that it was intended for playing in lectures during the final year of my degree course, as well as because I programmed it during dull Java lectures instead of paying attention! Being a real program intended for a real purpose, along with beginning my exploration of serious Psion development, made it all the more real to me than academia.

While work on it is not quite completed, it is still fully playable. The main issue that remains unresolved is with dragging ships during fleet set-up; this is because initiating a drag causes the ship to jump such that its top-left square is under the pointer, regardless of which segment you dragged from. Note that you are not required to drag ships but you may still find rough edges in the fleet set-up system; the game itself works fine as far as I am aware. The source code is of course far from perfect, being my first proper OPL application, as well as my first program with an event loop.

While written specifically for the Psion Revo and the Diamond Mako, the game should also run on any other EPOC machine, although it will still be Revo-sized and the toolbar might look weird. Larger screen support is left as a reader exercise for masochists.

Thanks to interest by Martin Guthrie of Pscience5, as of now it has an official distribution UID from Symbian and is packaged as a SIS file. Woo. And I am declaring it all public domain. Have fun.



Yes, I know the ships look crap :)

The source project, sat peacefully in my RAM drive.

The code open in the OPL editor.

A player’s fleet being assembled.

The game commences.

It didn’t take long to finish that ship off.

After making your move, the screen goes blank so that you can pass the palmtop to your opponent without either player seeing the other player’s ships.

OK, so when I play against myself I can cheat…

A game in progress.

Game over man, game over! Note that both fleet grids are revealed so the loser can see the whereabouts of any unsunk ships.