FreeOrion

Forums for the FreeOrion project
It is currently Wed Dec 13, 2017 5:09 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 posts ] 
Author Message
PostPosted: Tue Apr 14, 2009 12:18 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
This is a bit of an inconcise ramble, but I'm hoping some suggestions will be made about how best to deal with the following issues:

I was thinking about setting up a proper detection system, but realized that almost everything in the game universe has a zero detection meter right now. This is difficult to fix with the current way things are set up. There could be a tech that grants +5 to detection, but they every player would have to reserach it, and would have no detection before doing so. Ships could be given default detection levels, perhaps in their hull descriptions, but then planets would have no dection. A building, like the the imperial palace, might grant such bonuses, but would need to be built in game, or automatically created at the start of the game, which would itself need to be hard-coded.

In a somewhat related matter, it is necessary, or at least very useful, to have a few building types, ship parts and hulls unlocked by default at the start of the game. Currently the only way to this is to hard code their names into the C++ empire creation functions, which is rather limiting and inflexible.

Having a way to make techs not researchable could be useful for doing some of the above. Techs can unlock buildings, parts and hulls, and granting every empire an initial starter tech that's not researchable or otherwise treated like a normal tech could do a lot. Unresearchable techs could also be granted to players for things like finding ancient knowledge in ruins, which shouldn't be available without finding something to unlock it in-game. Currently there is no way to have an unresearchable tech.

Some of those uses for unresearchable techs could be done with pre-researched techs granted at the start of a game. However, it should be possible to give different empires different such techs, without a way for them to research other empires' such techs. A flag for tradeability in tech definitions would also be useful or necessary in this context, if researchability doesn't imply tradeability.

There could also be a tech-like but not technically a tech way to do this. An "empire-wide effects dump" object that's just like a tech, but isn't one officially, so can't be a prereq for other techs, and doesn't appear on the tech screen. Modifying the tech system might be easier than making a new object of this sort, though.

Alternativley, this role could be filled by "governments" in-game, where a governement would be like a tech, but applied or not applied to an empire depending on player settings. Or, governments could be just a label, like a focus setting, with various bonuses applied like is done for focus settings. This would be useful for setting base detection meter levels, but not immediately appliable for unlocking things, and we won't be really designing "governements" for a few versions.

Presently, techs can already unlock buildings, ship parts and hulls, and techs can require other techs to be known as prereqs. There's no way to lock or unlock anything by other means, such as owning a building. Techs can never be "locked" at present.

There could be flags in tech, hull, part or building definitions that specify that the content is or isn't unlocked at the start of the game. Techs would probably default to unlocked, and buildings, ship parts and hull would default to locked, which is all how it works now. This wouldn't grant techs or tech-like objects to empires at the start of the game, but would be useful for avoiding hard-coding unlocking things. It's probably preferable to unlock or lock things outside of their definitions, though. Different races or empires or game settings would be better at determining what is unlocked at the start of the game than the definitions themsleves.

Unlocking could work for techs much like it does for building types, part types and hull types... Techs would have to have all prereqs researched and be unlocked to be researchable. (Whereas buildings, parts and hulls need to be unlocked and have a build location that meets its location condition). In this scenario, techs that never should be researchable in a game would never get unlocked by anything in the available content. Never-unlocked techs could still be be granted or revoked by effects GiveTechToOwner and RevokeTechFromOwner like is done now.

Any thoughts?


Top
 Profile  
 
PostPosted: Wed Apr 15, 2009 12:49 am 
Offline
Creative Contributor
User avatar

Joined: Sat Sep 13, 2003 6:52 pm
Posts: 1396
Well to answer one of the simpler parts of the post.

Base Detection:
For ships= Stored in hull type + Modifiers
For Planets=Construction meter/?10? + Modifiers


Top
 Profile  
 
PostPosted: Wed Apr 15, 2009 3:27 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Krikkitone wrote:
Well to answer one of the simpler parts of the post.

Base Detection:
For ships= Stored in hull type + Modifiers
For Planets=Construction meter/?10? + Modifiers

That doesn't really answer any part of the post... The issue isn't whether ships should have detection from their hulls and/or other places, nor what other meters, if any, should influence planets' detection meters.

Rather, this is a set of related questions about part design and part implementation issues. The detection-related stuff is about what part of the game content should contain detecton-modifying effects (not what they do or depend on).


Top
 Profile  
 
PostPosted: Wed Apr 15, 2009 1:23 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
I don't have an answer for you(obviously) and I think only someone with decent knowledge about how the code is organized and works will be able to really help you out. Not sure who this would be, besides Zach. Have you thought about asking this in a forum for programmers?


Top
 Profile  
 
