Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Compiling under Linux
Re: Compiling under Linux Sun, 22 January 2006 22:39 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
Madman wrote on Mon, 23 January 2006 03:02

Eye candy is fine, as long as it doesn't get in the way of usability.
Why to argue about how cool the current interface is. When i saw stars demo first ... was it 1993? I remember fuel was 4th mineral to mine ... i was very amazed what a nice game can be made under Windows. Now its getting somewhat old. Plain eye candy is just the simplest way to burn processor power and i think it often annoys. I wasnot talking about such. Smile

Refreshing trick that may make UI useful and cool to look at is to have some adjustable halfdecent advisors, tools like battle simulator, hints and animated/colored analyse screens (Xtreme Borders +). Nod 16 colors? It is 2 decades old style. Like LEit already said it is probably most accurate and simple to use turn generator code for most of such things and calculations.

Python is OK for simple tools. It is easy to let some macro scripting. Let players to script things and extend the client sounds cool at first. OTOH ... forcing players to program on case they want to win is questionable way to go. Confused If UI is made such that winning depends on "who scripts better?" question then it may cut player base down fast. Rolling Eyes Freestars is open source, UI-s may be more than one and there will be probably scriptable UI anyway. In order to pare its hypotetic wings the C++ UI must be cooler. Wink

AI support with intuitive interface (lets say for example that it can do most pop and mineral management at intermediate level) on other hand makes stars lot better game. Stars is a complex problem, dunno if python is fine enough. Wink For example huge is 2000x2000 board and the player who competes about victory usually got similar amount of planets like chess game got squares, nothing to talk of minefields, fleets or even ships. Cool


[Updated on: Sun, 22 January 2006 22:42]

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 00:35 Go to previous messageGo to next message
Madman is currently offline Madman

 
Officer Cadet 1st Year

Messages: 228
Registered: November 2003
Location: New Zealand
Kotk wrote on Mon, 23 January 2006 16:39

Refreshing trick that may make UI useful and cool to look at is to have some adjustable halfdecent advisors, tools like battle simulator, hints and animated/colored analyse screens (Xtreme Borders +). Nod 16 colors? It is 2 decades old style.

Yes, certainly there can be lots of things that can be improved - one of my thoughts was also to put all the Xtreme Borders stuff and more in the client.

Quote:

Python is OK for simple tools. It is easy to let some macro scripting. Let players to script things and extend the client sounds cool at first. OTOH ... forcing players to program on case they want to win is questionable way to go. Confused If UI is made such that winning depends on "who scripts better?" question then it may cut player base down fast. Rolling Eyes Freestars is open source, UI-s may be more than one and there will be probably scriptable UI anyway. In order to pare its hypotetic wings the C++ UI must be cooler. Wink

Well, you can't stop people either scripting or enhancing with open source tools - I know that if I'm ever involved in such a game with an open source client, I'll start making 'improvements' to reduce MM, like for instance dynamically tweaking the factories/mines/terraforming queue on each planet each turn to maximize overall resources. It's nothing that couldn't be done (painfully) by hand, but it sure is faster to have a program to do it. Unless the client is written in Perl (I am joking here Laughing) which I regard as a write-only language.

I also agree that C++ is the best option for a client, simply on the basis that shared code would prevent odd cases of the client and the server reporting different numbers. If I was starting Freestars from scratch, my choice would probably be Java, but best use what we already have Rolling Eyes

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 01:40 Go to previous messageGo to next message
crr65536 is currently offline crr65536

 
Chief Warrant Officer 3

Messages: 180
Registered: June 2005
If I write a client, I will probably write it in Python, simply because I've been looking at Python for a while and wanting to write something cool for it. Very Happy Part of the code, like the elements you mentioned, would probably be ported directly from the server code, but I think the time savings from using the higher-level language for the rest of it would balance the time lost porting the existing code to Python. Razz

I think PYthon scripting of in-game mechanics is to be avoided - even simple scripting would push the game too far in the "Stars is a programming contest" direction. I was thinking automation would be built into the client - I particularly liked the idea of advisors which can do simple MM for developing colonies. I was thinking things along the lines of "auto build ships" for the production queue, "Find best planet not targeted by a colonizer" for colonizers, etc.

One very important thing to keep in mind, IMHO, is to get it functional *first*, and add features later. I believe the future of Stars lies in FreeStars (especially if Empire has indeed stopped selling the game) and the sooner a working version is released, the more people can be preserved in the community.

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 03:20 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
Madman wrote on Mon, 23 January 2006 07:35

