## martes, 30 de junio de 2020

### Laberintos 8bit

Hubo harto ruido por el articulo que publico John Aycock sobre el algoritmo usado en Entombed de 2600

https://atariage.com/forums/topic/296385-atari-in-the-news-cool-bbc-article/

De todas formas hay entrevistas de DP anteriores:

http://www.digitpress.com/library/interviews/interview_paul_allen_newell.html

Por otro lado mencionan de 8bit :

http://atarihq.com/danb/Telengard.shtml

------

One of the interesting parts of Telengard is the way it generates the dungeon map. The dungeon in the game is very large, it has 50 level and each level is 200 by 200 rooms. The dungeon is also the same every time you play so you can map it out as you go along. This is achieved by using a pseudo-random algorithm to generate the map. This results in a map that is complex enough to be interesting, but not so complex that it's unplayable.
This is the formula that is used to determine the appearance of each room:
```XO = 1.6915 YO = 1.4278 ZO = 1.2462 q = x * XO + y * YO + z * ZO + x * YO + y * ZO + z * XO hi = q And &HFF q = x * y * ZO + y * z * XO + z * x * YO```
` If (q And 3) = 0 Then`
``` q = (q / 4) And &HF If q > 9 Then q = q - 9 hi = hi + q * 256 ```
` End If`
XO, YO and ZO are constants
z = dungeon level
x,y = room position in level
hi describes the room as follows:
bits 0,1: Upper wall: 0,1 = nothing, 2 = door, 3 = wall
bits 2,3: Left wall: 0,1 = nothing, 2 = door, 3 = wall
bits 8-11: If not 0 then there is something special in the room
1 = Inn
2 = Pit
3 = Teleporter
4 = Stairway
5 = Alter
6 = Fountain
7 = Cube
8 = Throne
9 = Box

To view the entire map I created a VB.NET map generator program. This program required the Microsoft .NET Framework 2.0:
Map Viewer - Executable and source