PostPosted: Wed Apr 15, 2009 2:17 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
This isn't really a programming problem. It's really more of a very detailed design issue... The issues are mostly about how to organize the content and what should depend on what and what (content) should be defined or set where and how. Any answer to this depends mainly on the specifics of FreeOrion's design and the ways we've set up content so far. Actually implementing most reasonable solutions won't be difficult.

I was just going to email tzlaine to discuss this, but right before I sent it, I thought I might as well tweak it slightly and put it up on the forums in case anyone else had some suggestions or comments.


Top
 Profile  
 
PostPosted: Tue Apr 28, 2009 7:20 pm 
Offline
Space Floater
User avatar

Joined: Sun Jan 09, 2005 4:00 am
Posts: 43
Location: Canada
I am not a programmer, so please forgive me if I mess up the lingo, but I am a game designer who has worked with programmers on similar problems.

This is a suggestion for part of the second half of your question.

One thing I have done to give flexible, quasi-random starting resources to players in my game is to create a "value pool".

By this I mean you take your starting technologies, and assign them a "quality" rating between one and ten, and then program the empire generator to give you starting technologies of the total value of X or less. You can make it so that the picking algorithm doesn't repeat tech categories.

This will mean that everyone starts with different techs, but an equivalent "value" of tech.

The system can be applied to all sorts of things, such as the quality of you starting planet, resources etc. It also makes it easier to set up a "high resource start" vs a "low resource start"; you just increase or decrease total value that the algorithm uses to pick your starting resources.

EDIT: I just realized that rating tech (and other things) by quality is easy in a game like Free Orion: You techs are already value rated by research cost. If a tech takes 50 RP to research, it must be judged as "better" than a tech that takes 40 RP to research. You could just give your empire Builder a pool of RP and PP and money and tell it to buy a variety of things.

_________________
Professor Hernandez, Human ambassador to Silica:
"Hey, rocks are people too!"
Black Dawn


Top
 Profile  
 
PostPosted: Thu Apr 30, 2009 6:20 pm 
Offline
Creative Contributor
User avatar

Joined: Sat May 26, 2007 8:05 pm
Posts: 576
Couldn't you just give every empire a starting tech that covers a verity of things: "Space Exploration" could provide all the ship parts you need for example.


Top
 Profile  
 
PostPosted: Thu Apr 30, 2009 6:40 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
Tortanick wrote:
Couldn't you just give every empire a starting tech that covers a verity of things: "Space Exploration" could provide all the ship parts you need for example.

That would be useful, as noted...
the first post of the thread wrote:
Some of those uses for unresearchable techs could be done with pre-researched techs granted at the start of a game.

This would let us unlock parts and buildings at the start of a game, and give lots of base-level bonuses, like planet and ship detection at the start of the game.

The issue remains though, of how to grant this tech. It could be hard-coded into C++, but this means that every modification of techs.txt would have to have this tech present, making modding a bit more difficult. This is much better than hard-coding 5 ship parts, 2 hulls, 5 buildings, and perhaps more, though, all of which currently have to be present, making modding even more difficult in the current arrangement. A hard-coded tech would still appear on the research screen, though, which might be a bit confusing ("What's the 'Basic Level Everything' tech for, and why do I already have it?"), which isn't really an issue with auto-unlocked buildings or ship parts.


Top
 Profile  
 
PostPosted: Thu Apr 30, 2009 7:23 pm 
Offline
Space Dragon
User avatar

Joined: Thu Oct 02, 2008 11:00 pm
Posts: 339
Location: Slovakia
If tech or building is unlocked at the start of game shouldn't be specified in techs.txt, because every empire can have different starting techs. It isn't also proper to do it in C++ because it is not easy to modify it later. When scenario will be introduced after FO 1.0, it should be also possible to every scenario set researchable and avalaible techs and buildings.

Simply for this stage of development, avalaible techs and buildings in the beginning can be placed in own file where there will be list of them. When game starts, it loads from this file to list and then only used them from this list. Every effect or wonder can simple add or remove from this list which will be in game state. All required windows then have to be modified to take into account this list.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 8:20 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12041
Location: Munich
The question of how to unlock standard techs, buildings, ship hulls and ship designs was resolved by adding some text files as discussed here: viewtopic.php?p=36668#p36668

Black_Dawn's suggestions are interesting, but more complicated than what's needed for these issues, at least at this stage of development. I created a similar starting fleets text file, in the same post as above, that determines what ships playes are given at the start of the game. There's no variation from player to player with this system, though. Also, the starting buildings on the players' homeworlds are still hard-coded in C++, as is the environment and size of the homeworld, and the adding of the homeworld special to it. Eventually I'd like to replace all the universe generation code with a python script that can be easily modified, but that's getting off topic.