Well, you can't stop people either scripting or enhancing with open source tools - I know that if I'm ever involved in such a game with an open source client, I'll start making 'improvements' to reduce MM, like for instance dynamically tweaking the factories/mines/terraforming queue on each planet each turn to maximize overall resources. It's nothing that couldn't be done (painfully) by hand, but it sure is faster to have a program to do it.

Sure. Major target audience however are the non-programmers. They just want to play a game and have fun. Very Happy Explore, expand and what there was... in sci fi style and NOT painfully. TBS got its forgotten plusses it gives time to think, negotiate and roleplay. No reflexes needed. Wink We got to avoid: reproducing them skeleton UI in a 2 decades old 16 color graph + spreadsheets fashion Confused extending it with sophisticated possibilities to script the details Surprised and leave painful loads of unassisted MM in. Sad It will probably not attract much players and we simply waste our efforts if we emphasise on developing such thing. Wink
crr65536 wrote on Mon, 23 January 2006 08:40

I think PYthon scripting of in-game mechanics is to be avoided - even simple scripting would push the game too far in the "Stars is a programming contest" direction.

Like Madman said you got no way to stop it. Python program is a text file, open source too so anyone can edit it and you cannot avoid them to script it whatever you do. Only way is to provide good enough assistants so its competive without need to script.


[Updated on: Mon, 23 January 2006 03:28]

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 06:14 Go to previous messageGo to next message
Madman is currently offline Madman

 
Officer Cadet 1st Year

Messages: 228
Registered: November 2003
Location: New Zealand
crr65536 wrote on Mon, 23 January 2006 19:40

If I write a client, I will probably write it in Python, simply because I've been looking at Python for a while and wanting to write something cool for it. Very Happy Part of the code, like the elements you mentioned, would probably be ported directly from the server code, but I think the time savings from using the higher-level language for the rest of it would balance the time lost porting the existing code to Python. Razz

If it was just the porting time, I'd agree with you (and I'd be off writing a Java client). There's also correctness and maintainability though. You really don't want to have the client say there is enough fuel for a trip and the server say no, or have a client say 2 years for a trip when the server says 3 (this sometimes happens in Stars! btw). And you'd better be prepared to _exactly_ track any changes or bug-fixes that get made to the server.

On the other hand, having a client is better than not having a client, and if you could get something usable out quickly, then good luck to you. Open source works by people doing the things they are interested in. I'd regard something like that as something interim until there is a C++ client though.

crr65536 wrote on Mon, 23 January 2006 19:40

One very important thing to keep in mind, IMHO, is to get it functional *first*, and add features later. I believe the future of Stars lies in FreeStars (especially if Empire has indeed stopped selling the game) and the sooner a working version is released, the more people can be preserved in the community.


Agree completely, even if we have to cut the odd corner to get there (as long as we _know_ which coners we cut so we can get back to them).

Kotk wrote on Mon, 23 January 2006 21:20

crr65536 wrote on Mon, 23 January 2006 08:40

I think PYthon scripting of in-game mechanics is to be avoided - even simple scripting would push the game too far in the "Stars is a programming contest" direction.

Like Madman said you got no way to stop it. Python program is a text file, open source too so anyone can edit it and you cannot avoid them to script it whatever you do. Only way is to provide good enough assistants so its competive without need to script.

Well, the fair way is for those of us who can write scripts like that to contribute them back so anyone can use them ... they might eventually become part of the advisers, and if they get powerful enough, could be of some use in creating an AI. It might change the game a but if _everyone_ is optimizing their planet queues, or only loading freighters up enough that they can make the trip back without cargo, but losing MM is a good thing IMO - it might even make the game more accessible for the non number-crunchers.

A fun (but side) project would be to create an AI that duplicates my play-style (without the mistakes) as much as possible.

Another idea I've had is to create a strategy game that _encourages_ script writing, even to the point of having the game engine run some of the scripts. That is a completely different project than Freestars though.

Now back to the real world ...

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 06:26 Go to previous messageGo to next message
gible

 
Commander

Messages: 1343
Registered: November 2002
Location: Wellington, New Zealand

you can't make use of a c++ written executable from python? I'm suprized. I know you can with java...not that I've done it so I'm unaware of any complications of doing so.

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 06:42 Go to previous messageGo to next message
Madman is currently offline Madman

 
Officer Cadet 1st Year

