This forum has been archived. All content is frozen. Please use KDE Discuss instead.

how to edit source code

Tags: None
(comma "," separated)
isuru
Registered Member
Posts
3
Karma
0
OS

how to edit source code

Fri Nov 13, 2009 9:38 am
Hi All, I recently install kbattleship using svn trunks and cmake. Now it running perfectly. I want to build new AI for kbattleship. Can I use Kwrite to write my new AI headerfile and source file. And what are the changes I should make for the CMakeFile.txt before build it again to apply my AI to game. I'm very new to open source.
thank you.
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

Re: how to edit source code  Topic is solved

Fri Nov 13, 2009 8:15 pm
Welcome to KDE games development :)

What you basically have to do is this:

In kbattleship/src/CMakeLists.txt there is a line

Code: Select all
set(kbattleship_SRCS


followed by all the sources files of the game.
You add your source file or source files there as well.

Then, to make KBattleShip use your AI, you edit kbattleship/src/aientity.cpp and either replace one of the currently used AIs or create yours for an unused difficulty level.

I would also recommend to subscribe to the KDE games development mailing list, here https://mail.kde.org/mailman/listinfo/kde-games-devel

It is a very low-traffic list and has the advantage that most KDE games developers are on it, so especially game development related questions will be answered best over there.

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell