New life of old games: the most open source directory of source ports (Java + PHP)

    Recently, it occurred to me to revive my old catalog of source-ports and graphic modifications for old games. The new version was supposed to be as open-source and open as possible, so that any user could edit both the content of the site and its code, and I would only have to deal with pre-moderation of the changes. If you are interested in what came of this, how I created problems for myself and how I then solved them, welcome to cat.



    Brief TK on the site


    • Information on modifications for games (fan patches, texture sets, source ports, etc.) will be posted on the website, improving graphics, simplifying some aspects of management, and also transferring it to another operating system or platform. An example of such mods is adding frames to Dune 2 to select units or high-resolution textures for Doom
    • The site will only contain information, but not the files of modifications and ports themselves. On the old version of the site, I tried to maintain and upload fresh copies of files to myself, and it consumed time
    • The site should be convenient to use both from the desktop and from a tablet or phone
    • Any user should be able to add a game, modification and so on to the site, as well as edit any information already added to the site
    • Any user should be able to edit the code and layout of the site
    • The site owner should be able to pre-moderate any changes
    • It should be possible to add additional moderators
    • There should be buttons for sharing on social networks

    Decision


    And let's put all the data on the github, and will we generate a static site from this data? Solid pluses!


    • GitHub already provides a web interface for modifying or adding files and submitting changes as a pull request
    • Pull Request - an excellent system for moderating changes and viewing diffs
    • Need new moderators? Add users to the project on the github, no need to think about the rights system
    • A static site can be hosted on absolutely any hosting, including GitHub Pages
    • Any activity such as comments, sharing, or a “random modification” block can be implemented on the client using JS and ready-made solutions like Disqus
    • For simplicity and speed of layout use Bootstrap

    Moreover, I have long wanted to practice writing a static site in Java. Solved! In one repository we store data , in the second - a static site generator . Train ... Although no, stop, first you need to make another decision.


    In what format should information be stored?


    Keeping the description of the game or modification in files of the “JSON / XML / write your own version” format seems to be a great idea, but our requirements are “... any user ...”, and some JSON can scare you. Well, the question is garbage - let's store the data in a bundle of text or Markdown files. One file - one entity, MD files on github have a preview - lepota! And in order to simplify the situation, we will write in detail in the documentation what is responsible for what. Part of this information:



    And what I want to say is that editing the existing information in this mode is really quite convenient. But there is one caveat ...


    Adding New Information


    It turned out to be convenient to edit the data, but to start a new modification was not very, because it was necessary to create from 4 to 14 files at a time. And to do this using the github interface is damn inconvenient. The first thought was to throw in multi-step instructions describing the addition of new information from and to.



    Alas, the verdict of the site users was unequivocal: inconvenient! And if users are uncomfortable on a site that should live off user activity ... you know, the kirdyk project.


    PHP to the rescue


    Well, what to do, the decision was generally obvious: write forms to create new information by creating a pull request with all the necessary files, as well as uploading screenshots to existing descriptions. According to old memory, because of the desire to start the project as soon as possible, and also because PHP was already on the hosting - PHP was used for these forms.



    Soared up?


    After adding convenient forms, the process started: the first weeks after posting information about the site in my video blog and on the Old-Games.RU site, new mods and ports were added at such a speed that I just did not have time to do moderation!



    In addition to adding information, I was also thrown off a number of comments and suggestions on the interface and functionality, some of which I have already implemented, and some are still waiting in the wings.


    One of the frequent complaints was the appearance of the site - and this is understandable, because I used the default Bootstrap 4 theme with the thought “this is temporary, then I’ll put on a beautiful skin”. The joke about "there is nothing more permanent than temporary" does not even want to be reproduced.


    Then, of course, activity began to decline, but there are still some active users on the site and the site continues to fill with information. At the time of launch in mid-February, the site had 227 mods for 86 games , and at the time of this publication - 323 mods for 130 games .


    And why did you write it here?


    Firstly, to tell another story with obvious morality: “the interface is convenient and pleasant for the programmer, it will not at all be convenient for the user of the site”. Despite the banality of the thesis - it should be periodically reminded.


    And secondly - to invite fans to delve into the code or draw and rotate the interfaces. Maybe the theme of the site will interest you and you will want to help a little in its development ;-)


    If you are interested, then the entire source code of the site lives on a github .


    PS Video tour of the site



    Also popular now: