Giter Club home page Giter Club logo

of-all-trades's Introduction

Of All Trades gameplay screenshot.

Play the game

Of All Trades

Of All Trades

Of all trades is a game made for the 2023 JSK13 competition and is about information sharing in the 13th century. Today we don't think about how easy and ubiquitous skill sharing is due books, internet, etc. The game's goal was to focus on how difficult it would have been to find an apprentice under trade masters at the time.

Instructions

Click on the isometric image to move around. When your character is over the next tradesperson in your apprenticeship list you automatically learn that skill. Some skills let you traverse different terrains. When you complete the entire list and meet the lord of the lands you win the game. There are 25 fiefdoms in a grid and each fiefdom is 200 x 200 blocks. Trades people will be out wandering the countryside but generally you will find them in settlements (homesteads, farms, villages, towns, and the main city).

Technical

This was a rushed job and could use more TLC but I’m happy with what I accomplished. The most interesting technical parts include:

Creating a large map that is 1000 X 1000 blocks (used to be 3 times that but was too big to be fun) without using perlin noise. To make the map I generate a hidden SVG with 100s of various shaped path elements. Then I blur them and add the svg image to a canvas element. When I need a 200 x 200 grid of blocks for one of the fiefdoms I just get the pixels in that chunk of the canvas and use the color value (0-255) to determine elevation. This was less code than having a perlin noise library and has the advantage of storing the terrian in an image instead of memory. Ideally I would have skipped using the SVG and instead just blurred canvas elements but canvas blurring wasn’t supported on iOS safari. This doubled the size of my mapmaking code.

For images I take UTF8 emoji and print them to a canvas I then go through pixel by pixel and replace the colors with the nearest color in a chosen color palette. The goal is to make them look more like old pixel art than current day emoji. The images are then stored as base64 in an array and used when needed.

Another interesting thing about the game is that the isometric game area is just an SVG because, why not.

TODO

If I had more time I would:

  • Clean up the code quite a bit
  • Add a map of the fiefdom the player is currently in
  • Add music
  • Add more distinct features in the terrain
  • Fix the bug where on very rare occasions the game freezes when changing fiefdoms

of-all-trades's People

Contributors

vivianeasley avatar

Watchers

 avatar

Forkers

js13kgames

of-all-trades's Issues

Game doesn't start

Hi, to elaborate on my feedback, the loading is infinite on Firefox Windows and ends up freezing the browser
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.