Difference between revisions of "Source Code"
(Changes to 2013-07-07) |
(→Source Code: http://guganeshan.com/blog/setting-up-git-and-tortoisegit-with-bitbucket-step-by-step.html) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Source Code == | == Source Code == | ||
+ | |||
+ | http://guganeshan.com/blog/setting-up-git-and-tortoisegit-with-bitbucket-step-by-step.html | ||
+ | |||
+ | === semi-official === | ||
+ | |||
+ | latest versions were made out of https://bitbucket.org/Bloodwurm/supremacydev/commits/all | ||
+ | |||
+ | === official === | ||
*last source code https://bitbucket.org/mstrobel/supremacy/overview (Visual C# Studio 2010) | *last source code https://bitbucket.org/mstrobel/supremacy/overview (Visual C# Studio 2010) | ||
**Mike's Post: build in [http://www.microsoft.com/downloads/dlx/en-us/ThankYou.aspx?FamilyID=75568AA6-8107-475D-948A-EF22627E57A5 VS2010] with .NET 4.0. You may need the [http://en.csharp-online.net/Download_Free_Microsoft_Visual_CSharp_.NET#Download_Microsoft_Visual_Studio_Async_Community_Technology_Preview_.28CTP.29 C# Async CTP]. http://botf2.star-trek-games.com/viewtopic.php?p=70790#p70790 | **Mike's Post: build in [http://www.microsoft.com/downloads/dlx/en-us/ThankYou.aspx?FamilyID=75568AA6-8107-475D-948A-EF22627E57A5 VS2010] with .NET 4.0. You may need the [http://en.csharp-online.net/Download_Free_Microsoft_Visual_CSharp_.NET#Download_Microsoft_Visual_Studio_Async_Community_Technology_Preview_.28CTP.29 C# Async CTP]. http://botf2.star-trek-games.com/viewtopic.php?p=70790#p70790 | ||
+ | **http://botf2.star-trek-games.com/viewtopic.php?p=70781#p70781 Supremacy.Game.GameEngine is where you'll find most of the game logic. That's where most of the turn processing happens. | ||
+ | *** The SupremacyCore project is where you'll find the foundation of the game. | ||
+ | *** SupremacyService is just the game server (all the important bits it interacts with are in SupremacyCore). | ||
+ | *** SupremacyClientComponents is UI infrastructure. | ||
+ | *** SupremacyUI and SupremacyWPF are older UI infrastructure stuff, much of which has been phased out and replaced by newer and better stuff in SupremacyClientComponents. The most interesting stuff in SupremacyUI is GalaxyGridPanel, which draws the galactic map. It also has the spinning planet views. | ||
+ | *** Supremacy.Xna is where the XNA/3D stuff is located--it's not used heavily yet, but it has some effects for the invasion screen, a newer star renderer, a 3D spinning ship renderer, etc. | ||
+ | *** Supremacy.Scripting is an expression language parser/compiler. | ||
+ | *** SupremacyClient is the main graphical client and has most of the game screen implementations. | ||
*old source code can be taken from here: http://supremacy.codeplex.com/ (last upload from MStrobel at 03.01.2011) | *old source code can be taken from here: http://supremacy.codeplex.com/ (last upload from MStrobel at 03.01.2011) | ||
Line 8: | Line 24: | ||
== Changes == | == Changes == | ||
− | === 2013- | + | see [[ChangeLog|here]] or https://bitbucket.org/mstrobel/supremacy/commits/branch/default |
+ | |||
+ | == some code == | ||
+ | |||
+ | |||
+ | {|class="wikitable sortable" | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |where | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Folder | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |File | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Function | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Date | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Description | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Custom1 | ||
+ | ! bgcolor="#dadada" style="border:4px solid #999999;padding:0.2em;padding-top:0.2em;" |Custom2 | ||
+ | |||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Game | ||
+ | |style=text-align:center|GameEngine.cs | ||
+ | |style=text-align:center|DoProduction(GameContext game) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | Raw Materials, Deuterium, Dilithium is collected cross over all colonies and used by all colonies | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Game | ||
+ | |style=text-align:center|GameEngine.cs | ||
+ | |style=text-align:center|DoShipProduction(GameContext game) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Orbital | ||
+ | |style=text-align:center|Shipyard.cs | ||
+ | |style=text-align:center|GetBuildOutput(int slot) | ||
+ | |style=text-align:center| [https://bitbucket.org/Bloodwurm/supremacydev/commits/1aafc8f6e47e9e3b9c20de79f2d02f197c023d63 2014-01-15] | ||
+ | |style=text-align:left| | ||
+ | just selects output (active?) and bonus (BonusType.PercentShipBuilding), since 2014-01-15 also case PopulationRatio or IndustryRatio | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Universe | ||
+ | |style=text-align:center|Colony.cs | ||
+ | |style=text-align:center|GetProductionOutput(ProductionCategory category) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | see last line, too ! | ||
+ | *Food: minimum 10 | ||
+ | *Research: | ||
+ | float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); | ||
+ | baseOutput = (int)(moraleMod * baseOutput); | ||
+ | *Industry: '''minimum 10 !''' | ||
+ | float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); | ||
+ | baseOutput = (int)(moraleMod * baseOutput); | ||
+ | *last line: return ((int)(baseOutput + (baseOutput * modifier.Efficiency)) + modifier.Bonus); | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Universe | ||
+ | |style=text-align:center|Colony.cs | ||
+ | |style=text-align:center|planet.HasFoodBonus (OutputModifier) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | if (planet.HasFoodBonus) | ||
+ | modifier.Efficiency += 0.15f; | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-Core | ||
+ | |style=text-align:center|Universe | ||
+ | |style=text-align:center|Colony.cs | ||
+ | |style=text-align:center|planet.HasEnergyBonus (OutputModifier) | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left| | ||
+ | if (planet.HasEnergyBonus) | ||
+ | modifier.Efficiency += 0.15f; | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |- | ||
+ | |style=text-align:left|S-ClientComp | ||
+ | |style=text-align:center|Views\GalaxyScreen | ||
+ | |style=text-align:center|GalaxyScreenView.cs | ||
+ | |style=text-align:center|GalaxyScreenView() | ||
+ | |style=text-align:center| | ||
+ | |style=text-align:left|GalaxyView Hotkeys Definition (see [[Hotkey]]s) | ||
+ | |style=text-align:left| | ||
+ | |style=text-align:left| | ||
+ | |||
+ | |} | ||
+ | |||
+ | == Visual Studio Express 2013 == | ||
+ | |||
+ | use latest version (Express version is free) http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop | ||
+ | |||
+ | == Visual C# 2010 == | ||
+ | |||
+ | build in [http://www.microsoft.com/downloads/dlx/en-us/ThankYou.aspx?FamilyID=75568AA6-8107-475D-948A-EF22627E57A5 VS2010] with .NET 4.0. You may need the [http://en.csharp-online.net/Download_Free_Microsoft_Visual_CSharp_.NET#Download_Microsoft_Visual_Studio_Async_Community_Technology_Preview_.28CTP.29 C# Async CTP]. | ||
− | + | <img>http://supremacy.square7.ch/wiki-files/images/Supremacy-MicrosoftVisualC2010Express.jpg</img> | |
− | + | == .Net == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | you should use latest [http://www.microsoft.com/net .Net-version] (2014: version 4.5.1) | |
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 18:21, 18 January 2014
Contents
Source Code
http://guganeshan.com/blog/setting-up-git-and-tortoisegit-with-bitbucket-step-by-step.html
semi-official
latest versions were made out of https://bitbucket.org/Bloodwurm/supremacydev/commits/all
official
- last source code https://bitbucket.org/mstrobel/supremacy/overview (Visual C# Studio 2010)
- Mike's Post: build in VS2010 with .NET 4.0. You may need the C# Async CTP. http://botf2.star-trek-games.com/viewtopic.php?p=70790#p70790
- http://botf2.star-trek-games.com/viewtopic.php?p=70781#p70781 Supremacy.Game.GameEngine is where you'll find most of the game logic. That's where most of the turn processing happens.
- The SupremacyCore project is where you'll find the foundation of the game.
- SupremacyService is just the game server (all the important bits it interacts with are in SupremacyCore).
- SupremacyClientComponents is UI infrastructure.
- SupremacyUI and SupremacyWPF are older UI infrastructure stuff, much of which has been phased out and replaced by newer and better stuff in SupremacyClientComponents. The most interesting stuff in SupremacyUI is GalaxyGridPanel, which draws the galactic map. It also has the spinning planet views.
- Supremacy.Xna is where the XNA/3D stuff is located--it's not used heavily yet, but it has some effects for the invasion screen, a newer star renderer, a 3D spinning ship renderer, etc.
- Supremacy.Scripting is an expression language parser/compiler.
- SupremacyClient is the main graphical client and has most of the game screen implementations.
- old source code can be taken from here: http://supremacy.codeplex.com/ (last upload from MStrobel at 03.01.2011)
Changes
see here or https://bitbucket.org/mstrobel/supremacy/commits/branch/default
some code
where | Folder | File | Function | Date | Description | Custom1 | Custom2
|
---|---|---|---|---|---|---|---|
S-Core | Game | GameEngine.cs | DoProduction(GameContext game) |
Raw Materials, Deuterium, Dilithium is collected cross over all colonies and used by all colonies |
|||
S-Core | Game | GameEngine.cs | DoShipProduction(GameContext game) | ||||
S-Core | Orbital | Shipyard.cs | GetBuildOutput(int slot) | 2014-01-15 |
just selects output (active?) and bonus (BonusType.PercentShipBuilding), since 2014-01-15 also case PopulationRatio or IndustryRatio |
||
S-Core | Universe | Colony.cs | GetProductionOutput(ProductionCategory category) |
see last line, too !
float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); baseOutput = (int)(moraleMod * baseOutput);
float moraleMod = _morale.CurrentValue / (0.5f * MoraleHelper.MaxValue); baseOutput = (int)(moraleMod * baseOutput);
|
|||
S-Core | Universe | Colony.cs | planet.HasFoodBonus (OutputModifier) |
if (planet.HasFoodBonus) modifier.Efficiency += 0.15f; |
|||
S-Core | Universe | Colony.cs | planet.HasEnergyBonus (OutputModifier) |
if (planet.HasEnergyBonus) modifier.Efficiency += 0.15f; |
|||
S-ClientComp | Views\GalaxyScreen | GalaxyScreenView.cs | GalaxyScreenView() | GalaxyView Hotkeys Definition (see Hotkeys) |
Visual Studio Express 2013
use latest version (Express version is free) http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop
Visual C# 2010
build in VS2010 with .NET 4.0. You may need the C# Async CTP.
.Net
you should use latest .Net-version (2014: version 4.5.1)