I’m new to java programming and I would like to work on some kind of game engine / lib. Just as a hobby project / experiment. I would like to make some sort of library with classes and utility functions to be able to re-use some generic game code and then a seperate application where I would build the actual game.
I am using intelliJ as an IDE. I was wondering if I could use, change and test a library with an application at the same time and how I would do this?
There are two aspects here. The technical: How does it work? The organisational: Is it a good idea?
The technical is quite easy. You just create different projects. The application project depends on the library project. Libraries are packaged as jars typically. Easiest would be to use a tool that supports you with dependencies and different versions of the library. I would recommend Maven for this.
The second question is harder and probably belongs to https://softwareengineering.stackexchange.com/ as it is more of a philosophical kind and no definitive answer exists. In my point of view it is a bad idea to develop a library and a product at the same time. Specificals of your product will slip into the library, you will get problems with priorities.
That is, when you are developing a library that should be used or published independently of your application. Modularisation of an application is another cup of tea, but could be done with the same tools. With Maven you would setup a multi module project then.