Jump to content
The Dark Mod Forums

Ability to distribute FM's as standalone projects


Recommended Posts

Although aspects like the non-commercial license make this a bit different from an actual engine like Godot, I've always thought of TDM as a sort of no-code game engine for making single-player games, be it one centered around a fixed genre and default assets. Even if FM's can't be sold, I still pondered the idea of distributing special projects as standalone packages, which should of course be done in addition to having your FM in the installer which remains the ideal way to run them. As such I was wondering what others think about a procedure to pack your map with the TDM executable and relevant assets as a zip archive, which can then be posted in places where anyone can easily download it and run the exe.

The idea is aimed at making distribution on platforms like itch.io / GoG / Steam easier: If you make an involved project based on TDM that you want to offer on your own website or service external to the normal TDM community, it's harder to tell your players "go to thedarkmod.com download and install the project TheDarkMod then look for the name My Fancy Mission in the mission installer to play this"; Folks these days will find that a bit convoluted, everyone is used to downloading a zip or an installer and running it in place. FM creators could have more reach by being able to share downloadable FM's elsewhere on the internet, even attract new players to TheDarkMod who wouldn't normally look into it but discover TDM from this one FM they saw on a blog.

A good example is the RenPy visual novel engine: You can run a story with the engine in place, but if you want to distribute it you can do so with a copy of the engine embedded for all platforms. Without this ability RenPy users could still make novels with the engine, but would be limited to the RenPy community and people already running and familiar with it as a software: It would be hard to distribute it to people in other places who don't necessarily know what RenPy is and might not play it if they have to install the engine separately then plug your novel into it.

How such a thing would probably be implemented: A menu called Distribute Standalone Package would be available in DarkRadiant. It checks which assets are used by the active map, for campaigns scan every map in the maps directory; Those assets are extracted from the core pk4's and copied to an install directory alongside core assets / game code / engine executables with the active FM set to your project. For example: If you use it on a test map that only has the dirt material and a citywatch AI, the install will contain a copy of the dirt material / texture and the citywatch models / textures / skins / defs / vocal sets followed by core stuff and of course the map itself.

Link to comment
Share on other sites

While I agree with you for games that stray far away from the TDM setting and are basically total conversions, I don't think this is a good idea for normal TDM missions. Right now we can find all new missions via the in-game downloader. If such standalone versions are allowed I suspect we would need to search the whole internet to see if something new has been released just because mission authors might believe that their mission is so special that it needs a standalone version.

Edited by wesp5
Link to comment
Share on other sites

6 hours ago, wesp5 said:

While I agree with you for games that stray far away from the TDM setting and are basically total conversions, I don't think this is a good idea for normal TDM missions. Right now we can find all new missions via the in-game downloader. If such standalone versions are allowed I suspect we would need to search the whole internet to see if something new has been released just because mission authors might believe that their mission is so special that it needs a standalone version.

Same, that's what I'm thinking: For simple standard FM's sticking to the mission download menu and this forum is ideal. My idea is for special projects, which are large and unique enough to be like standalone games and have their own project page on a game site; Even in their case they should definitely be in the mission downloader for TDM users to install normally, but can also be distributed in a place like itch.io for the non-TDM audience.

It would also be fairly simple to implement: DarkRadiant already knows which resources a map is accessing, be it entity defs / models / skins / materials / textures / sounds: It just needs to extract those files from their pk4 and copy them to an install directory, followed by all core assets used universally like menu / player / etc, then just blend in the FM directory and set currentfm.txt to the project.

Link to comment
Share on other sites

If you know some Python, you could make a script for it. So you find it in the scripts menu.

 

On 6/8/2024 at 11:15 PM, MirceaKitsune said:

A good example is the RenPy visual novel engine

It's funny because I yesterday found out about this engine, but not after reading your post.. It was via a game in Steam I think.

I think this is also how it's done with Godot.

 

On 6/8/2024 at 11:15 PM, MirceaKitsune said:

