Map Database  •  FAQ  •  RSS  •  Login

KaM Remake -> Multiplayer Demo out!

<<

Xmasjos

Farmer

Posts: 21

Joined: 29 Dec 2009, 23:00

Location: Netherlands

Post 03 Jan 2010, 11:21

Delphi is a lot easier to use. Thats the most easy reason I can think of.
Why do you say it's easier to use? It is a higher level language than straight C but with C++ and C#, I don't know that it is any more.
The real reason is because that is what know how to program in. We never considered doing it in any other language because Delphi is what we know best. (becoming really comfortable with a language takes a long time)
Delphi is much easier to learn than C, C++ or C#. C# might be better to use for this project, but I like Delphi more too.

I can't get the project running easily. Tomorrow I'm going to try to get it working tomorrow. It is allready 1.20 and I have to be in church at 9.40.
I don't think it will run properly in Delphi 7, lots of things changed as far as I know. See if you can get a copy of Delphi 6. Let us know how it goes though, see if you can get it to compile.
We use Tortoise SVN, which works really well as far as I've seen.
Turtoise SVN works very well, but I prefer a plug-in for the environment. That's a little bit easier. I can't find this fast a free one for delphi though.

I see that the use of references has been changed. Thats not to easy to change for me, so I'm going to get Delphi 6 (I hope).
<<

Xmasjos

Farmer

Posts: 21

Joined: 29 Dec 2009, 23:00

Location: Netherlands

Post 03 Jan 2010, 13:05

I've got Delphi 6 now. The first try failed, but I'm going to solve it :)
<<

harold

Knight

Posts: 563

Joined: 19 Nov 2007, 23:00

Post 03 Jan 2010, 15:00

There is really very little reason to use Plain Old C these days - why not use C++ then?
Granted you can always do exactly the same with C, but things like inheritance are a pain to do manually.. (making your own vtables? no thanks..)
<<

Xmasjos

Farmer

Posts: 21

Joined: 29 Dec 2009, 23:00

Location: Netherlands

Post 03 Jan 2010, 15:24

C has to be used for programming chips and other hardware. Unfortunately you can't use C++ with these things, because of the libraries that can't be used there.
<<

harold

Knight

Posts: 563

Joined: 19 Nov 2007, 23:00

Post 03 Jan 2010, 15:42

That's not even true. Library support has nothing to do with it. At worst you might have to avoid all dynamic memory allocation.
<<

Xmasjos

Farmer

Posts: 21

Joined: 29 Dec 2009, 23:00

Location: Netherlands

Post 03 Jan 2010, 16:02

It is true, or else it is taught wrong at our school. We learn that C needs almost no libraries, and C++ does. C is used to write very close to hardware, and C++ isn't (at least, that's what I have learnt).
<<

harold

Knight

Posts: 563

Joined: 19 Nov 2007, 23:00

Post 03 Jan 2010, 16:51

It is done that way, but not out of necessity. C++ (like C) does not require libraries, but without a memory allocator the "new" operator will be broken

But, C++ is almost a superset of C (differences with implicit pointer casting etc), most C code is also C++ code (sometimes with errors, but they're always easy to fix) - and then you could also use templates without changing the runtime requirements.
<<

xzaz

Barbarian

Posts: 105

Joined: 28 Jul 2009, 22:00

Post 05 Jan 2010, 00:45

Is there any reason why you guys chose for Delphi and not for the c fam?
Your assumption seems to be that C is a superior language or something. They are different, but I don't believe that either is the better language to use for the project. Either would do the job fine. Why did you assume C would be better? Also you assume that programmers can write in any language. I know very little about C, so I would have to learn the language before I could program in it. (I think Krom is the same)
I don't want to get into a "which language is better" argument but I'll give you a few reasons why I like Delphi, NOT why it is better than C: (new reincarnations of C might have all these things anyway, I don't know)
- I like the class structure which allows for child classes that inherit the parent's properties. (e.g. we can have TKMUnit, which is never used its self but then splits into TKMUnitSerf and TKMUnitWarrior which splits into TKMUnitWarriorMelee, etc. allowing for common code/properties to be shared easily)
- The debugger is really powerful (once again, I assume newer C IDEs are like that too)
- The strict type and class definitions means that little bugs such as wrong type usage are found when compiling not during run time.
- It is the language I know best (followed by PHP)
Delphi is a lot easier to use. Thats the most easy reason I can think of.
Why do you say it's easier to use? It is a higher level language than straight C but with C++ and C#, I don't know that it is any more.
The real reason is because that is what know how to program in. We never considered doing it in any other language because Delphi is what we know best. (becoming really comfortable with a language takes a long time)
I can't get the project running easily. Tomorrow I'm going to try to get it working tomorrow. It is allready 1.20 and I have to be in church at 9.40.
I don't think it will run properly in Delphi 7, lots of things changed as far as I know. See if you can get a copy of Delphi 6. Let us know how it goes though, see if you can get it to compile.
We use Tortoise SVN, which works really well as far as I've seen.
I think you misunderstood me. The point is that you understand the language, and what we speak we wright :)

Btw assumption: http://www.youtube.com/watch?v=wg4trPZFUwc :P
I learned that C is for drivers and C++ is for aps / games... thats the way it has been told here.
<<

Krom

User avatar

Knights Province Developer

Posts: 3282

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 06 Jan 2010, 15:51

I chose Delphi because of its syntax - it's quite easy to understand and is close to real life (see all the key-words instead of various kinds of brackets and combination of signs).

I thought of switching to C#, but so far Delphi suits me fine. Perhaps if I get newer version (e.g. 2010) I will like it more (including all the handy tools it might have), but so far it goes that we both have D6 at hand and we feel no need to switch to something different, hence - Delphi6 is our language for KaM Remake.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Krom

User avatar

Knights Province Developer

Posts: 3282

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 12 Jan 2010, 21:16

I've installed Lazarus today (that's a free Delphi compiler Lewin used for his MissionEditor) and after some hours KaM Remake can be compiled in it as well! :)

