Giter Site home page Giter Site logo

fredldotme / ydkjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mwyann/ydkjs

0.0 1.0 0.0 6.18 MB

You Don't Know Javascript

Home Page: https://www.ydkjs.eu/

License: GNU General Public License v3.0

Pascal 43.79% Shell 0.08% PHP 16.93% CSS 0.25% JavaScript 33.93% HTML 4.01% Java 0.54% TSQL 0.48%

ydkjs's Introduction

YDKJS

https://www.ydkjs.eu/

Installation

You need the original CD or an ISO. Mount it or extract it.

Run the YDKJ Extractor, and on the bottom of the window, specify the path of the mounted/extracted CD content (root folder of the SRF files) in the "From" field, and an empty directory path where all the extracted content will be placed into the "To" field, and press "Convert all". This may take a while, so please be patient, and take the next steps while waiting.

Prepare your server, for example on Ubuntu 18.04 (here I use mariadb-server, but mysql-server works too of course):

sudo apt-get install apache2 mariadb-server php php-mysql ffmpeg

Copy the html folder into your web server. The game does not need to be in the DocumentRoot folder, so you can use subfolders if you wish. Protip: you can use git or svn to make future updates easier, for example:

svn co https://github.com/Mwyann/ydkjs.git/trunk/html ydkj

For now the data extraction should be done, so let's take care of it. Create a res-full folder into the root of the game's html folder and copy all the data that's been extracted into it. Move the two csv files qhdr.csv and strings.csv into the toolbox folder.

On the command line, go to the res-full folder, and run sh ../toolbox/convertwav.sh. This will convert all the .wav and .aifc sound files into .mp3 and .ogg files, and if no error occured, it'll delete the original files which are not needed anymore. Again, this will take a while, so let's finish the rest of the installation while this runs.

Create two databases, here I'll name these ydkjuk_sta (for stable data) and ydkjuk_dyn (for dynamic data), and also a user which will have access to both databases (SELECT/INSERT/UPDATE/DELETE).

CREATE DATABASE ydkjuk_sta;
CREATE DATABASE ydkjuk_dyn;
GRANT SELECT, INSERT, UPDATE, DELETE ON ydkjuk_sta.* TO 'ydkj'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, UPDATE, DELETE ON ydkjuk_dyn.* TO 'ydkj'@'localhost';

Import the file toolbox/ydkjXX_sta_res.sql into the sta database (replace XX with the version you want to import), and toolbox/ydkj_dyn.sql into the dyn database.

Copy toolbox/mysql-data.sample.inc.php into toolbox/mysql-data.inc.php, change its content to reflect the database configuration you choosed and make a copy of this file into api/local/mysql-data.inc.php. Also edit api/local/config.inc.php and change the $VERSION and $GETsalt variables accordingly.

On the command line, go to the toolbox folder, and run php import-csv.php. This will populate the empty qhdr and strings tables in the sta database. Now you can revoke unnecessary privileges to the sta database.

REVOKE INSERT, UPDATE, DELETE ON ydkjuk_sta.* FROM 'ydkj'@'localhost';

You may also want to deny direct access to the res-full folder, as this folder holds the game's data (the data will be served by a php script anyway). Create a .htaccess file in it and put deny from all in it.

When the sound conversion has finished, congratulations: installation is done! You can now use your browser to run the game.

toolbox scripts

import-csv.php

This script imports the .csv files created by the extractor tool. Those files contains the string and question data from the game. I didn't included those contents in the .sql exports for copyright reason.

readres.html

I use this script to read the animations and find the frame position for every animations. You shouldn't deny access to the res-full folder to run this script.

scan-snd.php

This script is used to update the ressnd table with the existing sound files. This script should only be used when new sound files are added to the table.

ydkjs's People

Contributors

mwyann avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.