Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Can I use non-game-specific code that I’ve already written? While I was making one of my unreleased games, I made a non-game-specific file containing classes and functions for creating vectors and other useful things; just utilities that all the games I make share.

If you want to know the full list of utilities in this file (excluding ones I might add in the future), here’s a list:

  • A distance function that calculates the distance between two vectors
  • A function to create a vector from a list of numbers or an array of numbers
  • A class to store data about a shape (the vectors. the calculation operations, and the color)
  • A function to split a string by a delimiter
  • Functions to do math operations with vectors instead of single numbers

I can also show the code if you want.

If the code is 100% yours, yes you can

(1 edit)

Thanks for the reply.