Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » New stars! server clone proposal
New stars! server clone proposal Sat, 29 September 2007 20:13 Go to next message
yartrebo is currently offline yartrebo

 
Petty Officer 3rd Class

Messages: 43
Registered: July 2006
Location: North America
I'm busy writing the plans for a C-based stars! server. I intend it to work how the original game works, but I don't intend to copy real bugs or rounding errors.

If there are things that could be improved easily, I wouldn't mind doing so, such as improving pursuit of split fleets (my idea is to give the client the choice to either follow the largest piece or to split up her/his fleet and chase all the pieces).

Would it be useful to give the host the option of easing limits such as 512 fleets, 32k ships/fleet, 16 ship designs/player, max tech is 26, and so on?

Does anyone know what's going on with freestars! and if such a project would be useful? I do not believe it would take too long to code (a week or so full-time equivalent) as stars! itself has been very well reverse engineered and it appears to be straightforward code.

Report message to a moderator

Re: New stars! server clone proposal Sun, 30 September 2007 03:54 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
I wonder if Java could be a more interesting platform, at least for portability, and perhaps even for multithreading and all that. Sherlock

Also, the BattleBoard looks like one tricky piece of code. Wall Bash Whip



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: New stars! server clone proposal Sun, 30 September 2007 11:34 Go to previous messageGo to next message
yartrebo is currently offline yartrebo

 
Petty Officer 3rd Class

Messages: 43
Registered: July 2006
Location: North America
Quote:

I wonder if Java could be a more interesting platform, at least for portability, and perhaps even for multithreading and all that.

C using only standard C libraries (stdio.h, stdlib.h, string.h according to my plans) is extremely portable. Any computer with a C compiler and a modicum of resources (32-bit CPU and a few MB of RAM) can compile and run it. While Java is portable, I am far less skilled with it and it is proprietary, so I am disinclined to use it.

Multiple threads are useless for a stars! server or client, as they do not connect to the internet or do more than one thing at once. A single threaded program is the way to go.

PS: C can use multiple threads/processes, though this will limit portability (DOS is out of the question, Linux works without issues, not sure about MS Windows).

Quote:

Also, the BattleBoard looks like one tricky piece of code.

Most certainly the hardest piece of code, though I feel up to the challenge.


[Updated on: Sun, 30 September 2007 11:36]

Report message to a moderator

Re: New stars! server clone proposal Sun, 30 September 2007 14:43 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
yartrebo wrote on Sun, 30 September 2007 17:34

C using only standard C libraries (stdio.h, stdlib.h, string.h according to my plans) is extremely portable. Any computer with a C compiler and a modicum of resources (32-bit CPU and a few MB of RAM) can compile and run it. While Java is portable, I am far less skilled with it and it is proprietary, so I am disinclined to use it.


Heh. My own thoughts, almost literally. Sherlock Whip

Plus, I also dislike dependencies, useful as they can be. Rolling Eyes


Quote:

Multiple threads are useless for a stars! server or client, as they do not connect to the internet or do more than one thing at once. A single threaded program is the way to go.

PS: C can use multiple threads/processes, though this will limit portability (DOS is out of the question, Linux works without issues, not sure about MS Windows).


I think a serious server, or at least one running a big galaxy, could get some benefit from the various independent calculations that can be carried on more-or-less simultaneously. Teleport

I've been thinking about a stand-alone C-based server for some time, but never got much farther than a rough specification of all the myriad parts/gears it would need for decent Stars! emulation, as one of my design goals would be a certain amount of moddability. Twisted Evil

I got a nice universe generation too. Cool



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: New stars! server clone proposal Sun, 30 September 2007 15:51 Go to previous messageGo to next message
yartrebo is currently offline yartrebo

 
Petty Officer 3rd Class

Messages: 43
Registered: July 2006
Location: North America
Quote:

I got a nice universe generation too.

Would you mind sharing your algorithm(s)? I was planning on only doing the basic stars! generation, but it's more for a lack of ideas than for it being particularly difficult.

Report message to a moderator

Re: New stars! server clone proposal Mon, 01 October 2007 04:53 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
yartrebo wrote on Sun, 30 September 2007 21:51

Would you mind sharing your algorithm(s)? I was planning on only doing the basic stars! generation, but it's more for a lack of ideas than for it being particularly difficult.


Well, generating the coordinate distributions isn't actually hard, at least for "classical" shapes like rectangles, rings, globular clusters and spiral galaxies. The main issues are eliminating those coordinates too close to others and automatically placing the HomeWorlds, and I do both by mostly brute-force. Rolling Eyes Whip

The hardest is (to me) to find a good enough way for the game creator to specify how the galaxy should be created, by using criteria such as:

Deal overall star density, not just size, particularly for non-rectangular galaxies, or where there's more than one shape involved (say, 4 squares inside a ring)
Deal non-standard HW placement (for example, in spirals, or scenario games)
Deal generally, how to specify which galaxy you want without needing to use an endless set of numbers...

Perhaps you'll be better off by sticking to standard shapes 1st and waste time on candy later when everything else is already rolling. Sherlock

But it would be nice if your "engine" had room for that candy from its inception. Twisted Evil



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: New stars! server clone proposal Mon, 01 October 2007 11:40 Go to previous messageGo to next message
yartrebo is currently offline yartrebo

 
Petty Officer 3rd Class

Messages: 43
Registered: July 2006
Location: North America
Quote:

Perhaps you'll be better off by sticking to standard shapes 1st and waste time on candy later when everything else is already rolling.

But it would be nice if your "engine" had room for that candy from its inception.

I think you're right. As far as the engine goes, I'm planning on writing a simple engine that only handles standard stars! generation (random distribution, min distance between planets, optional clustering, brute force HW assignment). It won't take too long to write (less than 3 hours) so it won't represent much lost investment if or when I ever do get around to allowing more complex generation.

Report message to a moderator

Re: New stars! server clone proposal Wed, 24 October 2007 15:55 Go to previous message
sirgwain is currently offline sirgwain

 
Senior Chief Petty Officer

Messages: 86
Registered: March 2004
Location: Tucson
I don't really want to start over on my Stars! clone, but been thinking about what it would take to do a webserver Stars! What is more multiplatform than a web browser? The client side part of it would be complicated, but AJAX is making web application much more enjoyable to use. I'm not sure how to draw the map and interact with it without using flash or hairy javascript though.

The server side should be basically the same, except for the communication with the client. It would be cool to design a server to support multiple games and user accounts and all that. That's an enterprise level game for you. Smile

Report message to a moderator

Previous Topic: Just a Clone?
Next Topic: Efficient Algorithm for Scanning planets/fleets/etc.
Goto Forum:
  


Current Time: Thu Mar 28 12:36:59 EDT 2024