itch.io / GoG / Steam

I think it's not possible to host the engine on such platforms without some kind of license agreament that nobody wants to agree on.

 

Maybe you could make an autoinstall script that installs tdm. I mean if you make a tdm folder with inside it an fms folder, with the fm in it, and in the root tdm folder you put the installer.

Using:

--unattended

should work for auto installs.

image.png.10f82e64a57d86e08c6021c4c9c71118.png

Edited by datiswous
Link to comment
Share on other sites

Posted (edited)

Was thinking how as an alternative it's easy to build a bash or Python script to do it. The hardest part is scanning the map to figure out every resource used: Recursion is needed since a map may use an entity that has a model which uses a skin that itself uses a material and that material uses a bunch of texture images.

In the meantime it's possible to do it all manually if you really want. As long as you're careful to not miss any packages and test your standalone distribution to make sure the console isn't reporting any missing data errors.

A special mode for the TDM installer / updater could also work as an alternative, allowing you to install TDM with a particular FM and only the required core packages for running that FM: This would be an equally nice solution, as it would allow a FM creator to still distribute an executable for their FM which then installs itself similar to how a MMORPG or Minecraft self-update.

And the engine has licensing limitations for hosting on platforms like itch.io? The code is GPL and most assets are CC-BY-SA-NC, so if you aren't selling it and post the project for free it should be good? I remember us having issues with Steam that didn't allow TDM to be hosted on it, but those were due to its ridiculously strict licensing terms.

Edited by MirceaKitsune
Link to comment
Share on other sites

On 6/10/2024 at 6:09 PM, MirceaKitsune said:

Was thinking how as an alternative it's easy to build a bash or Python script to do it. The hardest part is scanning the map to figure out every resource used: Recursion is needed since a map may use an entity that has a model which uses a skin that itself uses a material and that material uses a bunch of texture images.

It's nowhere near as easy as you think, and there's no way in hell you can do it in bash. Sure, you can try something really simple and obvious like grepping for the material name and then grepping for the word "diffusemap" and hoping for the best, but it won't work.

Materials and other declarations are complicated. They have a large number of keywords which can appear in an arbitrary order, they have nested blocks, they have math expressions, they have quoted strings and comments (including multi-line C-style comments) which might themselves contain keywords or even entire commented-out definitions.

I actually started writing a new material parser in Rust, with the intention of creating a command line tool which could answer queries like "Get me the path to the diffusemap for material textures/common/blah" so it could be used as a back-end for the Blender import/export scripts. I started out by trying simple text searches and quickly realised that it wouldn't work. In order to parse anything you have to parse everything. That project has been going on for over two years and it still doesn't parse all of the TDM materials (and that's just materials — it doesn't even touch skins, model defs or any other kind of decls which you will need to parse if you want to determine the complete set of assets used by a map).

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Happy birthday to me!
      Yes, today's my birthday and as much as I want to play The Dark Mod, I won't until it's late Autumn, where it should be a bit chilly in my place and there's some wind too.
      For now, it's time to enjoy my birthday, if any of you want to play a great fan mission in my honour...Well that's asking too much, just play the mission because it's fun, not because of me, enjoy it yourself! 💪
      · 4 replies
    • nbohr1more

      New texture wiki article created: https://wiki.thedarkmod.com/index.php?title=Creating_textures_from_Ornate_Photos
      · 2 replies
    • Xolvix

      Took a break from TDM until I got my backlog under control. It's been months and it's still not "under control". Damnit.
      · 4 replies
    • Ansome

      I sleep well at night knowing the player will never see the absolute nightmare that is my sealing brushwork outside the playable area. Only the pointfile can judge me now.
      · 4 replies
    • JackFarmer

      Somehow I admire the fact that the material from Dune has now been filmed for the third time. Personally, I could never do much with the material, but as a child of the 80s, I of course know the David Lynch movie...and that movie was at least funny!
      · 2 replies
×
×
  • Create New...