Hey all!
So I'm working on a game with a group of people that would essentially be a compilation of mini games, a la wariorware, mario party, etc. We've been working on our mini games separately and I'm starting to piece them together.
The obvious issues is of course that there are now about 5 different games with 5 different main files and 5 different sets of love.load, love.update, and love.draw, a slew of paths to images that are now incorrect, and a dozen variables that mean three dozen different things for different games.
I was wondering if anyone had any experience with organizing dependencies like this, or knew of any trick in LÖVE that could help me out with merging these separate games, possibly local name spaces? Even if its a way or design pattern to design future mini games, that would be stellar.
Organizing a Collection of Mini Games?
- dizzykiwi3
- Citizen
- Posts: 58
- Joined: Tue Jan 14, 2014 2:03 am
Re: Organizing a Collection of Mini Games?
I'd use [manual]setfenv[/manual] for that. Maybe you could also overwrite the LÖVE loading functions in the safe environments, so you could have a folder for each minigame.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Organizing a Collection of Mini Games?
What about just having everyone design their games similarly (such as a state), then either use a state library to link them, or write a system.
Re: Organizing a Collection of Mini Games?
If your target platform is win/mac/linux, you could just have everyone send you their .love files and package each individually. If you use something like the [nullsoft installer](https://en.wikipedia.org/wiki/Nullsoft_ ... all_System), then pop out an icon for each game.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Organizing a Collection of Mini Games?
The love example loader has a system me and s-ol came up with that should be helpful. I haven't looked at it in awhile but if I remember correctly it would help with your issue.
Edit: This is the branch you would want to look at. If you look in the examples folder you would see that it contains separate love programs. You should be able to make it work for your purposes. https://github.com/love2d-community/LOV ... e/concepts
Edit: This is the branch you would want to look at. If you look in the examples folder you would see that it contains separate love programs. You should be able to make it work for your purposes. https://github.com/love2d-community/LOV ... e/concepts
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests