25 May 2019

Writing code

History / Edit / PDF / EPUB / BIB / 1 min read (~59 words)
  • Make sure you understand what you have to implement
  • Make it work
  • Write a test for what you implemented
  • Refactor the code for reusability/code standard
  • Verify that your code passes linting and tests
  • Commit your code on a branch
  • Push to the central repository
  • Verify that CI passes
  • Create pull request
  • Annotate code to explain intent of changes
25 May 2019

Working in a software company

History / Edit / PDF / EPUB / BIB / 1 min read (~48 words)
  • Always prioritize your work
  • Always work on something that is a task in a task tracking system
    • You should always be able to tell someone else what task you are working on and link them to that task
  • Always provide an agenda when you book meetings with others
25 May 2019

Software project basics

History / Edit / PDF / EPUB / BIB / 1 min read (~107 words)
  • Code changes are stored in git
  • Setup continuous integration
  • Have a testing framework
  • Use dependency management
  • Define a code standard
  • Prefer function/method typing over dynamic types
  • On every push to git
    • Code quality check
    • Code style check
    • Unit/functional/integration/system tests
      • Code coverage should be recorded during tests and a report made available
  • A project repository must have a README.md explaining how to run the project on your own computer
  • A project repository must have a RELEASING.md explaining how to release the code
  • Responsibilities are made explicit in terms of roles
  • Critical roles, such as project lead, must have a backup/shadow individual
29 Dec 2018

Starcraft

History / Edit / PDF / EPUB / BIB / 1 min read (~60 words)
games

Authentication/Login server
Per game server

  • compute damage simulation
  • in game chat
  • decide game victory
  • returns end game stats for ui (or done client side?)
    Game client
  • display game ui
  • play animations
  • send commands to game server
    Local backend
  • record game
  • compute game simulation
  • communicate game state to game client
29 Dec 2018

Factorio

History / Edit / PDF / EPUB / BIB / 1 min read (~136 words)
games

An initial seed is computed and stored in the game save file
Based on this seed, the world is pseudo randomly computed, using a certain chunk/block/tile size (e.g., 32x32, 128x128)
The world map is only generated on-demand, that is, as far as the player can see
When a new chunk is discovered, its blocks are computed and persisted in the save file
If there are no active components in a chunk that is not visible, the game will obviously not render it, it will only simulate it (position, item, velocity, etc)
Certain thing, for instance alien types and alien base size, may only be computed once they are observed. At first, maybe only a location anchor will exist to indicate where they should spawn, but the rest will be generated only when needed.