Live data from Hacker News

How Pizza Tycoon simulated traffic on a 25 MHz CPU

pizzalegacy.nl

21–30 of 67 posts

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#21
post #4

My high school girlfriend and I played this game all the time; trying to build the pizzas to get the best score was always super frustrating. It always felt like I could be a single pixel off and get a really low score, but I loved building my "empire"

> My high school girlfriend and I played this game all the time; trying to build the pizzas to get the best score was always super frustrating. It always felt like I could be a single pixel off Pizza Tycoon was one of those games we got years later for £5 in some repackaged "Classic Games" collection but it came without a booklet or anything. Supposedly the booklet was the key to getting the pizzas right as it had al…

The thing about the anti-piracy is true, at least in the original version (I don't know about re-releases).

The way it worked was you had to offer at least a few pizzas that were reasonably close to recipes from the booklet in order to get any customers. Once you had that, you could get creative with custom recipes but if you only did custom recipes, you were bound to fail.

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#23
Great! I'll finally be able to buy all commerce spots in Berlin (cheapest city) to avoid any competition, and _then_ open a restaurant.

I used to deal only with "ice cream" (illegal weapons) trading, buying in one city and selling them on another, to quickly earn lots of money, and then buying commercial spots but never opening them (too much hassle, having to micro-manage shops).

But after having bought about 200 or so, the game would inevitably crash a few weeks after my save file, so in the end I stopped playing it. I never got the exact details about the bug, but I hope this remake won't have it!

Besides that, the most fun thing was trying weird pizza recipes and seeing that the taste algorithm was a bit weird. I could put lots of chicken, or pineapple, and mix a few ingredients, and have some age groups rate them very highly.

But sabotaging the competition was still funnier than handling a normal business.

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#25

Great! I'll finally be able to buy all commerce spots in Berlin (cheapest city) to avoid any competition, and _then_ open a restaurant. I used to deal only with "ice cream" (illegal weapons) trading, buying in one city and selling them on another, to quickly earn lots of money, and then buying commercial spots but never opening them (too much hassle, having to micro-manage shops). But after having bought about 200 or…

I'm writing the engine from scratch (not re-creating the original engine) so it definitely won't have the original bug. Of course I'll have my own bugs but at least its open source now so it's fixable by more people :D

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#26
post #24

I see some cars disappearing edit: actually if it hits an end of a road, it spawns to a lane next to it either goes opposite direction or turns (referencing first gif) Wonder if they could have considered ensuring no cars stack on top of each other

There are some rules where in their collision detection they basically don't check; for example cars going east will never intersect with cars going south so just drive through them. I'm not sure if this was an optimisation to just speed up collision detection by checking fewer cases or they were trying to prevent too many traffic jams by having better collision detection. Probably a bit of both :)

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#27
Fascinating how constraint breeds elegance. 25 MHz forces you to find O(1) or O(log n) solutions where modern devs would reach for O(n²) and more hardware.

Same principle applies to on-chain computation: gas costs force you to find closed-form solutions. For example, computing φⁿ (golden ratio to the power n) naively requires n multiplications. Using the matrix identity [[1,1],[1,0]]^n via repeated squaring gives you O(log n) — and the Fibonacci numbers fall out for free. The old game devs would have appreciated EVM constraints.

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#28
post #4

My high school girlfriend and I played this game all the time; trying to build the pizzas to get the best score was always super frustrating. It always felt like I could be a single pixel off and get a really low score, but I loved building my "empire"

> My high school girlfriend and I played this game all the time; trying to build the pizzas to get the best score was always super frustrating. It always felt like I could be a single pixel off Pizza Tycoon was one of those games we got years later for £5 in some repackaged "Classic Games" collection but it came without a booklet or anything. Supposedly the booklet was the key to getting the pizzas right as it had al…

When I was a kid I manually made it through the cliffs of logic in KingsQuest VI by trial and error and taking notes for days, before I realized the answer was in the book. Almost did the same thing for translating hieroglyphics the Dagger of Amon Ra, but I remembered what happened before and went to check.

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#29
By making the roads single-direction and roads owning the movement, I think it’s been made equivalent to a conveyer belt… which means factorio’s conveyor belt optimizations might be relevant.

Eg storing the delta between items rather than tracking position directly, because the distance between cars is static for the length of the road, except during compression, insertion or removal of a car

https://www.factorio.com/blog/post/fff-176

Re: How Pizza Tycoon simulated traffic on a 25 MHz CPU

#30

Earlier quoted context omitted.

> My high school girlfriend and I played this game all the time; trying to build the pizzas to get the best score was always super frustrating. It always felt like I could be a single pixel off Pizza Tycoon was one of those games we got years later for £5 in some repackaged "Classic Games" collection but it came without a booklet or anything. Supposedly the booklet was the key to getting the pizzas right as it had al…

The thing about the anti-piracy is true, at least in the original version (I don't know about re-releases). The way it worked was you had to offer at least a few pizzas that were reasonably close to recipes from the booklet in order to get any customers. Once you had that, you could get creative with custom recipes but if you only did custom recipes, you were bound to fail.

To be fair, I suspect real life is a bit like that too - there will be a big enough % of potential customers who want one of "the classics" for where you are (margherita etc in Italy, pepperoni etc in the UK, whatever) that basically every place that serves pizza will have the same first few options even if they get creative with the rest of the menu.
Post reply on HN