Hi all… I was just wondering if anyone knows the best way to combine main files and games files into one game file.
You could just copy the second file’s content into the first.
If you are asking about the intricacies of combining the code of two functional units into one to form a unit of cohesive code - that is a very deep subject and would be easier knowing more about the code in question.
Can you post your files?
You could just copy the second file’s content into the first.
If you are asking about the intricacies of combining the code of two functional units into one to form a unit of cohesive code - that is a very deep subject and would be easier knowing more about the code in question.
Can you post your files?
Hi,
I too have similar problem. I have a business app and a game app. I like to alter the business app so that once I press the sub menu option it will go into the game. However, 2 of them are having main.lua, config.lua, etc. In this way, how am I going to combine these 2 together? Kindly will someone please help? Thanks!
I’m not sure why you want to do this. The config.lua must be a separate file from main.lua. If you want to do a new project, why not create a new folder and use the operating system to copy the files from one project to the other, then start changing the files in the new project to behave the way you want.
If you’re talking about taking a game.lua and main.lua and building one really big main.lua, this is probably a decision you will regret further into the project. My first game was one big main.lua and it’s near impossible to make any changes too. Modularizing your code is considered a best practice where combining modules into a super file is not.
Rob
Hi Rob,
thanks for replying. The reason why is because the business app and game app are from 2 different sources. Now I want to insert the game into this business app. As I’m very green to corona, I’m now having a hard time doing so.
Hi,
I too have similar problem. I have a business app and a game app. I like to alter the business app so that once I press the sub menu option it will go into the game. However, 2 of them are having main.lua, config.lua, etc. In this way, how am I going to combine these 2 together? Kindly will someone please help? Thanks!
I’m not sure why you want to do this. The config.lua must be a separate file from main.lua. If you want to do a new project, why not create a new folder and use the operating system to copy the files from one project to the other, then start changing the files in the new project to behave the way you want.
If you’re talking about taking a game.lua and main.lua and building one really big main.lua, this is probably a decision you will regret further into the project. My first game was one big main.lua and it’s near impossible to make any changes too. Modularizing your code is considered a best practice where combining modules into a super file is not.
Rob
Hi Rob,
thanks for replying. The reason why is because the business app and game app are from 2 different sources. Now I want to insert the game into this business app. As I’m very green to corona, I’m now having a hard time doing so.