Welcome aboard Visitor...

Daily Screenshot

Server Costs Target


84% of target met.

Latest Topics

- The birth of Negavolt... »
- so i talked with Massi »
- See Commands »
- Now the fun begins »
- Qand answers have returned »
- Call to Arms »
- All Species 8572 Report in »
- hi there »
- Anyone still playing from a decade ago or longer? »
- Game still active. NICE! »

Development Blog

- Roadmap »
- Hello strangers, it’s been a while... »
- State of DarkSpace Development »
- Potential planetary interdictor changes! »
- The Silent Cartographer »

Combat Kills

Combat kills in last 24 hours:
No kills today... yet.

Upcoming Events

Search

Anniversaries

6th - Nistrim

Social Media

Why not join us on Discord for a chat, or follow us on Twitter or Facebook for more information and fan updates?

Network

DarkSpace
DarkSpace - Beta
Palestar

[FAQ
Forum Index » » Soap Box » » My PHP Game
Goto page ( 1 | 2 | 3 | 4 | 5 | 6 Next Page )
 Author My PHP Game
Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-15 19:43   
Working on a little PHP Webgame...

http://www.ravenwarriors.com/drafell/dsgalaxy/

Not very functional yet. (Nothing works )

[ This Message was edited by: Mr Black on 2005-08-16 07:22 ]
_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
Fatal Rocko Willis
Fleet Admiral
Fatal Squadron


Joined: March 01, 2003
Posts: 1336
From: Kentucky
Posted: 2005-08-16 12:01   
Well I am in Draf...
_________________


  Email Fatal Rocko Willis
BackSlash
Marshal
Galactic Navy


Joined: March 23, 2003
Posts: 11183
From: Bristol, England
Posted: 2005-08-16 12:20   



.. there goes all my bandwidth
_________________


Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-16 14:24   
The passwords are now stored in a secure format. Working now on getting the sessionID and cookies working correctly to enable you to access other pages without haveing to constantly re-enter your login details. Big learning curve for me so I am getting there slowly.
Once I have the authentication and cookies sorted then I will be able to progress onto actual game functionality.

The first basic function will be exploration. This will operate as a depreciating return. formula help on things like this would be good.
Preferably we want to set an explore cap of around 30-40 planets. After that point the chances would be extremely low of finding any new planets.
'Scout' class ships would be able to explore faster, requiring the least number of turns to explore.

We currently have 6 ship classes. Will probably up this at some point to fill in the gaps. They will have an offense/defense and speed rating. The max speed is 10. This will equate to one or two turns when ingame.

Scout - 1/1/10
Corvette - 2/1/9
Frigate - 2/2/8
Destroyer - 3/3/7
Cruiser - 5/5/5
Dreadnought - 8/8/4

Planets will be buildable and have the following properties:-

Planet size (Tiny, Small, Medium, Large, Huge) - Affects maximum structures + population
Planet type (Inhospitable, Barren, Arid, Ice, Ocean, Terran) - Affects maximum resource output + population
Planet Domes - Increases population
Planet Farms - Increases food output
Planet Mines - Increases resource gain
Planet Factories - Increases Production speed
Planet Labs - Increases research speed
Planet Defense - Increases defense level

Research will be used for increasing the effectiveness of various building types across your empire.

Lots more stuff to add to this.
_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
Alien Mastermind
Grand Admiral
Pitch Black


Joined: January 20, 2003
Posts: 242
From: Toronto
Posted: 2005-08-16 14:40   
Sounds amazing. I played quite a few of these games so if you need any help on possible ideas, email me. I could also provide help with formulae if you want.
_________________
\"It has yet to be proven that intelligence has any survival value.\"
-Arthur C. Clarke

  Email Alien Mastermind
BackSlash
Marshal
Galactic Navy


Joined: March 23, 2003
Posts: 11183
From: Bristol, England
Posted: 2005-08-16 14:42   
Be gentle with my web server
_________________


Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-16 16:17   
Code help required:-

Fixed


[ This Message was edited by: Drafell on 2005-08-17 18:25 ]
_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
dargo
1st Rear Admiral

Joined: November 11, 2004
Posts: 3
From: dargo
Posted: 2005-08-16 19:55   
the problem is you forgot a ')' heres the corrected code.
was ' if (mysql_num_rows($res,0) {' should work now if need more help i can be reached at vap0r1@hotmail.com (msn) kardargo@gmail.com is my email and irc.cyberarmy.biz #ewp is the irc i hang out on so need more help just come get me

Quote:
// setup global variable $global_user_id, set it to 0, which means no user as DB values begin at 1
$global_user_id= 0;
// now, check if user’s computer has the cookie set
if (isset($_COOKIE['GalaxyLog'])) {
$cookieval= $_COOKIE['GalaxyLog'];
//now parse the ID:LOGCODE value in cooke via explode() function
$cookieparsed= explode (":", $cookieval);
// $cookie_uid will hold user’s id
// $cookie_code will hold user’s last reported logcode
$cookie_uid= $cookieparsed[0];
$cookie_code= $cookieparsed[1];
// ensure that ID from cookie is a numeric value
if (is_string($cookie_uid)) {
//now, find the user via his ID
$res= mysql_query("SELECT sessionVar FROM fleetsList WHERE fleetLogin='$cookie_uid'");
// no die() this time, we will redirect if error occurs

if ($res) {
// now see if user’s id exists in database
if (mysql_num_rows($res,0)) {
$logcode_in_base= mysql_result($res, 0);
// now compare LOGCODES in cookie against the one in database
if ($logcode_in_base == $cookie_code) {
$loginTrue="1";
// if valid, generate new logcode and update database
$newcode= md5(func_generate_string());
mysql_query(“UPDATE fleetsList SET sessionVar=’$newcode’ WHERE fleetLogin='$cookie_uid'”);
// setup new cookie (replace the old one)
$newval= “$cookie_uid:$newcode”;
setcookie("GalaxyLog", $newval, time() + 300, "/drafell/dsgalaxy/", ".ravenwarriors.com");
// finally, setup global var to reflect user’s id
$global_user_id= $cookie_uid;
} else {
$loginTrue="0";
// redirect if logcodes are not equal
echo "


Sorry you do not appear to have logged in correctly or your account does not exist.


Please try to login in again or create a new account.


Login - Create Account";
}
} else {
// redirect if user ID does not exist in database
}
} else {
// redirect in case of database error
}
} else {
// redirect if user ID in cookie not numeric
}
}
?>







[ This Message was edited by: dargo on 2005-08-16 20:01 ]
_________________
I may be small but allow me to remind you that only serves to put me at castration level.

  Email dargo
BackSlash
Marshal
Galactic Navy


Joined: March 23, 2003
Posts: 11183
From: Bristol, England
Posted: 2005-08-17 05:24   
Its always the small things...
_________________


Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-17 05:26   
Lol. Not quite.
it works now though, and half of the code shown is no longer valid

Thnx for the help dargo
_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
dargo
1st Rear Admiral

Joined: November 11, 2004
Posts: 3
From: dargo
Posted: 2005-08-17 08:51   
heh np php is just my thing lol like i said need more help just msg
_________________
I may be small but allow me to remind you that only serves to put me at castration level.

  Email dargo
Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-17 09:02   
Fleet Overview and Planet Overview links should now work.
Fleet Overview just sends you back to the same page, Planet Overview shows the planets you currently own.

New Account Creation now creates a Home Planet (Terran, Medium) and assigns it a system Name.
The random name generator currently only does one letter. Eventually each new user will have a unique system name which will apply to all planets they locate by exploration.

IE Ojoro 1, Ojoro 2 etc.

_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
Drafell
Grand Admiral
Mythica

Joined: May 30, 2003
Posts: 2449
From: United Kingdom
Posted: 2005-08-17 18:06   
I have added the namegen and it apparently works ok. Some of the names are a little weird but I think we can live with it.

You can test it http://www.ravenwarriors.com/drafell/planets.php

Want to add more options for the names as well.

Example output:

Gxovis
Iputsot
Djisat
Otoduk
Broces
Zugok
Emodok
Ruclid
Fluthen
Anenat
Uzedez
Flotas



[ This Message was edited by: Drafell on 2005-08-17 18:19 ]
_________________
It's gone now, no longer here...Yet still I see, and still I fear.rnrn
rnrn
DarkSpace Developer - Retired

  Goto the website of Drafell
Tbone
Grand Admiral

Joined: July 21, 2001
Posts: 1756
From: Vancouver
Posted: 2005-08-17 18:09   
Wierd is an understatement.


"Pehut"

[ This Message was edited by: Tbone on 2005-08-17 18:09 ]
_________________


  Email Tbone
Crim
Fleet Admiral
Sundered Weimeriners


Joined: March 16, 2003
Posts: 1336
Posted: 2005-08-17 18:24   
"Listen" was the cool one I found..
_________________


Goto page ( 1 | 2 | 3 | 4 | 5 | 6 Next Page )
Page created in 0.019506 seconds.


Copyright © 2000 - 2024 Palestar Inc. All rights reserved worldwide.
Terms of use - DarkSpace is a Registered Trademark of PALESTAR