There are few flaws of course, but they are fixable, besides following components will need to be replaced - zlib compression, jpeg screenshots and mp3player. Using compiler directives thats not a problem to maintain both versions of Remake - full Delphi6 and WIP Lazarus :)

Anyhow Lazarus compiled version is playable. This means that anyone can join KaM Remake without need to obtain expensive and outdated Delphi6 now :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Xmasjos

Farmer

Posts: 21

Joined: 29 Dec 2009, 23:00

Location: Netherlands

Post 12 Jan 2010, 22:15

Compiling can be done in Lazarus (thanks for that :)), but I seem to be missing the 'Data' folder...

It works nicely when I put the data folder from your remake release in the 'build' folder.
The only problem is now that it won't load the sprites. I only see white grass, water, roads etc... The mouse pointer is a square (the pointer itself works fine, but the square around it isn't transparent). The buildings and all the other things are displayed fine.
<<

Krom

User avatar

Knights Province Developer

Posts: 3282

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Jan 2010, 09:05

We didn't included Data folder into SVN for it's over 40mb in size and can be easily taken from KaM TPR.

Terrain isn't loaded for it is zlib packed and as I've noted there's no zlibex library support in Lazarus (some functions are called in an odd way Lazarus can't handle). We'll try to fix that somehow. Maybe you can find Lazarus/Delphi6 compatible zlib library?

Mouse pointer should be transparent - some definitions may be wrong.. in Delphi it's fine. Anyway thats minor :)
Menu has wrong offsets - thats fixable as well.

I'll work on fixing Lazarus version this week. You can take a look into the code and see if you can add something to it (especially look at View-ToDo list). Tell us if you want to take some item and improve it (so we won't do same item together), then you can send updated unit to any of us and we'll see how it fits. If everything's ok I'll add you to KaM Remake team (you'll need to have gmail.com email for that) and you can start working along with us.

Cheers!
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

xzaz

Barbarian

Posts: 105

Joined: 28 Jul 2009, 22:00

Post 13 Jan 2010, 17:07

What kind of Algorithm do you guys use for finding path's? Just with X and Y <and> move?
<<

Krom

User avatar

Knights Province Developer

Posts: 3282

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 14 Jan 2010, 06:12

Our pathfinding uses good old A* (A-star) algorithm :)
Google for it - it's quite simple..
It's implemented in KM_PathFinding.pas unit.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Thunderwolf

User avatar

Crossbowman

Posts: 233

Joined: 22 Jan 2008, 23:00

Website: http://thunderwolf.freehost10.com/KaMMissionBuilder/index.php

Location: Netherlands

Post 14 Jan 2010, 08:53

A*?

I'm working with that one too in my own little project turn based strategy..

It doesn't always get the best path, but it most of the time does, so I guess it's okay to use, right?
~old sig
MissionBuilder v0.9f2 UPDATED!!
Defend The Outer Colony. fight for your king and uncover the secrets of this land.
Temporary version at
http://thunderwolf.x10hosting.com/index.php
"You can't defeat me, I've played Knights and Merchants"

Return to “Feedback / Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest