TR4SHD4T4 Posted September 27, 2020 Share Posted September 27, 2020 I have no code as an example because I don't want to frustrate myself doing things that can't be done. My question is... can I make my original .BAS file essentially a build file for the type of game I want to play. For Instance: I can have a 1 player game, if it is a one player game a variety of "artificial intellects", or a two player game If One Player easy then INCLUDE "oneplayereasy.bas" If One Player Hard then INCLUDE "oneplayerhard.bas" If Twoplaye then INCLUDE "TwoPlayer.bas" In this way, I can have the main file build a game without excessive code that is specific to that execution of the program. *shrugs* Quote Link to comment Share on other sites More sharing options...
intvnut Posted September 27, 2020 Share Posted September 27, 2020 One trick I've used with AS1600 is to abuse the "include path" to point it to different directories to get different build configurations. You could do something similar with IntyBASIC's library_path argument. Make a directory for each of your game configurations, e.g. cfg_1up_easy, cfg_1up_hard, cfg_2up. Copy intybasic_prologue.asm and intybasic_epilogue.asm into all of them, since it appears IntyBASIC only searches one directory. (Someone correct me if that's not true.) Add a .bas file in each that holds the configuration-specific details. (Note: This can INCLUDE other files!) For example, name it game_config.bas. In your main game source file, simply INCLUDE "game_config.bas" (or whatever name you chose). When you compile the game pick the configuration by specifying one of the directories created above as the library_path. The following will compile the three versions to three separate assembly files: intybasic --title "My Game (1up Easy)" mygame.bas mygame_1up_easy.asm cfg_1up_easy intybasic --title "My Game (1up Hard)" mygame.bas mygame_1up_hard.asm cfg_1up_hard intybasic --title "My Game (2up)" mygame.bas mygame_2up_hard.asm cfg_2up Then, assemble these as usual. You could fold the details into separate scripts/batch files, so you can run, say, build_1up_hard to just build that variant. As I said, I've used this to build variants with different features (debug code, cheats, etc.) w/ AS1600 and its -i dir flag. I see no reason why a similar trick couldn't work with IntyBASIC. 3 Quote Link to comment Share on other sites More sharing options...
intvnut Posted September 27, 2020 Share Posted September 27, 2020 Also: There's no reason to limit yourself to one file in the per-configuration directory. If you have multiple pieces that you need to tweak differently in this way, you can do that with each of these pieces. Make separate versions in the separate cfg_XXX directories. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.