{"id":18853168,"url":"https://github.com/luxedo/hamurabi-almost-from-scratch","last_synced_at":"2025-10-25T12:45:04.366Z","repository":{"id":97348976,"uuid":"73026327","full_name":"luxedo/hamurabi-almost-from-scratch","owner":"luxedo","description":"This is an attempt of making the game Hamurabi using modern programming languages","archived":false,"fork":false,"pushed_at":"2018-12-19T12:32:40.000Z","size":929,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T04:43:07.840Z","etag":null,"topics":["console-game","game","game-development","hackathon","hamurabi","javascript-game","old-games"],"latest_commit_sha":null,"homepage":"https://luxedo.github.io/hamurabi-almost-from-scratch/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luxedo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-06T23:40:50.000Z","updated_at":"2018-12-19T12:32:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"97af0785-4ffc-4000-9b4a-4eff282033ed","html_url":"https://github.com/luxedo/hamurabi-almost-from-scratch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/luxedo/hamurabi-almost-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fhamurabi-almost-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fhamurabi-almost-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fhamurabi-almost-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fhamurabi-almost-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxedo","download_url":"https://codeload.github.com/luxedo/hamurabi-almost-from-scratch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxedo%2Fhamurabi-almost-from-scratch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260927441,"owners_count":23084012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console-game","game","game-development","hackathon","hamurabi","javascript-game","old-games"],"created_at":"2024-11-08T03:43:09.249Z","updated_at":"2025-10-25T12:44:59.321Z","avatar_url":"https://github.com/luxedo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HAMURABI ALMOST FROM SCRATCH\nThis is an attempt of making the game [Hamurabi](https://en.wikipedia.org/wiki/Hamurabi) using modern programming languages. The idea is to time the development and track the progress and the time it took to get in each stage in this document. If possible I want to finish this project in under 12 h.\n\nHamurabi is one of the first electronic games, arguably the first strategy game.\nThe game is set in Babylon, where the player is the ancient king [Hamurabi](https://en.wikipedia.org/wiki/Hammurabi) and must control the resources to feed the people and purchase land for a period of ten game rounds.\n\nThe game is based in html5/canvas, CSS and ES6 javascript.\n\n#### Check it out [here](https://luxedo.github.io/hamurabi-almost-from-scratch/)\n\n## Goals\n* ~~Add `LICENSE.md` and `README.md`~~\n* ~~Host somewhere~~\n* ~~Copy [PONG](https://luxedo.github.io/pong-almost-from-scratch/) project base~~\n* ~~Create drawing/writting functions~~\n* ~~Research and add all the text of the game~~\n* ~~Create the user input mechanics~~\n* ~~Create the end round logic~~\n* ~~Create game over conditions~~\n* ~~Improve webpage~~\n* ~~Finished!~~\n\n## Progress reports\n00:00 - START! This project has really started at November 6th, 2016 at 21:30 (BRT). I'm timing each step and will be placing the timestamp along with the achieved goal.\n\n## 00:15 - Copied files from PONG project and hosted the page\nWell, since I already made a reproduction of the game PONG, I'll be using it as a base for this project. Then I created a repository at GitHub to host the game with gh-pages.\n\n## 01:25 - Create drawing/writting functions\nI'm not really in the mood of remakinkg the old terminal fonts by hands drawing squares on screen. I already did that in [PONG](https://luxedo.github.io/pong-almost-from-scratch/) and also a vector font in [spacewar](https://luxedo.github.io/spacewar-almost-from-scratch/). Instead I've found a copy of a font for the [VT320](https://en.wikipedia.org/wiki/VT320) terminal in google fonts.\n\n![VT320](report-assets/DEC-VT320-0a.jpg \"VT320\")\n\nThe text drawing function gets a text as input and prints it on screen. If the text is larger than `61` characters, the functions splits it into more lines. So far, the game looks like this:\n![hello world](report-assets/hello-world.png \"hello world\")\n\n## 08:00 - All the rest\nSince there was not much action in this game, I've spent this time\njust grinding with code, messing with strings and creating decision trees.\nNot much fun, but it's done (for now).\n\nI think that the most interesting part was to do some archaeology and read the original source code in BASIC. There I found some constants and text that would be harder to find just by playing the game. So thanks to http://atariarchives.org/.\n\n![source](http://atariarchives.org/basicgames/pages/page79.gif \"source codez\")\n\nI also read an [assignment](https://www.cis.upenn.edu/~matuszek/cit591-2010/Assignments/06-hammurabi.html) for the CIT 591 class of the [University of Pensylvania](http://www.upenn.edu/). It was some useful info too.\n\nThe game ended up like this:\n![final](report-assets/final.jpg \"final\")\n\nAs far as I tested there were no bugs, but only throwing it into the wild we'll find tem. So I'll be patching once if there's enough feedback.\n\nThat's it for now.\n#### Bye\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxedo%2Fhamurabi-almost-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxedo%2Fhamurabi-almost-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxedo%2Fhamurabi-almost-from-scratch/lists"}