.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old October 25th, 2003, 11:53 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default PBW Emergency Site ver 2 Development

So far joint effort by Fyron and Ruatha, anyone else is welcome:


Here are betafiles:
betafiles
(Latest change: removed $date from deadline.php and moved $timezone from gaminfo.php to deadline.php
(Forgot deadline_check.php at work...)

---- In bold = Exists.
ELSEWHERE (OTHER DIRECTORY)
PASSWORD.CFG - Password for autoturn utility and main admin (Setup new games)

---------------
main Directory (Whatever name)

INDEX.PHP
Start page, choose game if more than one otherwise autodirect to MAIN.PHP

MAIN.PHP Main page where everything happens, display players, empires, uploaded, deadline, news, history.

GETTURN.PHP
Getturn script

PLAYERUPLOAD.PHP
Sendturn Script

DEADLINE_CHECK.PHP
Displays deadline in different timezones, each player can check his timezone.

ADMIN.PHP
Admin script, change player names, empires, e-mails, number of players, admin password, news, turns to backup.

AUTOTURN.EXE
Checks if turns has expired or all has uploaded and then autoexecutes them if needed, updates deadlines, checks all subdirectories for DEADLINE.PHP.
Creates new games by setting up subdirectories and placing the appropriate files there.
Password used to access this program is stored in PASSWORD.CFG
Can be used to customize the sites, i e colours and any page image (Same image all pages).
Program is trayable.


-------------------
Game Directories (Name = Gamename, subdirectories)

GAMEINFO.PHP
Used to store game variables;
// Name of savegame file, minus .gam.
$gamename = "name";
// Full title of the game.
$title = "title";
// Info on the host.
$host = "name";
$hostmail = "email";
// URL of alternate forum. If you do not have one to use, just leave the default pointing to Intel Forums.
$forum = "http://www.shrapnelgames.com/cgi-bin/ultimatebb.cgi?ubb=forum;f=23";
// Number of turns to keep backups of.
$numbackups = "1";
// Player information. Each player has 3 variables, name, email and empire. Do not worry about filling in info for players that do not exist (such as playername10 if you have only 9 players. The numplayers variable keeps track of the number of players in the game, so extra player info is ignored.
$numplayers = "13";

$playername1 = "SN";
$playermail1 = "email";
$playerempire1 = "empire name";
(repeat - to 20 players)

DEADLINE.PHP
File defining deadline and turn type (Manual, all uploaded and auto), Used in both PHP script and in AUTOTURN.EXE.
Date stored in Central European time, altered to the set timezone when displayed in each game.
// Date of the deadline.
$deadline_year = "";
$deadline_month = "";
$deadline_day = "";
$deadline_hour = "";
$deadline_minute = "";
// Default timezone.
$timezone = "";

TURNFILES
Directory for player turnfiles (PLR)

GAMEFILE
Directory for Gamefiles (ZIP)

BACKUP
Zipped old PLR and GAM files

---------

[ October 25, 2003, 11:00: Message edited by: Ruatha ]
Reply With Quote
  #2  
Old October 25th, 2003, 02:19 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

Geo, will this do:


On the Admin page:

(Password protected??)

Change player names and e-mails and empire names.
Change number of turns to backupp, turn execution type and deadline length.

Button to download all plr files and one to move all plr files to backupp.
Upload of Game file.
Add news.

In deadline.php we must add
$deadline_lenght (interval in hours of deadline).

[ October 25, 2003, 13:27: Message edited by: Ruatha ]
Reply With Quote
  #3  
Old October 26th, 2003, 01:43 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

An idead is to split up the Main.php into:
INCLUDE ("Header.php")
INCLUDE ("menu.php")
INCLUDE ("News.htm")
INCLUDE ("Deadline_check.php")
INCLUDE ("Show_players.php")
INCLUDE ("History.php")
INCLUDE ("Footer.php")

Where menu contains buttons for:
Get turn
send turn
mail host
mail all
Admin
Forum


???
Reply With Quote
  #4  
Old October 26th, 2003, 01:50 AM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
geoschmo is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

Need a button for the host to get all the .plr files.
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #5  
Old October 28th, 2003, 11:16 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

Fyron.
I think will add all variables in one PHP file to b eincluded.
The make almost all functions into seperate php files and make the main file almost only include.

I'm aiming to have it ready at the next PBW down time, may it never come.
It will have about the same functions as the current emergency site but be able to run turns automaticly aswell.

And have much easier code to read and edit!!
Reply With Quote
  #6  
Old October 28th, 2003, 09:14 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

Fyron >
I'm doing a total rehaul, everything is changed.
It's based around your PHP variable file.

se here the example;
ver 2 example

The index page is almost done.
It searches the game directory for all directories, pulls out config data and displays it so that one can choose game.
What is missing in index? An Super_host admin page to set up new games, delete games and change info text on the index page, and set mail info (SMTP, account, on/off).

Everything else is game_host controlled (main.php and below)

New betafiles:
Beta 0.1 for ver 2
Work continues......

[ October 29, 2003, 06:37: Message edited by: Ruatha ]
Reply With Quote
  #7  
Old October 29th, 2003, 12:12 PM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

The index page is complete.
as is the login script for the server host admin page and the host admin page (except for making and deleting games).

The index page looks in the game directory, gets the game info for all games in it and shows links to them.
Nice if I may say it myself.

Finishing site admin page now and then will work on the game main pages.

The problem with ver 1 not updating is solved with three different methods, all used:
1. Meta tags making the page non-caching and reloading every time it's accessed.
2. A java script forcing update.
3. every page get's a random number so you won't get the same url twice (own invention and it seems to work best).
Combined all three makes the page reload on each access (not three times but just when it loads).

If you want to try and login current passsword for site admin page is "ett".

When one first sets up the server it will bypass the login page and go directly to the admin page.
There is no default password.

The admin page is hacker protected and will eventually mail the host Ip and lookup info on wouldbe hacker.
This will be included in game admin pages aswell.

Most will be user changable and all code will be marked and more structured than ver 1

Setting up of games will be done in one of two ways, either through entering a name in the site admin screen and pressing a button, or alternatly by uploading the files to the game directory (files needed are so far only configuration.php).

First steps of ver 2 (0.1)

PLEASE DON'T CHANGE THE PASSWORD IN THE ADMIN SEUP SCREEN!

I'm working with it.

[ October 30, 2003, 12:21: Message edited by: Ruatha ]
Reply With Quote
  #8  
Old November 2nd, 2003, 04:25 PM
Roanon's Avatar

Roanon Roanon is offline
Second Lieutenant
 
Join Date: Mar 2003
Location: Germany
Posts: 575
Thanks: 0
Thanked 0 Times in 0 Posts
Roanon is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

You definitely have too much time, Ruatha


Thanks again, you are an excellent and caring host !
Reply With Quote
  #9  
Old November 2nd, 2003, 10:57 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: PBW Emergency Site ver 2 Development

You should be able to just use some batch files for the autoturn thingie. That is how PBW does it IIRC.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #10  
Old November 3rd, 2003, 02:51 AM
Ruatha's Avatar

Ruatha Ruatha is offline
Major General
 
Join Date: May 2002
Location: Linghem, �sterg�tland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
Ruatha is on a distinguished road
Default Re: PBW Emergency Site ver 2 Development

Getting there,
whats left to do:

game_download_host_turn.php (Host download plr turn files)
game_upload_host_turn.php (Host upload new gam turn file)
game_new_news.php (Host change game news)
game_change.php (write Host admin changes)
game_player_change.php (Choose player settings, name, mail and empire)
game_player_change_execute.php (write player setting changes)
game_upload.php (Almost done, what's left =mail options and change ALPU setting in game config.)
Autoturn.exe

What's done:
index.php
main.php
autoturn.php
auto_change.php
auto_change_execute.php
game_admin.php
game_admin_login.php
game_change.php
game_forms.php
game_full_history.php
game_get_turnfile.php
game_header.php
game_player_table.php
game_shorthistory.php
game_show_deadline.php
game_upload.php
hack.php
pclzip.lib.php
random.php
site_admin.php
site_admin_login.php
site_change.php
site_config.php
site_forms.php
site_game_manip.php
site_header.php
site_new_game.php
site_new_news.php
site_one_game.php
site_switch_mode.php
history.html
site_news.html
Version.html


Auto made for each game:
configuration.php
history.html
news.html
oldnews.html
shorthistory.html

The autoturn.exe will be hardest as I haven't programmed for 4 years, but some pascal/delphi ougth to be close to the surface..
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:52 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.