aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - smerch

Pages: [1]
1
Programming / Re: Implemented: Funding nations and activity scores
« on: December 07, 2012, 12:44:23 am »
OK. I'm on it. ASAP.
I have only one question left. May I change class GraphState in some way or should I stick to recent implementation (properties, methods, etc.)?
Be cause I don't want to break anything but in sake of refactoring some entities might gone.

2
Programming / Re: Implemented: Funding nations and activity scores
« on: December 04, 2012, 12:34:12 am »
Warboy1982, I have looked in to GraphState.cpp and find out that a bit of refactoring wont hurt as well as some tweaks. WDYT?

For example.
In original game the main formula to calculate scale factor for graph is (my guess)
Code: [Select]
scale_factor = ln(max(Val1, Val2, ..., ValN)/9)/ln(scale) where Val1...ValN is maximum value for each region/country/etc throughout a year, and scale is the first value on the scale of current graph, i.e. 50 for Income, 250 for Finance and 10 for rest. Pay attention, that these scale values ​​are the default values ​​that are used when no button is pressed. And also, scale factor is calculated only for currently visible values (whose buttons are pressed). So values on scale depends on scale factor and based on scale base (mentioned above).

So. Should I post a patch here or make a push request?

P.S. I'm not familiar with an english terminology, so if I screw it up somehow - I beg your pardon.

3
Programming / Re: Battlescape Hotkeys
« on: December 01, 2012, 10:06:34 pm »
Me too. But it worth the effort, so I can join in (to help).

4
Programming / Re: Battlescape Hotkeys
« on: December 01, 2012, 08:19:19 pm »
Tripp, will it be hardcoded or configurable? If the latter will it be just a config file or hotkeys can be adjustable while in the game?

5
Programming / Re: Implemented: Funding nations and activity scores
« on: December 01, 2012, 04:45:21 pm »
After some thoughts, I came to conclusion that my code is a bit overkill and cpu intensive – so I made slightly simplified version
Code: [Select]
int _scale = 0; https:// just to make sure that _scale = 0

for(int check = roof/90; check > 0; check >>= 1)
++_scale;
if (_scale > 9) https:// top boundary
_scale=9;
_scale = (1 << _scale) * 100;

6
Programming / Re: Implemented: Funding nations and activity scores
« on: December 01, 2012, 03:25:21 pm »
Warboy1982, then
Code: [Select]
_scale = 1<<((int)(ln(floor(roof/90)+0.5)/ln(2))+1);

if(_scale > 512) https://top boundary
_scale = 512;

_scale *= 100;

P.S. I found some errors in my code, now it should work.

7
Programming / Re: Implemented: Funding nations and activity scores
« on: December 01, 2012, 12:17:59 am »
Warboy1982, you could try this
Code: [Select]
_scale = 1<<(int)(ln((int)(highest/90))/ln(2));

if(_scale > 16) https://first adjustment for 3400
_scale = 34;
else if(_scale > 32) https://final adjustment for 6800
_scale = 68;

_scale = _scale*100;

8
Programming / Re: Questions about code / design decisions
« on: November 24, 2012, 06:17:17 pm »
Quote
In Ubuntu yaml-cpp IS in the distribution, and I think it's also in Debian. Don't know about the others.

Not quite.
In Ubuntu the yaml-cpp package first released '2012-06-08' and it's available ONLY to Quantal and forth. The last LTS Precise Pangolin lacks that package so I have to made one for myself.

In Debian libyaml-cpp0.3 package first released '2012-06-03' for Wheezy.

So (strictly speaking) yaml-cpp library was adopted by Linux distributions a couple of months ago and considered experimental.

IMO it's better to base on technology that distributed and supported better.

9
Programming / Re: Questions about code / design decisions
« on: November 24, 2012, 02:11:09 am »
Speaking about linux and yaml.

Is yaml-cpp is better choice than libyaml?

Since libyaml is present in the repository of any decent linux distribution. So building and packaging the game will have less hassle.

Pages: [1]