Prerequisites and Building

Here we speak about Code and Design.
malign
Posts: 61
Joined: Fri Sep 02, 2005 11:39 pm

Post by malign » Tue Sep 19, 2006 8:39 pm

Thanks for the good words, Potajito. Also, thank you very much for testing our source. It's nice to see people using the software and reporting their findings.

The asserts are there for better error handling so we can see what's going on. It's pretty sensitive. =)

You can actually go further than just logging in, storing account usernames/passwords, and clicking on server. You can actually make it into character creation so you can create a character. It will not save just yet however. We're working on designing our code to work with the client and the character db schema we have drafted to hold things like archtype, character name, etc.

I am not sure if this will help you, as it depends on the client version too, but check these two files out:

First, the file Mapserver/src/MapServer.cpp on line 55:

m_location.set(7001,"10.0.0.1");

Lastly, the file GameServer/src/GameServer.cpp on line 62:

m_location.set(7002,"10.0.0.1");

Fill both IPs in with 127.0.0.1 for example if you're running the server and client on localhost. This will require a recompile. Sorry about that. But, we're working on getting working config parsing functions in now. That will prevent you from having to recompile in the future, as you can just set the IPs in the cohemu.cfg file.

By setting those, your client may be able to finish completing the transaction. Again, it is also dependent on client version as some older clients will not work. Try whatever client version you have first. If it doesn't work, patch up to current I7 and try. I hope this helps. =)

--malign

darnstrong
Posts: 4
Joined: Fri Sep 01, 2006 2:09 am

Post by darnstrong » Thu Sep 21, 2006 7:29 pm

hey all

I have kind of a stupid question?.. I have been in the computer industry for about 15 years.. mostly networking and hardware support.. I am certified in unix and know linux pretty good.. I own my own computer bussiness as well.. here is my stupid question?..

If i wanted to try and get into programming so I could understand this project enough to help.. what steps would be best to start with?.. is there a dummy's guide to programming I could get my hands on?.. I hope I don't sound like to much of a noob.

I love COH and I would love to be involved in this project .. I have a WOW server
running as well ..

Any input would be helpful

Thanx in advance
Darnstrong

malign
Posts: 61
Joined: Fri Sep 02, 2005 11:39 pm

Post by malign » Fri Sep 22, 2006 1:41 am

darnstrong: What Unix certification do you have?

If you have no programming experience whatsoever, I recommend you start with a beginning programming book. A good book I used once was this:

http://www.amazon.com/Beginning-Program ... F8&s=books

Never underestimate a Dummy's book. Some are actually good depending on the author. This book teaches you all about programming languages. The differences between interpreted and compiled languages and what situations to use either one. It dabbles with some light QBASIC code samples. It also talks about how computers store data in memory. It's a decent book to start out with.

Next step, I would pick this book up:

http://www.amazon.com/Sams-Teach-Yourse ... F8&s=books

Those two will make you a bit dangerous. =)
The latter one is extremely good. I don't actually recommend trying to cram everything in 21 days. It actually took me longer to get through that book. =)
It teaches you simple stuff like input and output to more complicated things that most mediocre programmers cringe at... the feared pointers!

If you're serious about it, you will do the tests and examples in the book as you go through the chapters. The _bottom_ line is practice practice practice. Do not let it rust, because it can fade over time. Keep it up, don't get frustrated. Give yourself some time to adapt.

Some other tips, get familiar with a good text editor, not something like M$ Word. Notepad will work, most IDEs like Visual Studio or Code::Blocks have their own code editors. I personally do 90% of my development under a Unix environment. I usually use nano, but when that's not available, I settle for vi/vim.

Later on, if you have a good grasp on the higher level concepts, you might want to delve into the lower depths of the computer. Although, it is not necessary to write and maintain programs, you should get familiar with a user-level debugger. gdb is a decent one for Unix and Linux. A debugger is an invaluable tool to locate potential problems with your code. You may also want to learn some PC assembly and familiarize yourself with the binary and hexadecimal numbering systems.

Don't concern yourself with debugging or hex and binary right away. Forget about those for now and learn a good higher level language like C++. Why not C#? Java? or even C? C# is a nice idea and due to Mono, it is coming to multiple platforms. However, C# is really still in its infancy as far as portability is concerned. Java is also a very nice idea. One executable for every platform. However, it is typically clunkier than other languages and it also forces you into object orientation.
Lastly, C is a very great language, and that's where I started. It is definetely not dead either. However, C++ offers some nice extensions to its counterpart. C is straight procedural. C++ allows you to code in the "old-style" or objects. It is a hybrid language. Options are always good! C++ is also becoming widespread as far as PC games, embedded systems and many applications are concerned. C++ is also just as portable as C (which is highly portable.)

The above paragraph is just my opinion, but you can research around and draw your own conclusion. I am glad to see someone expanding their horizons. =)

Have fun doing it above all, darnstrong. Also, remember that nearly anyone can learn to program. Do not get discouraged. There are plenty of resources and help online to cater to new programmers.

Regards,
malign

PotajiTo
Posts: 10
Joined: Mon Aug 14, 2006 10:22 pm

Post by PotajiTo » Sat Sep 23, 2006 9:37 am

I've been coding for two years or so, so my advice isn't as good as maling's, but I recomend you take a look at ADA lamguage. Is very read-able and quite powerfull. And because how it works it doesnt let you make lots of mistakes. Also the jump from it to C is very easy.

