mscroggs.co.uk
mscroggs.co.uk

subscribe

# Blog

## Archive

Show me a Random Blog Post
▼ show ▼
2016-12-23

## Video Game Surfaces

In many early arcade games, the size of the playable area was limited by the size of the screen. To make this area seem larger, or to make gameplay more interesting, many games used wraparound; allowing the player to leave one side of the screen and return on another. In Pac-Man, for example, the player could leave the left of the screen along the arrow shown and return on the right, or vice versa.
Pac-Man's apparent teleportation from one side of the screen to the other may seem like magic, but it is more easily explained by the shape of Pac-Man's world being a cylinder.
Rather than jumping or teleporting from one side to the other, Pac-Man simply travels round the cylinder.
Bubble Bobble was first released in 1986 and features two dragons, Bub and Bob, who are tasked with rescuing their girlfriends by trapping 100 levels worth of monsters inside bubbles. In these levels, the dragons and monsters may leave the bottom of the screen to return at the top. Just like in Pac-Man, Bub and Bob live on the surface of a cylinder, but this time it's horizontal not vertical.
A very large number of arcade games use left-right or top-bottom wrapping and have the same cylindrical shape as Pac-Man or Bubble Bobble. In Asteroids, both left-right and top-bottom wrapping are used.
The ships and asteroids in Asteroids live on the surface of a torus, or doughnut: a cylinder around to make its two ends meet up.
There is, however, a problem with the torus show here. In Asteroids, the ship will take amount of time to get from the left of the screen to the right however high or low on the screen it is. But the ship can get around the inside of the torus shown faster than it can around the outside, as the inside is shorter. This is because the screen of play is completely flat, while the inside and outside halves of the torus are curved.
It is impossible to make a flat torus in three-dimensional space, but it is possible to make one in four-dimensional space. Therefore, while Asteroids seems to be a simple two-dimensional game, it is actually taking place on a four-dimensional surface.
Wrapping doesn't only appear in arcade games. Many games in the excellent Final Fantasy series use wrapping on the world maps, as shown here on the Final Fantasy VIII map.
Just like in Asteroids, this wrapping means that Squall & co. carry out their adventure on the surface of a four-dimensional flat torus. The game designers, however, seem to not have realised this, as shown in this screenshot including a spherical (!) map.
Due to the curvature of a sphere, lines that start off parallel eventually meet. This makes it impossible to map nicely between a flat surface to a sphere (this is why so many different map projections exist), and heavily complicates the task of making a game with a truly spherical map. So I'll let the Final Fantasy VIII game designers off. Especially since the rest of the game is such incredible fun.
It is sad, however, that there are no games (at leat that I know of) that make use of the great variety of different wrapping rules available. By only slightly adjusting the wrapping rules used in the games in this post, it is possible to make games on a variety of other surfaces, such a Klein bottles or Möbius strips as shown below.

If you know of any games make use of these surfaces, let me know in the comments below!

### Similar Posts

Comments in green were written by me. Comments in blue were not written by me.
2016-12-25
HyperRogue also has special modes which experiment with other geometries (spherical, and elliptic which is non-orientable). Hydra Slayer has Mobius strip and Klein bottle levels.
Zeno Rogue
2016-12-24
HyperRogue is an example of a game that takes place on the hyperbolic plane. Rather than looping, the map is infinite.

See: http://zenorogue.blogspot.com.au/2012/03/hyperbolic-geometry-in-hyperbolic-rogue.html
maetl
2016-12-24
Hyperrogue may be the only game in existence with a hyperbolic surface topology: http://www.roguetemple.com/z/hyper/
zaratustra
2016-12-24
F-Zero GX had a track called Mobius Ring, that was... well, a Möbius ring.

F-Zero X had a more trivial track that was just the outward side of a regular ring, but it was rather weird too, because it meant that this was a looping track that had no turns.
Olaf
2016-12-24
I don't know about video-games but there are puzzles by Jeff Weeks (http://www.geometrygames.org/) on torus.
gaurish

