What project (assets) convention do you use?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
notcl4y
Citizen
Posts: 85
Joined: Fri Nov 25, 2022 12:23 pm

What project (assets) convention do you use?

Post by notcl4y »

I dunno how to explain that but here are some examples:

Code: Select all

game = {
	state = "",
	layout = "",
	sprites = {
		player = love.graphics.newImage("assets/player.png"),
		tile = love.graphics.newImage("assets/tile.png")
	}
}

Code: Select all

state = ""
assets = {
	tile = love.graphics.newImage("assets/tile.png")
}

Code: Select all

game = require("projectManagementLibrary")
game.setLayout("main")

Code: Select all

loves_lua = "not so",
wants_to = true
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: What project (assets) convention do you use?

Post by Andlac028 »

I kind of use all. I do not put everything into table, but group similar things into table (like everything for state, etc). If there would be a lot of things, I divide it into several files, for example one file has everything with states and manages everything when required (so then it looks like 3rd)
Post Reply

Who is online

Users browsing this forum: No registered users and 70 guests