ShiVa3D Curation: Difference between revisions

From Flashpoint Datahub
Jump to navigation Jump to search
m (information that path to .stk file might be not expressed in straightforward way)
mNo edit summary
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This guide will show you how to curate ShiVa3D games using Flashpoint Core.
This guide will show you how to curate ShiVa3D games using Flashpoint.


==Recognizing ShiVa3D==
==Recognizing ShiVa3D==
Line 13: Line 13:
Before you begin, there are a few things to keep in mind:
Before you begin, there are a few things to keep in mind:
* The ShiVa3D browser plugin relies on servers which are no longer online, so it will not work. Instead, Flashpoint uses the standalone ShiVa3D runtime.
* The ShiVa3D browser plugin relies on servers which are no longer online, so it will not work. Instead, Flashpoint uses the standalone ShiVa3D runtime.
* You can install the ShiVa3D runtime from [https://bluepload.unstable.life/s3dplayer-1920.exe here]. Once it is installed, you'll be able to open ShiVa3D (.STK) files by double-clicking them. Or, right-click the STK file for more options.
* You can install the ShiVa3D runtime from [https://drive.google.com/file/d/1tNkXGqvG3n5X7B5-S_88ExM1k7rCy1rW/view?usp=sharing here]. Once it is installed, you'll be able to open ShiVa3D (.STK) files by double-clicking them. Or, right-click the STK file for more options.
* The standalone ShiVa3D runtime does not obey the system proxy settings, nor does it have its own configurable proxy settings. Instead, Flashpoint's ShiVa3D setup uses Flashpoint's server as a standard <code>localhost</code>. As such, connections made by ShiVa3D will not show up in the Redirector.
* The standalone ShiVa3D runtime does not obey the system proxy settings, nor does it have its own configurable proxy settings. Instead, Flashpoint's ShiVa3D setup uses Flashpoint's server as a standard <code>localhost</code>.
** The Application Path for all ShiVa3D games is <code>FPSoftware\startShiVa.bat</code>.  
* The Application Path for all ShiVa3D games is <code>FPSoftware\FlashpointSecurePlayer.exe</code>.  
** The Launch Command for a ShiVa3D game is a URL matching the folder structure inside the <code>content</code> folder of your curation. This is the same as any other Platform in Flashpoint. <code>startShiVa.bat</code> will automatically convert the launch command into a <code>localhost</code> URL before passing it to the ShiVa3D runtime.
* The Launch Command for a ShiVa3D game needs to have the <code>shiva3d</code> prefix and follow the format <code>prefix URL</code>. <code>FlashpointSecurePlayer.exe</code> will automatically convert the launch command into a <code>localhost</code> URL before passing it to the ShiVa3D runtime.
* '''All ShiVa3D curations must have the <code>-extract</code> Mount Parameter'''.


==Curation Steps==
==Curation Steps==


Flashpoint comes with a copy of the ShiVa3D standalone runtime, and a launcher script called <code>startShiVa.bat</code>. This section explains how to create and test a basic ShiVa3D curation. We will use The Hunt as an example: http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.html
Flashpoint comes with a copy of the ShiVa3D standalone runtime. This section explains how to create and test a basic ShiVa3D curation. We will use The Hunt as an example: http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.html
<ol>
<ol>
<li>
<li>
Open this page in your browser. Right-click anywhere on the page, click "View Page Source", and search for <code>.stk</code>. You should see a line that looks like this:  
Open this page in your browser. Right-click anywhere on the page, click "View Page Source", and search for <code>.stk</code>. You should see a line that looks like this:  
<pre>stkobject( '950' , '533' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk' , '' , '' , '' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt-startup.stk' , '' , '' , 0 , 1 , "<V t='2' n='S3DStartUpOptions.BackgroundColor'>038,038,038</V>" , 0 , 0 , 0 , 0 , 1, null , null , null, 0,'262626',0);</pre>
<pre>stkobject( '950' , '533' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk' , '' , '' , '' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt-startup.stk' , '' , '' , 0 , 1 , "<V t='2' n='S3DStartUpOptions.BackgroundColor'>038,038,038</V>" , 0 , 0 , 0 , 0 , 1, null , null , null, 0,'262626',0);</pre>
It's possible that .stk file location won't be expressed as straghtforward path to file. For example, path to file definied by:
</li>
 
<code>
var stk_url=url.substr(0,url.length-4)+".stk";
 
url.substr(0,url.length-4)
</code>
 
yelds http://ezis.appspot.com/ShiVaChess since the URL is http://ezis.appspot.com/ShiVaChess.htm
.stk file location parameter in .htm file is <code>stk_url</code>
<li>
<li>
Find and download the main STK file. In this case, <code>TheHunt.stk</code> is the main file. As a general rule of thumb, the main file will be the largest file, while the smaller file will be a loader.
Find and download the main STK file. In this case, <code>TheHunt.stk</code> is the main file. As a general rule of thumb, the main file will be the largest file, while the smaller file will be a loader.
</li>
</li>
<li>
<li>
In your Flashpoint Core directory, navigate to <code>Server\htdocs</code>. In htdocs, create a directory or series of directories to match the original site's structure. In this case, we'd create a series of directories matching this path: <code>www8.agame.com\mirror\shiva\t\the-hunt\</code>. Finally, move your STK file into the <code>the-hunt</code> directory.
In your Flashpoint directory, navigate to <code>Legacy\htdocs</code>. In htdocs, create a directory or series of directories to match the original site's structure. In this case, we'd create a series of directories matching this path: <code>www8.agame.com\mirror\shiva\t\the-hunt\</code>. Finally, move your STK file into the <code>the-hunt</code> directory.
</li>
</li>
<li>
<li>
Now, we are ready to test the game in Flashpoint Core. Click the "New Game" button on the bottom right corner and enter the game's title, platform, application path and launch command. In this case, they would be:  
Now, we are ready to test the game in Flashpoint. Click the "New Game" button on the bottom right corner and enter the game's title, platform, application path and launch command. In this case, they would be:  
<pre>
<pre>
Title: The Hunt
Title: The Hunt
Platform: ShiVa3D
Platform: ShiVa3D
Application Path: FPSoftware\startShiVa.bat
Application Path: FPSoftware\FlashpointSecurePlayer.exe
Launch Command: http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk
Launch Command: shiva3d http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk
</pre>
</pre>
The Application Path will always be the same. The Launch Command will always be an HTTP (not HTTPS) URL pointing to the main STK file that you downloaded. You can run the game by double clicking its thumbnail in the launcher. You should now see the game running in its own window. Press <code>Alt-Enter</code> to toggle fullscreen mode.
The Application Path will always be the same. The Launch Command will always be an HTTP (not HTTPS) URL pointing to the main STK file that you downloaded. You can run the game by double clicking its thumbnail in the launcher. You should now see the game running in its own window. Press <code>Alt-Enter</code> to toggle fullscreen mode.
</li>
</li>
<li>
<li>
Create a curation by following the [[Curation Format]]. Then, follow the steps explained in [[Instructions for Curating]] to submit the game.
When creating your curation, '''make sure it has the <code>-extract</code> Mount Parameter'''.
</li>
</li>
</ol>
</ol>
==Finding the STK file==
You might have noticed that the embed code for ShiVa3D Plugin content is generated using JavaScript, specifically the <code>stkobject</code> script. However, the <code>stkobject</code> script no longer exists on the ShiVa servers, so you cannot use Inspect Element to find the embed code like you can with other plugin content. Luckily, when curating ShiVa3D content, you only need to find the link to the main STK file. However, sometimes even this is a challenge. This section will go over an example of how to find the main STK file if the site uses a JavaScript trick.
This tutorial assumes basic knowledge of JavaScript. If you're having trouble finding the link to an STK file and this tutorial doesn't help, be sure to ask in the [https://discord.gg/kY8r2BbPQ9 Flashpoint Discord server].
===Example: ShiVa Chess===
Navigate to the webpage: http://ezis.appspot.com/ShiVaChess.htm. Right-click and choose "View Page Source".
Instead of the usual type of <code>stkobject</code> line, you'll see this:
stkobject( screensizeW.toString() , screensizeH.toString() , stk_url , null, null , null , null , null , null , 0 , 1 , "<V t='2' n='S3DStartUpOptions.BackgroundColor'>034,034,034</V>" , 0 , 1 , 1 , 1 , 1, null , null , "jpg", 0 , 222222,1);
There's no STK URL there! In its place, there's a JavaScript variable called <code>stk_url</code>. So, we need to find the value of this variable.
Searching the page for <code>.stk</code> again, you'll see this:
var stk_url=url.substr(0,url.length-4)+".stk";
<code>url</code> refers to the URL of the webpage, so <code>url.substr(0,url.length-4)</code> will yield <code>http://ezis.appspot.com/ShiVaChess</code>. The final bit of code will add <code>.stk</code> to the end of that, so the value of <code>stk_url</code> will be <code>http://ezis.appspot.com/ShiVaChess.stk</code>.
Now that you've found the STK URL, you can proceed with the curation as normal.
== Wrapping It Up ==
{{:Wrapping It Up}}
<noinclude>
[[Category:Curation Guides]]
</noinclude>
<noinclude>
[[Category:Curation Guides]]
</noinclude>

Latest revision as of 22:52, 7 March 2024

This guide will show you how to curate ShiVa3D games using Flashpoint.

Recognizing ShiVa3D

There are a few ways to know that you found ShiVa3D content on the web:

  • You see the text "Application created with ShiVa" somewhere on the page.
  • You right-click the page and choose View Page Source, and see one of the following
    • A reference to a script with a name like stkobject. For example, you might see stkobject1.8.js.
    • A reference to a file with a .stk extension.

Notes

Before you begin, there are a few things to keep in mind:

  • The ShiVa3D browser plugin relies on servers which are no longer online, so it will not work. Instead, Flashpoint uses the standalone ShiVa3D runtime.
  • You can install the ShiVa3D runtime from here. Once it is installed, you'll be able to open ShiVa3D (.STK) files by double-clicking them. Or, right-click the STK file for more options.
  • The standalone ShiVa3D runtime does not obey the system proxy settings, nor does it have its own configurable proxy settings. Instead, Flashpoint's ShiVa3D setup uses Flashpoint's server as a standard localhost.
  • The Application Path for all ShiVa3D games is FPSoftware\FlashpointSecurePlayer.exe.
  • The Launch Command for a ShiVa3D game needs to have the shiva3d prefix and follow the format prefix URL. FlashpointSecurePlayer.exe will automatically convert the launch command into a localhost URL before passing it to the ShiVa3D runtime.
  • All ShiVa3D curations must have the -extract Mount Parameter.

Curation Steps

Flashpoint comes with a copy of the ShiVa3D standalone runtime. This section explains how to create and test a basic ShiVa3D curation. We will use The Hunt as an example: http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.html

  1. Open this page in your browser. Right-click anywhere on the page, click "View Page Source", and search for .stk. You should see a line that looks like this:
    stkobject( '950' , '533' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk' , '' , '' , '' , 'http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt-startup.stk' , '' , '' , 0 , 1 , "<V t='2' n='S3DStartUpOptions.BackgroundColor'>038,038,038</V>" , 0 , 0 , 0 , 0 , 1, null , null , null, 0,'262626',0);
  2. Find and download the main STK file. In this case, TheHunt.stk is the main file. As a general rule of thumb, the main file will be the largest file, while the smaller file will be a loader.
  3. In your Flashpoint directory, navigate to Legacy\htdocs. In htdocs, create a directory or series of directories to match the original site's structure. In this case, we'd create a series of directories matching this path: www8.agame.com\mirror\shiva\t\the-hunt\. Finally, move your STK file into the the-hunt directory.
  4. Now, we are ready to test the game in Flashpoint. Click the "New Game" button on the bottom right corner and enter the game's title, platform, application path and launch command. In this case, they would be:
    Title: The Hunt
    Platform: ShiVa3D
    Application Path: FPSoftware\FlashpointSecurePlayer.exe
    Launch Command: shiva3d http://www8.agame.com/mirror/shiva/t/the-hunt/TheHunt.stk
    

    The Application Path will always be the same. The Launch Command will always be an HTTP (not HTTPS) URL pointing to the main STK file that you downloaded. You can run the game by double clicking its thumbnail in the launcher. You should now see the game running in its own window. Press Alt-Enter to toggle fullscreen mode.

  5. When creating your curation, make sure it has the -extract Mount Parameter.

Finding the STK file

You might have noticed that the embed code for ShiVa3D Plugin content is generated using JavaScript, specifically the stkobject script. However, the stkobject script no longer exists on the ShiVa servers, so you cannot use Inspect Element to find the embed code like you can with other plugin content. Luckily, when curating ShiVa3D content, you only need to find the link to the main STK file. However, sometimes even this is a challenge. This section will go over an example of how to find the main STK file if the site uses a JavaScript trick.

This tutorial assumes basic knowledge of JavaScript. If you're having trouble finding the link to an STK file and this tutorial doesn't help, be sure to ask in the Flashpoint Discord server.

Example: ShiVa Chess

Navigate to the webpage: http://ezis.appspot.com/ShiVaChess.htm. Right-click and choose "View Page Source".

Instead of the usual type of stkobject line, you'll see this:

stkobject( screensizeW.toString() , screensizeH.toString() , stk_url , null, null , null , null , null , null , 0 , 1 , "<V t='2' n='S3DStartUpOptions.BackgroundColor'>034,034,034</V>" , 0 , 1 , 1 , 1 , 1, null , null , "jpg", 0 , 222222,1);

There's no STK URL there! In its place, there's a JavaScript variable called stk_url. So, we need to find the value of this variable.

Searching the page for .stk again, you'll see this:

var stk_url=url.substr(0,url.length-4)+".stk";

url refers to the URL of the webpage, so url.substr(0,url.length-4) will yield http://ezis.appspot.com/ShiVaChess. The final bit of code will add .stk to the end of that, so the value of stk_url will be http://ezis.appspot.com/ShiVaChess.stk.

Now that you've found the STK URL, you can proceed with the curation as normal.

Wrapping It Up

First, make sure that you have thoroughly tested your curation and followed the Curation Format. Scroll down in the Curate tab and click the Export button at the bottom of your curation to save it as a .7z file. After you've exported the curation, you can find it by clicking the Exported Curations button on the Curate tab (as long as you didn't choose to save it somewhere else). Once you have the file, submit it to the Flashpoint Submission System. An explanation of how the site works is available here.

After you have uploaded your curation to the website, a Curator will check it. This can take some time, so please be patient. You will be pinged in the #fpfss-notifications channel about whether or not your submission was approved, and if any changes need to be made.

Congratulations! Your submitted game/animation will appear in a future version of Flashpoint.