It looks like you're using an Ad Blocker.
Please white-list or disable AboveTopSecret.com in your ad-blocking tool.
Some features of ATS will be disabled while you continue to use an ad-blocker.
originally posted by: DeReK DaRkLy
This is not for a school project or anything important, I'm just an amateur video game hobbyist. So here's the deal...
I'm trying to design a top-down view of a city (think Grand Theft Auto 1) and I want to connect road pieces based on randomly generated road maps.
I only need the roads to connect at right angles, so they will only be going in the 4 cardinal directions.
In order for my program to know which piece (curves, straights, intersections, etc) to attach to its neighbor, I need to assign one of 4 identifying numbers - one for a neighboring piece of road to the North, one for South, one for East and one for West.
However, in order for this to work, no 2 totals (ranging fom 2 to four digits) can repeat against another total.
For example 10, 20, 30 and 40 don't work because 10+40 as well as 20+30 both equal 50.
So what are 4 magical digits that won't give repeating totals?
Any takers? =)