Difference between revisions of "Source Code"
From BotF2-Wiki
(Visual Studio Express 2013 == use latest version (Express version is free)) |
(→Visual Studio Express 2013) |
||
Line 13: | Line 13: | ||
*old source code can be taken from here: http://BotF2.codeplex.com/ (last upload from MStrobel at 03.01.2011) | *old source code can be taken from here: http://BotF2.codeplex.com/ (last upload from MStrobel at 03.01.2011) | ||
− | |||
− | |||
− | |||
− | |||
== Changes == | == Changes == |
Revision as of 11:03, 13 January 2014
Source Code
- last source code https://bitbucket.org/mstrobel/BotF2/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 BotF2.Game.GameEngine is where you'll find most of the game logic. That's where most of the turn processing happens.
- The BotF2Core project is where you'll find the foundation of the game.
- BotF2Service is just the game server (all the important bits it interacts with are in BotF2Core).
- BotF2ClientComponents is UI infrastructure.
- BotF2UI and BotF2WPF are older UI infrastructure stuff, much of which has been phased out and replaced by newer and better stuff in BotF2ClientComponents. The most interesting stuff in BotF2UI is GalaxyGridPanel, which draws the galactic map. It also has the spinning planet views.
- BotF2.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.
- BotF2.Scripting is an expression language parser/compiler.
- BotF2Client is the main graphical client and has most of the game screen implementations.
- old source code can be taken from here: http://BotF2.codeplex.com/ (last upload from MStrobel at 03.01.2011)
Changes
see here or https://bitbucket.org/mstrobel/BotF2/commits/branch/default
some code
where | Folder | File | Function | empty | Description | Custom1 | Custom2 |
---|---|---|---|---|---|---|---|
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 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)