Author Topic: Building a game for MS-DOS  (Read 596 times)

Building a game for MS-DOS
« on: 14 Jan 2021, 11:57 »
Is there any chance to build an AGS game for MS-DOS? I was trying to build my game for macOS to allow my friends to play it, but installing Xcode and all the rest is really a mess. I was thinking that if I could build an MS-DOS executable, they could play it easily with DOSBox. Is it a stupid idea?

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Building a game for MS-DOS
« Reply #1 on: 14 Jan 2021, 12:10 »
You would need to either use very old version of AGS that still supported MS DOS or port the current engine to MS DOS.

Re: Building a game for MS-DOS
« Reply #2 on: 14 Jan 2021, 12:25 »
I made my game with AGS3.5, so I don't think it's compatible with old versions. I guess there is no plan to support MSDOS builds in the new version, right? :)

I saw another thread about ScummVM, this could be another solution for portable builds. I hope it will be completed.

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Building a game for MS-DOS
« Reply #3 on: 14 Jan 2021, 13:29 »
I was thinking that if I could build an MS-DOS executable, they could play it easily with DOSBox. Is it a stupid idea?

Seems like I misread the original question. You do not want to run games on MS DOS, you want to support MS DOS just to let run ags games in DosBox on macos? Yes, this is a stupid idea.

This is a wrong approach. If there's a problem in running AGS games on macos, then that is what should be discussed, not porting to MS DOS.

First of all, we have a macos engine built on our build server. May it be used to launch prebuilt game data?

There may be alternate ways to achieve this. Cannot you for example use Wine on macos to run Windows games?
« Last Edit: 14 Jan 2021, 13:38 by Crimson Wizard »

Re: Building a game for MS-DOS
« Reply #4 on: 14 Jan 2021, 13:39 »
Not anymore. Wine stopped working when Apple disabled the support of 32-bit apps with Catalina.

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Building a game for MS-DOS
« Reply #5 on: 14 Jan 2021, 13:43 »
We have some kind of executable built for macos, this one is for AGS 3.5.0.29 for instance: https://cirrus-ci.com/task/4620211678609408

But I never learnt how it works and whether it may be used to run any game. Need to ask people who might know, morganw, or eri0o.

Not anymore. Wine stopped working when Apple disabled the support of 32-bit apps with Catalina.

Well this means we might need to build a 64-bit Windows engine.
« Last Edit: 14 Jan 2021, 13:45 by Crimson Wizard »

eri0o

Re: Building a game for MS-DOS
« Reply #6 on: 14 Jan 2021, 14:08 »
Hey @emabolo, do you mind asking again on the MacOS thread:

https://www.adventuregamestudio.co.uk/forums/index.php?topic=47264.180

(Just to reduce confusion)


Edit: erh, I thought this was the MSDOS thread... Can you change the title?

Anyway, as CW said there are currently binaries for MacOS produced in the CI system. Can you test those?

What game are you trying to play?

AGS can be built if you have Xcode installed with it's command line tools and CMake. If you use brew, CMake can be obtained there or otherwise you can install from source.

AGS CMake build supports building an APP game (for people wanting to make their game available on MacOS) and also has an engine build that can be used (although not recommended) to run other ags games, by just running it in the command line with the path of the game you want. The not recommended part is because most comercial games use plugins, the engine does have some stubs to alleviate this but this doesn't always works.

Edit2:

OK, now I understand it's YOUR game you want to ship. Well, if it's just your friends you can build an app and be cool, it should be really simple, if you have Xcode installed there's some automation documented here, look for the resource directory:

https://github.com/adventuregamestudio/ags/tree/master/OSX#building-your-game-with-cmake-and-make

For more details, Edenwaith has a huge write up on the topic that includes even signing and notarization, necessary for wide distribution on MacOS

http://www.edenwaith.com/blog/index.php?p=112

Edit3: curious, do you yourself have a MacOS compatible computer? If not, my best bet is relaying the MacOS binary from the CI and asking people to place it in the same directory of your game and run it through MacOS command line.

Edit4: I talked with the CI provider and around March, maybe later, MacOS BigSur on Arm will be available if we want to build for it too - still a bit early and I currently don't have a MacOS Arm device to test.
« Last Edit: 14 Jan 2021, 16:37 by eri0o »

Re: Building a game for MS-DOS
« Reply #7 on: 14 Jan 2021, 22:21 »
Thanks a lot for all the answers.

Let me reformulate the problem. I'm developing a game (on my Windows computer). It's not a commercial game, it's just for fun. But I'd like to send it to my friends so that they can play it. The problem is some of them have a Mac, so I cannot send them the Windows executable.
The reason why I asked for MSDOS is that I have a good experience with DOSBox. I'm using it to play old games, and it works perfectly on Windows, macOS, and Linux. So if AGS could build an MS-DOS executable would be a fantastic solution in terms of portability (DOSBox is also used by gog.com to distribute games commercially). I mean, if I play Monkey Island on DOSBox, I don't see why I could not play my AGS game. But I can understand start to code for MS-DOS in 2021 is insane.

Wrapping the Windows EXE in Wine would have been possible, but starting from Catalina, it doesn't work anymore, plus it's not a good solution (a wrapper can be more than 1GB for a game that is just 10MB). It's ugly.

ScummVM can be a good idea. I like that. With a ScummVM build, the game would be portable to all platforms.

An even better solution would be an HTML5 build. This way games would be playable on the web, which would be awesome. At least it's a new technology, not like MS-DOS, but I have no idea how complex would be to have an HTML5 build in addition to the Windows EXE build.

Said that, thanks a lot to the developers of AGS, because it's an amazing tool. I'm actually having a lot of fun developing my game.

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Building a game for MS-DOS
« Reply #8 on: 14 Jan 2021, 22:43 »
Let me reformulate the problem. I'm developing a game (on my Windows computer). It's not a commercial game, it's just for fun. But I'd like to send it to my friends so that they can play it. The problem is some of them have a Mac, so I cannot send them the Windows executable.

You don't have to send them Windows exe, you may send them just the game data from Compiled/Data folder, and ask them to download Mac engine port to run it (for example from here: https://cirrus-ci.com/task/4620211678609408)
Actually, ports can use windows exe too, because game data is attached to exe they extract it and ignore windows program. This is how Linux port ran AGS games before we added ability to deploy game version specially for linux.


EDIT: BTW, I am not sure why we don't include mac port to downloads on AGS page and release forum topics...

An even better solution would be an HTML5 build. This way games would be playable on the web, which would be awesome. At least it's a new technology, not like MS-DOS, but I have no idea how complex would be to have an HTML5 build in addition to the Windows EXE build.

HTML5 build kind of exist, in experimental way: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58470.msg636627919#msg636627919
« Last Edit: 14 Jan 2021, 23:49 by Crimson Wizard »

Re: Building a game for MS-DOS
« Reply #9 on: 15 Jan 2021, 07:13 »
Thanks! I still don't get what to do with this cirrus ci build (that page is incomprehensible for me, maybe I'll ask in the beginner's forum), but the js/html5 version looks great, I'll try to use that.


Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Building a game for MS-DOS
« Reply #10 on: 15 Jan 2021, 08:26 »
Thanks! I still don't get what to do with this cirrus ci build (that page is incomprehensible for me,

Oh, sorry.
Basically, ignore everything else and look at "Artifacts" section. These are downloadable items created by our automated system.
For macos this has only "binaries", and there's "down arrow" icon to the right, which lets you download the zip archive. Inside there is just 1 file called "ags" - that is macos engine executable.


The only thing I myself don't understand is why is it called "1.12 release".... might ask someone to clarify.
« Last Edit: 15 Jan 2021, 08:29 by Crimson Wizard »

Re: Building a game for MS-DOS
« Reply #11 on: 15 Jan 2021, 09:31 »
Ok, now I get it. Calling the file "ags" from the mac command line, with the proper parameters, should make the job, right? I'll try it.

Anyway, I also tested the js version and it's a great solution. I just have a minor problem with the cutscene, but it looks very promising.

I started this thread maybe with the wrong topic, but in the end, it was very useful for me :)

eri0o

Re: Building a game for MS-DOS
« Reply #12 on: 15 Jan 2021, 13:35 »
If the person places the ags MacOS binary in the same directory as yourgame.ags it should magically find your game by just running ./ags in the terminal.