To prove you are not a spam bot, please type "kao" backwards in the box below (case sensitive):
2016-12-20

## Christmas Card 2016

Last week, I posted about the Christmas card I designed on the Chalkdust blog.
The card looks boring at first glance, but contains 12 puzzles. Converting the answers to base 3, writing them in the boxes on the front, then colouring the 1s green and 2s red will reveal a Christmassy picture.
If you want to try the card yourself, you can download this pdf. Alternatively, you can find the puzzles below and type the answers in the boxes. The answers will be automatically converted to base 3 and coloured...
 # Answer (base 10) Answer (base 3) 1 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 0
1. The square number larger than 1 whose square root is equal to the sum of its digits.
2. The smallest square number whose factors add up to a different square number.
3. The largest number that cannot be written in the form $$23n+17m$$, where $$n$$ and $$m$$ are positive integers (or 0).
4. Write down a three-digit number whose digits are decreasing. Write down the reverse of this number and find the difference. Add this difference to its reverse. What is the result?
5. The number of numbers between 0 and 10,000,000 that do not contain the digits 0, 1, 2, 3, 4, 5 or 6.
6. The lowest common multiple of 57 and 249.
7. The sum of all the odd numbers between 0 and 66.
8. One less than four times the 40th triangle number.
9. The number of factors of the number $$2^{756}$$×$$3^{12}$$.
10. In a book with 13,204 pages, what do the page numbers of the middle two pages add up to?
11. The number of off-diagonal elements in a 27×27 matrix.
12. The largest number, $$k$$, such that $$27k/(27+k)$$ is an integer.

### Similar Posts

Comments in green were written by me. Comments in blue were not written by me.
2016-12-20
Thank you for the prompt response! It makes sense now and perhaps I should have read a little closer!
Dan Whitman
2016-12-20
Find the difference between the original number and the reverse of the original. Call this difference $$a$$. Next add $$a$$ to the reverse of $$a$$...
Matthew
2016-12-20
In number 4 what are we to take the difference between? Do you mean the difference between the original number and its reverse? If so when you add the difference back to the reverse you simply get the original number, which is ambiguous. I am not sure what you are asking us to do here.
Dan Whitman

To prove you are not a spam bot, please type "yrev" backwards in the box below (case sensitive):
2016-11-27

## Christmas (2016) is Coming!

This year, the front page of mscroggs.co.uk will feature an advent calendar, just like last year. Behind each door, there will be a puzzle with a three digit solution. The solution to each day's puzzle forms part of a murder mystery logic puzzle in which you have to work out the murderer, motive, location and weapon used: the answer to each of these murder facts is a digit from 1 to 9 (eg. The murderer could be 6, the motive 9, etc.).
As you solve the puzzles, your answers will be stored in a cookie. Behind the door on Christmas Day, there will be a form allowing you to submit your answers. The winner will be randomly chosen from all those who submit the correct answer on Christmas Day. Runners up will then be chosen from those who submit the correct answer on Christmas Day, then those who submit the correct answer on Boxing Day, then the next day, and so on. As the winners will be chosen randomly, there is no need to get up at 5am on Christmas Day this year!
The winner will win this array of prizes:
I will be adding to the pile of prizes throughout December. Runners up will get a subset of the prizes. The winner and runners up will also win an mscroggs.co.uk 2016 winners medal:
To win a prize, you must submit your entry before the end of 2016. Only one entry will be accepted per person. Once ten correct entries have been submitted, I will add a note here and below the calendar. If you have any questions, ask them in the comments below or on Twitter.
So once December is here, get solving! Good luck and have a very merry Christmas!
Edit: added picture of this year's medals.
Edit: more than ten correct entries have been submitted, list of prize winners can be found here. You can still submit your answers but the only prize left is glory.

### Similar Posts

