Page 1 of 1

Hamurabi.bas.lua

Posted: Sat Mar 09, 2013 1:26 am
by Inny
For kicks, I ported an old Basic game to Lua. While it's not a Love game, specifically, I figured that some may get a moment of frustration out of it and was worth sharing here.

Hamurabi is a city management game, played in 10 rounds, where you decide how much land to buy and sell, how much food to give your people, and how much grain to plant for the next harvest. If you starve too many people, the game abruptly ends. After 10 rounds, you get scored according to how many people starved, and how much land the city owns.

Link: https://gist.github.com/inmatarian/5121902

Protip: Plagues are apparently a good thing, the original game rules don't factor in that number of deaths against your final scores.
Here was the version I ported: http://vintage-basic.net/bcg/hammurabi.bas

Re: Hamurabi.bas.lua

Posted: Wed Mar 13, 2013 1:04 am
by Lafolie
Hahaha, my first turn:

Code: Select all

HOW MANY ACRES DO YOU WISH TO BUY? 10
HOW MANY BUSHELS DO YOU WISH TO FEED YOUR PEOPLE? 100
HOW MANY ACRES DO YOU WISH TO PLANT WITH SEED? 200
YOU STARVED 95 PEOPLE IN ONE YEAR!!!
DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY
BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE
ALSO BEEN DECLARED NATIONAL FINK!!!!


PLAY AGAIN? 
This is very cool though. I've thought about making a text-based game before, I like the way this one works.

Re: Hamurabi.bas.lua

Posted: Wed Mar 13, 2013 5:34 am
by scutheotaku
Haha nice work!

Now we just need a LOVE version of DONKEY.BAS!

Re: Hamurabi.bas.lua

Posted: Wed Mar 13, 2013 11:44 pm
by Inny
Lafolie wrote:YOU STARVED 95 PEOPLE IN ONE YEAR!!!
You totally need to feed your people more than that :P

Yeah, I'm on this kick right now where I'm seeking out old basic games to have a peek at the source code. It'd be totally cool to see a few ports of these games to Lua/Love.