New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Understand how game works #896
Comments
Esentially, you're asking about the overall game structure, I think. As for the TH files, we don't use any code from them, just the graphics and some data files are used. |
@Alberth289346 Many thanks for the reply. I understand things like game loop. Essentially I want to build a game. I wanted to avoid using any engine and build one from scratch. I was going through some open source projects, I found the CorsixTH code easiest to understand (also TH used to be one of my all time favorite games) . I am having a hard time understanding how are the levels defined for CorsixTH. The .level file seems to contain some information but how is the data for level 1 and the flow different from that of the level 2. Is this mentioned in code or is it somehow rendered by the system generically from the config files? |
A better place to discuss game programming in general is at a game programming forum like gamedev.net . If you want to program CorsixTH, just start, the code is right here in this project, it's usually easiest if you hang out in the #corsix-th IRC channel, where you can discuss things. You can also use the google newsgroup if you like. Some lua developers just communicate through issues here, but that is complicated, as issues are not really a discussion medium. In the game loop, some code is running along that performs, eg emergencies, or earthquakes. When the level file is loaded, that code is set up to let those events happen at the time defined by the level file. If the level file does not contain eg emergencies, the 'emergency event' code is set up to never trigger. |
Went through the code...after your comment...Got a better idea...Will try to take up some beginner level work, so that I can contribute more. Many thanks for the replies. |
This is a noob question. I will be extremely grateful if someone explains this though or simply points to doc.
I understand CorsixTH has a C++ and LUA part. C++ contains the core engine, whereas Lua contains the game logic. I want to know how does the LUA code parse a level? Lets say I create a .level file. Now the .level file seems to me to contain what are the things that should be created. How is the game flow determined? Which files in the actual TH are needed to do so?
The text was updated successfully, but these errors were encountered: