Is porting Xargon permitted?

Discuss coding, porting and creating games
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Is porting Xargon permitted?

Post by Malvineous »

Hi all,

I spent a few hours yesterday investigating whether it would be possible to port Xargon to a modern OS, since most of the source code is available. I had a bit of initial success, in that I can get the title screen appearing in a window and the palette animation working. Unfortunately it crashes when trying to display the background behind the main menu, but that's just a matter of tracking down the issue and fixing it.

My real question is, looking at the license one of the requirements is that you can't release a game that in any way resembles Xargon. Since by definition a port almost exactly resembles the original, at first glance it seems I wouldn't be permitted to release the port.

Is there any chance of contacting Allen Pilgrim to get some clarification on this? Bearing in mind that once a port exists for modern systems, no doubt people will want to start tweaking things (e.g. high res graphics) so there are really two issues: is it acceptable to release a port which is mostly unchanged from the original, and is it permissable to then enhance it in a way that remains faithful to the original? (I say 'mostly unchanged' as things like the opening screen that performs sound card detection are no longer relevant.)

I'm hoping both of these issues would be acceptable as I would like to release all the source code with the port, and the idea behind the license seems to be to prevent commercial releases of games that are very similar to Xargon, which is understandable. So I'm hoping that free, open source versions might be able to be excluded from that restriction! (Perhaps as long as they're clearly labelled as a derivative work?)

Anyway, is there any chance of getting in touch with Allen to clarify the matter?
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Is porting Xargon permitted?

Post by DOSGuy »

I'm pretty sure that he doesn't want someone to make a game that's like Xargon but not Xargon. It's a very permissive license, even allowing commercialization of derivative works, so I don't think he intended to discourage porting Xargon to new platforms. I've passed along your question.
Today entirely the maniac there is no excuse with the article.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Oh that's great, many thanks! I've spent a bit more time on it today and got it to the point where the title and main menu are indistinguishable from the original, and you can even load a game and start playing. There are still a few issues to resolve (mostly graphical) plus a few oddities like the text screens loading 2.5GB of random data into memory, in this case for the popup message when you first collect a piece of fruit:

Image

Probably another case of the game expecting an 'int' to be 16-bits wide when it's now 64-bits wide, so a little more hunting to go. I'm also not sure why each level scrolls all the way from the right back to the left every time it loads before you can start playing, so there's a bit of reverse engineering still to do (many of the VGA routines were omitted from the source release, and this seems to have something to do with the sideways scrolling.)

But it's looking promising! Hopefully Allen is supportive :-)
User avatar
kilodude
Classic Game Author
Posts: 54
Joined: July 19th, 2008, 6:29 pm
Contact:

Re: Is porting Xargon permitted?

Post by kilodude »

Malvineous, It's very cool what you are doing and I am totally supportive. If you were making a commercial port then that would be different. I would still support that but you would need to contact me privately about the details. The bottom line, port away and use the essence of the GNU license here: http://www.gnu.org/licenses/gpl-2.0.html. Have fun and please keep me posted.
-Allen, Game Designer/Programmer of "Kiloblaster" and "Xargon." Game Design for "Super ZZTs: Monster Zoo" and bonus levels of "Snarf."
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Is porting Xargon permitted?

Post by DOSGuy »

If you successfully port the game, and Allen declares the port official, I'll gladly host it on the site. :)
Today entirely the maniac there is no excuse with the article.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Wow, thanks for responding Allen! Glad to hear my port won't go to waste :-) Would you mind if, for simplicity's sake, I simply released my port entirely under the GPL license? One of the reasons is that I'd like to add support for the music too, which would mean adding both a CMF player and a software OPL synth - both of which exist, but are covered under the GPL. So if I could release the whole thing under the GPL it would make it that much easier to incorporate that other code and have the game run just like it did originally.

This of course wouldn't prevent your original code from being used commercially, however it would mean that the port could not be further modified without releasing the source code, as per the additional restrictions introduced by the GPL. Of course if the need ever arose for a closed-source version, I'm sure some agreement could be reached! Your request about not commercially releasing a game similar to Xargon would also be respected, as the GPL would cover the code only - not the game assets. While these are now freeware, it is my understanding that you/Epic still retain copyright over them, so I could not distribute them with the GPL port (I would have to direct people to download them separately.) Hopefully this would all be ok.

At any rate I think I've solved the last of the graphical hitches (now I understand how the viewports work), with only a few bugs remaining. If you're able to cast your mind back far enough to remember what the scrollvp() function did, do let me know! I haven't implemented it yet, but the game seems to work (and scroll) fine without it. scrollvp() only seems to be called once per game tick when first loading a level, while it scrolls the level from the right-most edge back to the starting point at the left edge. I'm a bit confused as to why this happens though!

Anyway, thanks again for posting, it's great to hear from you! As you can probably tell from my username, this game was a favourite of mine :-)
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Is porting Xargon permitted?

Post by DOSGuy »

You made an interesting distinction between ownership of the code and the game's "assets". My understanding of Epic's business model is that they developed a few games in house, but for much of their catalog, they were the publisher for games developed by people who didn't work for them, which is why the copyright was retained by the developer (a fact that has allowed me to contact people like Allen and get most of Epic's discontinued game declared freeware). Epic employees sometimes appear in the credits of these games, having assisted the developer with tasks such as graphics and sound, voice acting, and sometimes even programming. I don't think that Epic (or Apogee, or other companies that followed that model) made any attempt to retain ownership over their contributions to the games; they provided that assistance to improve sales, which meant money to them.

In all of the cases where I've contacted the developer of an Epic game, and they contacted Epic to ask if they could declare the game freeware, Mark Rein has responded, "it's your game, you can do whatever you want with it." I've never seen Mark say, "Just don't distribute the graphics/sound files/code that we created." It is my opinion that the entire game belongs to Allen Pilgrim, including any content that he did not create himself. I also doubt that Epic has any interest in retaining any rights to their contributions to these games, even if there is a legal gray area.

But, I won't speak for Allen.
Today entirely the maniac there is no excuse with the article.
User avatar
kilodude
Classic Game Author
Posts: 54
Joined: July 19th, 2008, 6:29 pm
Contact:

Re: Is porting Xargon permitted?

Post by kilodude »

DOSGuy wrote:In all of the cases where I've contacted the developer of an Epic game, and they contacted Epic to ask if they could declare the game freeware, Mark Rein has responded, "it's your game, you can do whatever you want with it." I've never seen Mark say, "Just don't distribute the graphics/sound files/code that we created." It is my opinion that the entire game belongs to Allen Pilgrim, including any content that he did not create himself. I also doubt that Epic has any interest in retaining any rights to their contributions to these games, even if there is a legal gray area.

But, I won't speak for Allen.
I asked Tim Sweeney for the rights to "Kiloblaster" and "Xargon" and here are his exact words: "You're free to sell, give away, or sign another publishing deal for Kiloblaster and Xargon if you want." That is why when Harvey asked if I would give it away as freeware I agreed to do it. I am totally content just to see other people enjoy my games. I still have friends of my son come over and play the game. One just a couple weeks ago said, "I'm not going to lie, this game is awesome!"
Malvineous wrote:Wow, thanks for responding Allen! Glad to hear my port won't go to waste :-) Would you mind if, for simplicity's sake, I simply released my port entirely under the GPL license? One of the reasons is that I'd like to add support for the music too, which would mean adding both a CMF player and a software OPL synth - both of which exist, but are covered under the GPL. So if I could release the whole thing under the GPL it would make it that much easier to incorporate that other code and have the game run just like it did originally.

This of course wouldn't prevent your original code from being used commercially, however it would mean that the port could not be further modified without releasing the source code, as per the additional restrictions introduced by the GPL. Of course if the need ever arose for a closed-source version, I'm sure some agreement could be reached! Your request about not commercially releasing a game similar to Xargon would also be respected, as the GPL would cover the code only - not the game assets. While these are now freeware, it is my understanding that you/Epic still retain copyright over them, so I could not distribute them with the GPL port (I would have to direct people to download them separately.) Hopefully this would all be ok.
Feel free to distribute the entire thing under the GPL license. I'm not really interested in doing anything commercially with either of my games. I am extremely grateful for you doing this.
Malvineous wrote:At any rate I think I've solved the last of the graphical hitches (now I understand how the viewports work), with only a few bugs remaining. If you're able to cast your mind back far enough to remember what the scrollvp() function did, do let me know! I haven't implemented it yet, but the game seems to work (and scroll) fine without it. scrollvp() only seems to be called once per game tick when first loading a level, while it scrolls the level from the right-most edge back to the starting point at the left edge. I'm a bit confused as to why this happens though!

Anyway, thanks again for posting, it's great to hear from you! As you can probably tell from my username, this game was a favourite of mine :-)
Let me think about that one. I used to know what everything was and had code printed out and laying all over my floor. You've probably seen some odd stuff in there like the way I "faked" moving platforms. I remember Tim telling me, "It's not possible with this code." I didn't accept that as an answer. :-)
-Allen, Game Designer/Programmer of "Kiloblaster" and "Xargon." Game Design for "Super ZZTs: Monster Zoo" and bonus levels of "Snarf."
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Is porting Xargon permitted?

Post by DOSGuy »

kilodude wrote:Let me think about that one. I used to know what everything was and had code printed out and laying all over my floor. You've probably seen some odd stuff in there like the way I "faked" moving platforms. I remember Tim telling me, "It's not possible with this code." I didn't accept that as an answer. :-)
When I ask authors about source code releases, I've had at least one person say, "No, the code is too embarrassing. It's a mess and a lot of stuff was hacked in." I'm really grateful that you were willing to release the code, in spite of "odd stuff" and fake moving platforms. Every program has its oddities.
Today entirely the maniac there is no excuse with the article.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Ha, you have to reassure them that everyone knows things were done differently then, and nobody will be judged negatively by code they wrote 15 years ago! Maybe once I've ported Xargon and hopefully Kiloblaster too, you can use them to demonstrate the benefits of releasing source code :-)

On that note I haven't looked into the Xargon gameplay code much (it all works perfectly as-is, fake platforms and all) although I must confess, while trying to solve the problem causing the garbled text in the above screenshot, I'm still perplexed as to why one of the functions to load text messages is in music.c :-)

But pretty much all I've had to do is implement replacement routines for the VGA stuff, of which there were surprisingly few, and a little bit of keyboard code. The hardest part was finding all the places where the game assumed variable types were a particular size and they no longer are, especially within the pointer arithmetic. I'll have to rewrite all that code eventually (not that there's a lot of it, now that I've found where it all is) so that it can be compiled on big endian platforms too, like the OpenPandora.

And thanks Allen for agreeing to the GPL as well, it'll make things much easier!
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Just a quick update. I just fixed the popup message code and now all the popup boxes seem to work (including 'instructions' on the main menu which previously did nothing) so that's good. It seems the scrollvp() function is used to scroll those text boxes, so I'll have to implement that but I'm still not sure why it's being called so many times at the start of each level. Maybe I'll find out once I implement it!

I have also gone ahead and put the code up on GitHub, however it's not quite playable yet and you'll of course have to compile it yourself! I did try compiling a version for Windows (I'm running Linux) but it didn't immediately work so I figured there are more issues to fix first.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Well that was a bit easier than I thought - just got a Windows version to compile! It still needs a bit of work (tends to crash and there are a few major bugs) but it sort of works :-) Grab xargon-win32.zip, unzip it into a copy of your Xargon folder (because it overwrites the DOS .exe file) and then double-click on xrfile01.exe.

Hopefully it will work, and you'll see what I mean about the level scrolling from right to left. This seems to happen when it's loading objects, as you'll notice the word "MAP" doesn't appear on the screen until just before it stops scrolling and encounters that object in the overhead map file. You can also move around the level while the scrolling is going on, and some objects won't be loaded yet. You can actually (if you know your way) walk over the level 1 entry point before it loads, effectively skipping the level. Evidently this has something to do with enumerating all the objects in the level, but why it takes so long and scrolls the screen at the same time I don't know.

If anyone tries to run this, please let me know how you get on - I don't compile stuff for Windows very often so it'd be good to know if it works!
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Is porting Xargon permitted?

Post by DOSGuy »

The window is hopelessly tiny on my HD monitor. At 1920x1080, VGA Mode 13h is only 1/6th the width of the screen (taking up 1/32nd the total area). I'm used to DOSBox's normal2x bumping VGA up to 640x400. 2x, 3x, 4x, etc. magnification options would be really appreciated.

The game consistently crashes on me as soon as soon as Malvineous leaps beyond the first set of platforms. He can jump to collect the lollipops on the platform below the starting point, but the game crashes as soon as he jumps across the gap to the next platform.

Edit: I just tried something different, and the game crashes as soon as I press the up arrow key within a level.
Today entirely the maniac there is no excuse with the article.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Is porting Xargon permitted?

Post by Malvineous »

Haha one step at a time! I'm just glad you were able to run it, it took me a week before I could even get onto the world map, let alone the first level :-P Before I add any magnification options I have to make sure the replacement VGA routines are working and fix the crashing bugs. It's a bit difficult as I don't have any way of debugging it when running under Windows, and it seems to crash more often there than under Linux.
User avatar
kilodude
Classic Game Author
Posts: 54
Joined: July 19th, 2008, 6:29 pm
Contact:

Re: Is porting Xargon permitted?

Post by kilodude »

I was able to run it but on my 20.1" wide screen (1680x1050) I could barely see it. It did do that weird scrolling clear across the map before I could do anything. Then it did the same thing on the first level. I believe that has something to do with scrollvp(). I still have to make time to look that up for you. Please document the code so future programmers will not have to guess what was done. I did some documentation but not that much. I started the level and was able to shoot but it exited as soon as I jumped. Next test, I used the magnification and set it to 400% so I could see it better. I tried to run it and it crashed with "Unhandled exception in xrfile01.exe 0xC0000005: Access Violation." Have fun with this. I have confidence you will be able to make it work in Windows and Linux. Linux needs more good games.

BTW - I have Linux Mint on one of my laptops and like it better than plain Ubuntu or Ubuntu Studio.
-Allen, Game Designer/Programmer of "Kiloblaster" and "Xargon." Game Design for "Super ZZTs: Monster Zoo" and bonus levels of "Snarf."
Post Reply