Jump to content
  • entries
    944
  • comments
    5,899
  • views
    929,465

Organizing the New Engine


Josh

1,587 views

 Share

The addition of our plugin system makes the engine feel different. There is a stronger distinction between core and non-essential functionality. I removed a lot of third-party libraries from the project and am just focusing on graphics, physics, pathfinding, and other features that are core to the functioning of your game. Things like file importers terrain generation, etc. can be stored away in self-contained optional plugins, or can be part of the editor project, and do not need to reside in the base engine.

I feel like this satisfies both my desire for the core engine to be as focused and streamlined as possible, and for the end user's desire to have infinity features.

I also feel like I want the engine to be as small and "in the background" as possible. I removed the superfluous print statements like "initializing engine blah blah blah..." so that only the useful info gets printed. Your game's log file is not a place I need to advertise my engine. Additionally, I am trying to simplify the game directory as much as possible with as few files as possible.

Here is the only printed output when a program is run:

Running script "Scripts/Start/Autoload/FITextureLoader.lua"
Loading plugin "Plugins/FITextureLoader.dll"...
Running script "Scripts/Start/LoadPackages.lua"
Running script "Scripts/Start/System/ComponentSystem.lua"
Running script "Scripts/Start/System/Error.lua"
Running script "Scripts/Animation.lua"
Loading shader family "Shaders/PBR.json"...
Loading model "Models/Crawler/crawler.mdl"
Loading material "Models/Crawler/crawler.mat"...
Loading texture "Models/Crawler/crawler.tex"...
Loading texture "Models/Crawler/crawlerdot3.tex"...
Loading texture "Models/Crawler/crawler_spec.tex"...
Loading shader family "Shaders/Blinn-Phong.json"...
Loading material "Models/Crawler/crawler_eyeball.mat"...
Loading texture "Models/Crawler/d_eyeball.tex"...
Loading texture "Models/Crawler/crawler_eyeballdot3.tex"...

I got rid of the "Config" folder. Shader families should be placed in the "Shaders" directory (although they can be stored anywhere) and languages can be kept in a "Localization" folder, if you use them.

The shaders folder is now organized with some sanity.

Untitled.png.2c0bd4f9c3313825d7977bf9abc9d47b.png

Materials, languages, and shader familiy JSON files all need to have a root object that indicates the type of asset they are:

{
	"material":
	{
		"color": [ 1, 1, 1, 1 ],
		"emission": [ 0, 0, 0 ],
		"metallic": 0.75,
		"roughness": 0.5,
		"baseTexture": {
			"file": "./wall_01_D.tex"
		},
		"normalTexture": {
			"file": "./wall_01_N.tex"
		}   
	}
}

The "Scripts/Start" directory will now be executed recursively at program start. I hid the required scripts away in a sub-folder called "System" so hopefully no one will delete them.

I have renamed the "Bank" and "BankStream" classes to "Buffer" and "BufferStream". The old class names were a holdover from the days of BlitzMax.

Finally, with UPX I got the size of the release EXE and required DLLs down to 3.5 megabytes.

The whole thing should feel small, efficient, and quick to start. The opposite of bloated.

  • Like 3
 Share

1 Comment


Recommended Comments

The small footprint is one of the many reasons why I really like Leadwerks. 

Really happy to see you still going forward with this approach, while making it more flexible. 

  • Like 3
Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...