Messages: 228
Registered: November 2003
Location: New Zealand
gible wrote on Tue, 24 January 2006 00:26

you can't make use of a c++ written executable from python? I'm suprized. I know you can with java...not that I've done it so I'm unaware of any complications of doing so.

Well, I'm sure you can make C++ executable from Python, but it's adding a whole new level of complication, is likely to be a source of bugs, and is very very unlikely to be cross platform.

I suppose one solution would be to have a copy of the server locally, and feed it some sort of XML message (this would require extra code in the server to handle client queries and probably a socket interface, such as "what is the fuel use for this fleet with this race and this cargo to go between these two points?", or (for the battle simulator) "given these two sides of ships, return the result of a battle") and look at the responses, but unless done very carefully, that would be _s_l_o_w_.

As for JNI (how you call native code from java), don't even get me started. I think I looked at it once, and ever since then, any time I get the urge to write something in two languages with any connection stronger than sending strings over sockets, I beat myself around the head (believe me, it is far less painful than JNI) and change the language of one of the parts so they are the same. Languages with different memory models trying to talk with each other about anything non-trivial is a major nightmare, unless you absolutely don't have a choice.

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 06:47 Go to previous messageGo to next message
Madman is currently offline Madman

 
Officer Cadet 1st Year

Messages: 228
Registered: November 2003
Location: New Zealand
Madman wrote on Tue, 24 January 2006 00:42

I suppose one solution would be to have a copy of the server locally, and feed it some sort of XML message (this would require extra code in the server to handle client queries and probably a socket interface, such as "what is the fuel use for this fleet with this race and this cargo to go between these two points?", or (for the battle simulator) "given these two sides of ships, return the result of a battle") and look at the responses, but unless done very carefully, that would be _s_l_o_w_.

Now I've written it down, I actually like that idea in some ways ... if we really want lots of different clients, this makes kind of a perverse sense, as a copy of the server still gets to handle the game logic.

I'll now go and put a kevlar helmet on for when _other_ people want to beat me around the head Cool


[Updated on: Mon, 23 January 2006 06:49]

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 11:46 Go to previous messageGo to next message
crr65536 is currently offline crr65536

 
Chief Warrant Officer 3

Messages: 180
Registered: June 2005
It is possible - and relatively straightforward, to make C++ extensions to python - this is described in PYthon's extending/embedding FAQ. However, I would avoid it, at least initially, if possible, since it would make porting somewhat harder (need to get the shared libraries in the right places for the right systems, as they are the mechanism used by Python for extending it).

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 14:03 Go to previous messageGo to next message
Madman is currently offline Madman

 
Officer Cadet 1st Year

Messages: 228
Registered: November 2003
Location: New Zealand
crr65536 wrote on Tue, 24 January 2006 05:46

It is possible - and relatively straightforward, to make C++ extensions to python - this is described in PYthon's extending/embedding FAQ. However, I would avoid it, at least initially, if possible, since it would make porting somewhat harder (need to get the shared libraries in the right places for the right systems, as they are the mechanism used by Python for extending it).


Getting one languages to _connect_ to each other is straightforward enough (although always going to be riddled with cross platform issues), the real issues come when you try and do something non-trivial - like returning a data structure, how is allocation/deallocation handled? Maybe it's just the cases I've looked at - calling C from a garbage collected language - were uncharacteristically nasty.

Report message to a moderator

Re: Compiling under Linux Mon, 23 January 2006 14:15 Go to previous message
Orion

 
Crewman 2nd Class

Messages: 15
Registered: November 2005
Location: Strasbourg, France
Madman wrote on Fri, 20 January 2006 16:34


At the moment, many Linux users that think about contributing are going to follow the instructions:

./configure
make



This is only true for code that is distributed in a tar.gz file. Code coming from CVS is not meant to be compiled this way. It needs the autotools (which are only installed when you develop).

What can be done to help, is to put a scrip, called "bootstrap" eg, that contains the calls to aclocal, autoheader, etc... (another post shows the exact sequence).

Of course, it would also be nice to have a distribution, having tinyxml included, which could be generated by 'make dist' (even if the Client is not included). This would then include a 'configure' script.

Orion

Report message to a moderator

Previous Topic: Open source client?
Next Topic: Client feature request
Goto Forum:
  


Current Time: Fri May 03 22:33:06 EDT 2024