Members - Reputation: 146
Posted 22 September 2012 - 11:31 PM
I don't even know where to begin. Is this project too complicated for a beginner? Should I pick something simpler, like tic-tac-toe?
Members - Reputation: 2103
Posted 23 September 2012 - 12:08 AM
Just start with a random position, put one tile there (without connections).
for number_of_tiles_to_set do
find random position beside on an empty spot beside an already set tile
connect both tiles
Members - Reputation: 231
Posted 23 September 2012 - 02:01 AM
Put that power node on the map.
Make a random path walker that starts on that node. Make a if or switch to move him in a direction put a wire there and a chance to rotate that wire. repeat this X times and put a computer at the end of the path.
Then start that again from the power node X times.
Of course you don't want to cross, or even have adjacent tiles to your previous (or current) paths so you have to check if the way is free.
Look up random/procedural map generation. It should yield many different methods on making things random.
Current Project: TechnoFlux read all about it on my
Members - Reputation: 1006
Posted 02 October 2012 - 03:41 AM
- Start with an empty board.
- Randomly place the power node.
- Randomly pick a maximum path length.
- Randomly pick a filled cell.
- Do a random walk from that cell up to the max path length, not allowing any collisions.
- Place the computer at the end of the walk.
- Go back to 3 as many times as required.
- EDIT: Fill the remaining empty cells with random wires.
Edited by jefferytitan, 02 October 2012 - 03:43 AM.