There is also a file that determines the ship designs players start with mentioned in the above-linked post, which are the only designs that can be in staring fleets. Most of these designs have a relatively new part I added (that needs an icon!), the Optical Scanner, which gives ships a base level of detection capability, so that empires will start with a bunch of objects with some detection. Getting more will require reserach and/or building stuff.

That all said / resolved, I'd still like to figure out a way to have various other effects acting on objects owned by empires. Non-researchable techs might work, and would be useful on their own as an interesting game feature, assuming techs can be granted to players other ways... Actually, after some recent changes, it's probably possible to grant a tech with an effect. No techs are unresearchable now, though... (Although there could be a tech with such a high cost that it's unresearchable in practice.)


Top
 Profile  
 
PostPosted: Thu May 21, 2009 2:44 pm 
Offline
Lead Designer Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:54 pm
Posts: 761
Location: Austin, TX
I don't usually think about questions like these in terms of an in-game explanation leading to a design choice (since we're usually inventing in-game fluff to explain our design choices) but in this case it might help.

Let's say you're a brand new spacefaring race. You've built the SS Aquitaine and it can actually fly to another whole star. You don't even know for a fact that anybody is out there. So how do you detect if anyone is out there? Fairly rudimentary means - you use your eyeballs, telescopes and your eyeballs, and maybe the SETI project. How do we represent this in game? Let's assume we have three 'theaters' where we care about who can detect what:

- A populated planet has a large number of eyeballs and telescopes and radio telescopes, even if they're 'low-tech' by Space Opera standards. As technology grows, large, planet-based (or orbital) installations are probably always going to be a lot better at detecting something than a spaceship. So let's say that every populated star system has the ability to detect, out of the starting gate, anything in its own star system and in a neighboring system -- assuming that those things aren't invisible for some reason (cloaks, stealthy hulls, whatever you want).

- A fleet is going to have a sort of amalgamated ability to detect nearby stuff. If a fleet has twenty ships and each ship has a basic ability to detect things with (eyeballs + relevant tech), then the fleet as a whole certainly isn't 20x as good as a single ship, but its ability to detect things probably increases asymptotically -- 2 ships are a lot better than 1 and 4 are a lot better than 2 but 32 may not be a whole heckuvalot better than 16, et cetera.

- Tactically, once you go from 'here are my empire' mode to 'omg we're in combat' mode, detection is pretty different, and that's probably best addressed in a separate question -- whether and how you'd have 'command ships' or AWACS-style ships whose job it is to expand the fleet's detection radius.

So, in other words, by the time you've built your empire's first SS Aquitaine, you can probably detect anyone who isn't bothering to cover their tracks, but only if they are a) very close, or b) very large. After that you need to spend some time and money on tech for it.

_________________
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!


Top
 Profile  
 
PostPosted: Thu May 21, 2009 2:45 pm 
Offline
Lead Designer Emeritus
User avatar

Joined: Thu Jun 26, 2003 1:54 pm
Posts: 761
Location: Austin, TX
Oh, yeah, and that means that we'd have to have buildings able to unlock tech. That's probably going to be necessary sooner or later anyway.

_________________
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!


Top
 Profile  
 
PostPosted: Sun Aug 30, 2009 7:41 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 2058
Location: Orion
It might be interesting to have different techs unlocked at the start of the game depending on the government type the player chooses.

Geoff the Medio wrote:
In a somewhat related matter, it is necessary, or at least very useful, to have a few building types, ship parts and hulls unlocked by default at the start of the game. Currently the only way to this is to hard code their names into the C++ empire creation functions, which is rather limiting and inflexible.
This is no longer the case, right? These are the kind of things that might be determined primarily by government type, and perhaps in part by some other racial picks as necessary.

Geoff the Medio wrote:
Some of those uses for unresearchable techs could be done with pre-researched techs granted at the start of a game. However, it should be possible to give different empires different such techs, without a way for them to research other empires' such techs. A flag for tradeability in tech definitions would also be useful or necessary in this context, if researchability doesn't imply tradeability.
I think that either researchability should definitely imply tradability, or else all techs should simply be tradable. Or, you could have certain race picks as a prerequisite for possessing such techs, like MoO2 did with advanced governments.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
PostPosted: Sun Aug 30, 2009 8:18 pm 
Offline
Graphics Lead Emeritus
User avatar

Joined: Mon Mar 08, 2004 6:17 pm
Posts: 1924
Location: 52°16'N 10°31'E
Bigjoe5 wrote:
Geoff the Medio wrote:
[...]Currently the only way to this is to hard code their names into the C++ empire creation functions, which is rather limiting and inflexible.
This is no longer the case, right?

There is a file now called preunlocked_items.txt which allows us to unlock techs, buildings and ship parts and hulls.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group