Hawk
Posts: 4
Joined: Fri Jan 05, 2007 4:23 pm

Post by Hawk » Fri Jan 05, 2007 8:33 pm

I tryed to compile COh, but it didn`t work. This is the error I get.

Error 2 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 3 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 4 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 6 fatal error C1083: Cannot open include file: 'World.h': No such file or directory c:\\COH\\MapServer\\src\\MapServer.cpp 20
Error 7 fatal error C1083: Cannot open include file: 'World.h': No such file or directory c:\\COH\\MapServer\\src\\MapHandler.cpp 16
Error 8 fatal error LNK1104: cannot open file 'cohemu_common.lib' authserver

malign
Posts: 61
Joined: Fri Sep 02, 2005 11:39 pm

Post by malign » Fri Jan 05, 2007 10:09 pm

[quote:96cb5f960a=\"Hawk\"]I tryed to compile COh, but it didn`t work. This is the error I get.

Error 2 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 3 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 4 fatal error C1083: Cannot open include file: 'boost/pool/object_pool.hpp': No such file or directory C:\\COH\\AuthServer\\include\\AuthServer.h 31
Error 6 fatal error C1083: Cannot open include file: 'World.h': No such file or directory c:\\COH\\MapServer\\src\\MapServer.cpp 20
Error 7 fatal error C1083: Cannot open include file: 'World.h': No such file or directory c:\\COH\\MapServer\\src\\MapHandler.cpp 16
Error 8 fatal error LNK1104: cannot open file 'cohemu_common.lib' authserver[/quote:96cb5f960a]

For starters, Hawk; It appears that either you do not have Boost installed or the path to Boost is incorrect. Secondly, the "World.h" file missing is our fault.
The file has not yet been checked in to the repository. Just create a blank file with the name "World.h" at the path "\\MapServer\\include\\" and the compile should continue. Let us know how it goes.

Regards,
malign

Hawk
Posts: 4
Joined: Fri Jan 05, 2007 4:23 pm

Post by Hawk » Sat Jan 06, 2007 1:25 am

Malign or someone else. I create the new world.h and try to compile it again. In this rar file you can see my Cmake config and my Boost directory. Maby I did some thing wrong there.

But Cmake compiled the .sln.

http://filebeam.com/3044c745f92c472c6d31224c49165841

I all so talked with Codemaster and he helped me with some trouble I faced. And when I wanted to configure Cmake I got this error.

Cannot find source file...C:\\COH\\MapServer\\src\\src\\MapPacket.cpp. And he told me to remove MapPacket.cpp from the CMakelist that in the C:\\COH\\MapServer\\src folder is.

And after that...CMake could create the .sln solution, and then gave those error that I posted here. And without that MapPacket.cpp chance, CMake wouldn`t configure.

malign
Posts: 61
Joined: Fri Sep 02, 2005 11:39 pm

Post by malign » Sat Jan 06, 2007 1:26 am

I've added a blank World.h file to save you the trouble of mucking around with anything. Just update your local instance of the source via svn update. That will take care of the World.h issue you are having. Boost is a whole other can o' worms.

Regards,
malign

Hawk
Posts: 4
Joined: Fri Jan 05, 2007 4:23 pm

Post by Hawk » Sat Jan 06, 2007 1:47 am

I chanced the path from Boost in CMake, and I think the path is now correct.

Now I have a problem with the maps.

This is the error.

Error 27 error C2027: use of undefined type 'World' c:\\COH\\MapServer\\src\\MapHandler.cpp 339
Error 28 error C2227: left of '->m_entities' must point to class/struct/union/generic type c:\\COH\\MapServer\\src\\MapHandler.cpp 339
Error 29 error C2228: left of '.m_entlist' must have class/struct/union c:\\COH\\MapServer\\src\\MapHandler.cpp 339
Error 30 error C2228: left of '.push_back' must have class/struct/union c:\\COH\\MapServer\\src\\MapHandler.cpp 339
Error 31 error C2027: use of undefined type 'World' c:\\COH\\MapServer\\src\\MapHandler.cpp 346
Error 32 error C2227: left of '->m_entities' must point to class/struct/union/generic type c:\\COH\\MapServer\\src\\MapHandler.cpp 346
Error 33 error C2228: left of '.m_entlist' must have class/struct/union c:\\COH\\MapServer\\src\\MapHandler.cpp 346
Error 34 error C2228: left of '.push_back' must have class/struct/union c:\\COH\\MapServer\\src\\MapHandler.cpp 346
Error 43 fatal error LNK1104: cannot open file 'mapserver_lib.lib' authserver



And this is the last line from the output screen.


6>LINK : fatal error LNK1104: cannot open file 'mapserver_lib.lib'
6>Build log was saved at "file://c:\\COH - Bin\\AuthServer\\src\\authserver.dir\\Debug\\BuildLog.htm"
6>authserver - 1 error(s), 0 warning(s)
7>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------
7>Project not selected to build for this solution configuration
========== Build: 4 succeeded, 2 failed, 1 up-to-date, 1 skipped ==========

malign
Posts: 61
Joined: Fri Sep 02, 2005 11:39 pm

Post by malign » Sat Jan 06, 2007 1:18 pm

Hawk, the problem is with the latest revision. nemerle is currently working on the map support modules. So, he should submit a fix soon. I have verified revision 290 to have compiled clean. Try using revision 290 if you need a working build in the meanwhile.

Regards,
malign

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests