Skip to content

Instantly share code, notes, and snippets.

@g-pechorin
Created March 7, 2023 09:13
Show Gist options
  • Save g-pechorin/819616c920c6512b52afc93c0a648f4b to your computer and use it in GitHub Desktop.
Save g-pechorin/819616c920c6512b52afc93c0a648f4b to your computer and use it in GitHub Desktop.

two paths for assets; baked and runtime

... actually ... bakes is just runtime ... but ... anyway

flowchart LR
	png[.png image]
	obj[.obj model]

	assimp(assimp or whatever)

	baked[.cog baked asset]
	gltf[.gltf model]

	png_run[.png image]
	gltf_run[.gltf model]
	stb(stb image)
	syoyo(tiny gltf)

	runtime{runtime loaders}

	subgraph tool time
		png --> assimp
		obj --> assimp
		gltf --> assimp
		assimp --> baked
	end

	pak[hexen pak files]
	esb[morrowind folder]

	ret_hex(retro hexen loader)
	ret_esb(retro morrowind loader)

	subgraph live loaders

		gltf_run --> syoyo
		png_run --> stb

		pak --> ret_hex
		esb --> ret_esb
	end

	cog(.cog loader)
	baked --> cog

	ret_hex --> runtime
	ret_esb --> runtime
	syoyo --> runtime
	cog --> runtime
	stb --> runtime

... okay, so .cog is just some dumb database with data ready to be slapped into the graphics api

baking homogenizes the format so that life can be simple

fine

there's a builtin .cog loader (probably per platform if i ever get that far)

the headache will be assets that rely on other assets; new levels using retro art

so ... maybe this pattern won't be restricted to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment