https://github.com/Elan456/viking-village-builder
- Invasion of London: Forkbeard's Call
Currently, the game is not packaged into an executable, so you will need to run it from the source code.
git clone https://github.com/Elan456/viking-village-builder.git
cd viking-village-builder
Visit the GitHub repository at viking-village-builder
- Click the green "Code" button on the top right of the repository
- Click "Download ZIP"
- Extract the ZIP to a folder
Note: You may need to install Python 3.8 or higher to run the game. You can download it from https://www.python.org/downloads/
python -m pip install -r requirements.txt
This should install pygame and e-pyquadtree.
e-pyquadtree is a quadtree data structure package written by me, check it out on GitHub: https://github.com/Elan456/pyquadtree
python main.py
Your village has been selected to aid in the invasion of London. By placing buildings and managing resources, you must build an army of 250 warriors and 10 ships by turn 100.
- Your village starts with a few buildings and a wall.
- You need to start accumulating basic resources: wood
, ore
, and food
to craft weapons
, warriors
, and ships
later
- Click and drag the lumberyard building from the right panel to an empty space within your walls.
- The ghost of the building will appear with a number indicating how many turns are left until it is built. The orange outline indicates that the building is currently being worked on.
- With more builder's huts, you can build more buildings at once.
- Click and drag the builder's hut from the right panel (hammer icon)
to an empty space within your walls.
The buildings which produce Aadvanced resources such as weapons, warriors, and ships can have their production boosted by other buildings.
- Click and drag a blacksmith building (axe icon) to an empty space within your walls.
- Notice the blue lines indicating which buildings boost the blacksmith's production.
- The boost amount is a multiplier on the base production rate of the blacksmith based on its proximity to the boosting buildings.
- "H" = Show Help Screen
- WASD / Arrow Keys / Middle-Click + Drag = Pan Camera
- Mouse for interacting with and placing buildings
- "N" to show the navigation mesh
- To win, you must have 250 warriors and 10 ships on turn 100.
Click + drag on a building from the far-right panel to an empty space within your walls.
If the construction fails, a message will appear in the center to tell you why.
Common reasons for construction failure are:
- Not enough resources
- Shipyard not along the river
- Outside of the wall
- Building overlaps with another building
In the bottom-left corner there is a button to advance to the next turn. This will trigger each building to produce and consume their respective resources. Construction projects will advance and you might get a random event.
You only get 100 turns till the end of the game to build your army and prepare for the invasion.
The panel in the top-left corner shows your current resources and how much you are producing and consuming. For the warriors and ships, a projection is shown to indicate how many you will have at the end of 100 turns assuming your current production rate stays the same. A resource will turn red if buildings are unable to produce because of a lack of that resource. This is a warning that you need to build more of that resource-producing building.
Production | Cost / Boost Buildings |
---|---|
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
Ethan Anderson (Elan456)
Written and composed by Love Springs
Font: Oldenburg-Regular.ttf by Nicole Fally
Hammer Icon: 32x32 RPG Weapons Icons by AntrixGlow98
Tree Assets: Nature Trees by Admurin
Fire Animation: Pixel Fire by Elska
Wood Icon: Pixel Art Wood by Frostwindz
Ore Icon: 96 Total 32x32 Pixel Art Icons Ores Minerals Crystals by Ancient-Inscriptions
Food Icon: 180 Total 32x32 Pixel Art Icons Food Fruit Veggies Meat Candy Bread Etc by Ancient-Inscriptions
Axe Icon: 32x32 RPG Weapons Icons by AntrixGlow98
Warrior Icon: Viking by Dreamir
Ship Icon: Pixel Art Viking Ship 16 Directions by Helianthus-Games
Medieval Building Assets: Medieval Fantasy RPG Tileset by Ventilatore
- Pygame for the game engine
- e-pyquadtree for the quadtree optimizations
- Tiled for the map editor
- GIMP for image editing
- Audacity for audio editing
- VS Code for code editing
- Fix draw order of war power and villagers
- Add an FPS counter
- Add a proper caption and icon to the window
- Fix the end game layers
- Add a builder's hut help hint
- Add icons to the README
- Add procedurally generated clouds that move
- Perlin noise background images
- Fix deprived resource detection
- Add a lore scroll
- Fix leaves dropping at the wrong times
- Change the river color to be more subtle
- Add more int casting to prevent random.randint errors
- Improve the paths / borders around the buildings
- Put the building's icon on it's asset in the main screen, so it's easier to see what it is
- Show the boost buildings when hovering over a building
- Add a help screen (press H)
- Add background music from Love Springs
- Make the main resource panel much larger
- Add red color when projection is less than the win condition
- Add construction phases to buildings (7)
- Move the resource panel to the top-left (2)
- Have the builders walk to construction sites (4)
- Add a builder assignment manager (7)
- Show how many turns are needed for a building to be completed to the hover panel (3)
- Add a button to upgrade the wall and show the cost to do so (3)
- Indicate buildings that are too expensive with a red rectangle (3)
- Add an "along river" check for shipyards (3)
- Improve the contrast of announcements (2)
- Have the background color change with the seasons (5)
- Add debris that float down the river and ripples to make the river more lively (5)
- Add trees that grow over time and the lumberjacks navigate to them (6)
- Advance the villagers by a few updates each turn to indicate the passage of time (4)
- Add building demolition, requires turns just like construction (4)
- Draw all the building assets (10)
- Fix some resource consumption and production bugs (3)
- Add a win condition prediction calculation, so the player knows if they are on track (5)
- Render boats on the river as more are built (3)
- Make the boats sway in the water (3)
- Render soldiers in a box as the army grows (4)
- Add a fire random event that destroys buildings (5)
- Add plague, caravan, and blight random events (5)
- Add descriptions to the buildings' hover panel (3)
- Improve the Linux resolution (2)
- Add a more stylized button (2)
- Add a start screen with a button to start the game (3)
- Add a win/lose screen with stats (2)
- Navmesh optimizations using an additional quadtree (5)
- Resource text changes color if it's over demanded (2)
- Building panel shows icons for the buildings instead of the building itself (2)
- Change disable, enable, and demolish buttons to be more stylied (2)
- Random event skeleton
- Buttons
- Main panel (turn and resource display)
- Building panel (To drag and place buildings from)
- Building collision and placement
- Fully animated villagers (Idle + Walking)
- Villager pathfinding using A* algorithm, navigation mesh, and quadtree optimizations
- Ability to disable buildings
- Button to demolish buildings
- Placeholder building assets
- Full set of resource assets
- Resource production and consumption per building
- Resource production prediction algorithm
- Arrow key + WASD camera panning
- Middle-click + drag camera panning
- Villager speech bubbles
- Building definition file as a JSON with parsing
- Wall around the village