Comments in green were written by me. Comments in blue were not written by me.
2016-12-27
Ten correct submissions have been made. Just updating the pages to reflect this...
Matthew
2016-12-27
Have 10 correct submissions not been made yet?
Another Matthew
2016-12-25
Thank you, Matthew!
Lyra
2016-12-25
Really enjoyed the extra bit at the end this year! Looking forward to 2017's calendar.
Louis
2016-12-25
I'll email you if you are one of the winners to get the rest of your address!
Matthew

To prove you are not a spam bot, please type "z" then "e" then "b" then "r" then "a" in the box below (case sensitive):
2016-10-08

During my EMF talk this year, I spoke about @mathslogicbot, my Twitter bot that is working its way through the tautologies in propositional calculus. My talk included my conjecture that the number of tautologies of length $$n$$ is an increasing sequence (except when $$n=8$$). After my talk, Henry Segerman suggested that I also look at the number of contradictions of length $$n$$ to look for insights.
A contradiction is the opposite of a tautology: it is a formula that is False for every assignment of truth values to the variables. For example, here are a few contradictions:
$$\neg(a\leftrightarrow a)$$ $$\neg(a\rightarrow a)$$ $$(\neg a\wedge a)$$ $$(\neg a\leftrightarrow a)$$
The first eleven terms of the sequence whose $$n$$th term is the number of contradictions of length $$n$$ are:
$$0, 0, 0, 0, 0, 6, 2, 20, 6, 127, 154$$
This sequence is A277275 on OEIS. A list of contractions can be found here.
For the same reasons as the sequence of tautologies, I would expect this sequence to be increasing. Surprisingly, it is not increasing for small values of $$n$$, but I again conjecture that it is increasing after a certain point.

### Properties of the Sequences

There are some properties of the two sequences that we can show. Let $$a(n)$$ be the number of tautolgies of length $$n$$ and let $$b(n)$$ be the number of contradictions of length $$n$$.
First, the number of tautologies and contradictions, $$a(n)+b(n)$$, (A277276) is an increasing sequence. This is due to the facts that $$a(n+1)\geq b(n)$$ and $$b(n+1)\geq a(n)$$, as every tautology of length $$n$$ becomes a contraction of length $$n+1$$ by appending a $$\neg$$ to be start and vice versa.
This implies that for each $$n$$, at most one of $$a$$ and $$b$$ can be decreasing at $$n$$, as if both were decreasing, then $$a+b$$ would be decreasing. Sadly, this doesn't seem to give us a way to prove the conjectures, but it is a small amount of progress towards them.

### Similar Posts

Comments in green were written by me. Comments in blue were not written by me.

To prove you are not a spam bot, please type "fan" in the box below (case sensitive):
2016-10-06

## Palindromic Dates

Thanks to Marc, I noticed that today's date is a palindrome in two different date formats—DMMYY (61016) and DMMYYYY (6102016).
This made me wonder when there will be another date that is palindromic in multiple date formats, so I wrote a Python script to find out.
Turns out there's not too long to wait: 10 July 2017 will be palindromic in two date formats (MDDYY and MDDYYYY). But before that, there's 1 July 2017, which is palindromic in three date formats (YYMMD, YYMD and MDYY). Most exciting of all, however, is 2 February 2020, which is palindromic in 7 different formats!
The next palindromic dates are shown in the following table. It will update as the dates pass.
 $$n$$ Next day with $$\geq n$$ palindromic formats Formats 1 1 July 2017 YYMMD,YYMD,MDYY 2 1 July 2017 YYMMD,YYMD,MDYY 3 1 July 2017 YYMMD,YYMD,MDYY 4 2 February 2020 YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY 5 2 February 2020 YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY 6 2 February 2020 YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY 7 2 February 2020 YYYYMMDD,DDMMYYYY,MMDDYYYY,YYYYMDD,YYMDD,DDMYY,MMDYY
A full list of future palindromic dates can be found here.