PDA

View Full Version : Knight of Honor?


IWM
8 Aug 2007, 02:57
knight of honor created by C++
right?
Anyone can comfirmed this?

Mephistopheles
8 Aug 2007, 12:30
Every proper program was done in C++.

knez
8 Aug 2007, 23:10
Every proper program was done in C++.

not quite truth
for example Paint.NET was done in C# and Lime Wire in Java (second one is better not to use on weaker computers)

Mephistopheles
9 Aug 2007, 00:01
And that's why they aren't proper programs. :)

C# and Java are nice tools to get work done if you don't want to spend many thoughts about it. But it comes at the price of performance.
I write in java myself if it fits the goals of the project, but if I want a properly done program it has to be C++.
I know C++ can be a huge hassle and it takes ages to learn all its important concepts like prototyping with templates and has very dangerous pitfalls like manual memory control, but once understood it's immensily powerful while being imensily performant. While C++ isn't perfect I think it's the language that allows the programmer the best control over the program while maintaining readability and performance.

IWM
9 Aug 2007, 14:35
I forget to thank you,Mephi!
it really helps.
Ok then,I'll study C++ first.
(if someone of us really good in C++ maybe we can change the Knight of Honor so-called "HardCoded" file.Even they don't so hard.

IWM
10 Aug 2007, 16:21
it seems that i have found an .rle editor source code.Anyone can comfirmed this?


function data = rle(x)
% data = rle(x) (de)compresses the data with the RLE-Algorithm
% Compression:
% if x is a numbervector data{1} contains the values
% and data{2} contains the run lenths
%
% Decompression:
% if x is a cell array, data contains the uncompressed values
%
% Version 1.0 by Stefan Eireiner (<a href="mailto:stefan-e@web.de?subject=rle">stefan-e@web.de</a>)
% based on Code by Peter J. Acklam
% last change 14.05.2004

if iscell(x) % decoding
i = cumsum([ 1 x{2} ]);
j = zeros(1, i(end)-1);
j(i(1:end-1)) = 1;
data = x{1}(cumsum(j));
else % encoding
if size(x,1) > size(x,2), x = x'; end % if x is a column vector, tronspose
i = [ find(x(1:end-1) ~= x(2:end)) length(x) ];
data{2} = diff([ 0 i ]);
data{1} = x(i);
end

Thraka
22 Aug 2007, 04:39
You'll be surprised how many C# games are popping up here and there. For example, all 3 games here:
http://www.koiosworks.com/